iPhone News Desk
iPhone & Virtualization: ASP.NET Inside VMware Fusion on a Mac
I don't own a PC anymore - I own a Macbook Pro and an iMac. So, what's an ASP.NET developer to do?
By: Kevin Hoffman
Feb. 5, 2008 03:45 PM
Kevin Hoffman's Blog
Configuring VMware Fusion for IIS-related activities
First set the networking mode on the VM to "Bridged". Since both the VM and the host machine are connected to the same IP-supplier (if you're using DHCP like an in-home router), they will both have the same gateway (which is ridiculously important...if they don't have the same gateway you need a RIP-enabled router to forward packets...blick on that).
When this is working, you'll probably end up with a router/gateway IP address of 192.168.1.1 (though some routers prefer to use the 10.* local network, but it's far less common). In my case, my Windows Vista virtual machine had an IP address of 192.168.1.11 and my host Leopard OS had an IP address of 192.168.1.8, and the iPhone has an IP of 192.168.1.6.
Configuring Windows Vista inside a VMware Fusion VM for IIS-related activities
Here's where the fun starts. You will have to do the following in order, because if you don't Windows Firewall will turn itself back on and you'll have to add another extra step of shutting the Firewall off again.
1. Turn on some or all of the sharing features like public folder sharing, printer sharing, media sharing, etc. You need a couple of these on to make the Windows Vista machine pingable. Without these on, it will not respond to pings.
2. Turn off Windows Firewall. You might've turned it off before, but check again. Just to be sure, uncheck the checkbox next to the "Local Area Network" connection that indicates the firewall is protecting that connection.
3. You should now be able to ping the host Mac from the VM
4. You should be able to ping the VM from the host Mac
Finally, as a test, hit the IP of your Vista machine from Safari inside Leopard and you should end up with the IIS7 welcome screen below:
It really should not be this difficult to get working, but between the complexity of bridged VMware networking and the zealousness with which Windows Vista protects its innards, it can be daunting.
With all of this infrastructure in place you can now use the file-based ASP.NET MVC project and test it locally within your VM using the Cassini internal VS2008 web server. When you're ready to test the iPhone GUI, layout, and responsiveness on a real phone rather than using Safari for Windows as your test environment, just publish your project to IIS and you can hit it from your iPhone.
The frustration involved in getting this to work properly was almost enough to get me to switch to a different web development environment... almost. :) Hopefully this blog post makes your setup easy if you have a similar environment.
Reader Feedback: Page 1 of 1
Latest Cloud Developer Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
SYS-CON Featured Whitepapers
Most Read This Week