| By Kevin Hoffman | Article Rating: |
|
| February 5, 2008 03:45 PM EST | Reads: |
8,824 |
Kevin Hoffman's BlogSo here's my precarious situation: I'm writing some sample web applications for the iPhone. Every once in a while, I poke around using Ruby on Rails, but by and large my web development lately has consisted entirely of the ASP.NET MVC framework CTP. I also don't own a PC anymore - I own a Macbook Pro and an iMac. So, what's an ASP.NET developer to do?

|VMware Fusion of course. The problem is that I've been pulling out my few remaining hairs trying to figure out how I can point my iPhone at my Windows Vista IIS residing inside a VMware Fusion Virtual Machine. For the longest time, I couldn't ping the VM from my host Leopard environment, and I couldn't ping the Leopard machine from the VM, so I thought I was dealing with a VMware problem. Turns out it was a little bit of both, and you need to configure both things properly.
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.
Published February 5, 2008 Reads 8,824
Copyright © 2008 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
- Why Build Applications for the iPhone and iPod Touch?
- AJAX World's iPhone Developer Summit to Take Place March 18-20, 2008 in New York City
- iPhone Developer Summit Names Kevin Hoffman Conference Tech Chair
- iPhone Developer Summit Offers Priceless Insight in San Jose, California
- iPhone as Biz-Phone - Sybase to Present at AJAXWorld's iPhone Developer Summit
- Web Apps for the iPhone: Duplicating the iPhone Look and Feel in Safari
- iPhone's Early Adopters: The Key to Free Publicity or the Fall of a Technology
- Aptana IDE: Your Unfair Advantage for AJAX, iPhone, Adobe AIR, PHP and Rails Development
- Behind-The-Scenes Look at iPhone & Apple
- How to Display Safari Address Bar on iPhone v1.1.3
- How to Develop Open Source Mobile Messaging and Sync Apps for iPhone vs. Android
- Web Apps for the iPhone: How to Duplicate the iPhone Look and Feel in Safari
- Introduction to the iPhone SDK
- iPhone as Biz-Phone: Enabling iPhone Support for Enterprise Applications
- Social Computing: the iPhone as an Ideal Platform
- Developing AJAX Applications for the iPhone and iPod Touch
About Kevin Hoffman
Kevin Hoffman, editor-in-chief of SYS-CON's iPhone Developer's Journal, is Technical Chair of iPhone Developer Summit. He has been programming since he was 10 and has written everything from DOS shareware to n-tier, enterprise web applications in VB, C++, Delphi, and C. Hoffman is coauthor of Professional .NET Framework (Wrox Press) and co-author with Robert Foster of Microsoft SharePoint 2007 Development Unleashed. He authors The .NET Addict's Blog at .NET Developer's Journal.
- "Virtualization Is Now a Key Strategic Theme," Says Citrix CTO
- Are you Application vAvailable?
- Cloud Computing Expo Europe 2009 in Prague: Themes & Topics
- Cloud Computing Expo 2009 West: Call for Papers Deadline July 15
- An A to Z of Cloud Computing Companies in 2009
- Cloud Computing Casts Shadow on Walled Gardens
- Virtualization Conference & Expo 2009 West: Call for Papers Closing
- Virtualization Conference Europe 2009: 18-19 May 2009 in Prague
- We Will Make the Cloud Hype a Reality: VMware CTO
- Ulitzer’s Amazing First 30 Days in Public Beta
- "Virtualization Is Now a Key Strategic Theme," Says Citrix CTO
- Are you Application vAvailable?
- Cloud Computing Expo Europe 2009 in Prague: Themes & Topics
- Cloud Computing Expo 2009 West: Call for Papers Deadline July 15
- SYS-CON's 5th International Virtualization Conference & Expo: Themes & Topics
- An A to Z of Cloud Computing Companies in 2009
- Cloud Computing Casts Shadow on Walled Gardens
- Citrix CEO "The Industry Needs Time"
- Virtualization Conference & Expo 2009 West: Call for Papers Closing
- Virtualization Conference Europe 2009: 18-19 May 2009 in Prague
- FullArmor GPAnywhere Secures Microsoft Application Virtualization Applications Through Group Policy
- SYS-CON's Virtualization Conference & Expo: Themes & Topics
- SYS-CON's Virtualization Journal Opens Its "Readers' Choice Awards" Nominations
- Application Virtualization: Instant Migration to Vista, Fast Delivery, Secure Access, Side-by-Side Deployments
- Integration with Windows Vista, Microsoft Excel, and Microsoft Application Virtualization
- "Virtualization Is Now a Key Strategic Theme," Says Citrix CTO
- mValent Extends Automated Application Configuration Management to Virtualization Environments
- Will Microsoft Buy Citrix?
- Are you Application vAvailable?
- Virtualization Conference Keynote Webcast Live on SYS-CON.TV






































