How to host IIS7 web site on Mac OSX folder via Parallels

This has bugged me for a long time. I run Parallels on my MacBook Pro because I often have to work with Windows programming technologies, mostly Visual Studio and SQL Server. When I'm developing in Windows I run a localhost copy of the web site in IIS7 (I have Vista on my Mac). Up until now I've kept the site files in the Parallels VM windows drive, but this has constantly annoyed me because I don't back up my Windows drive with Time Capsule. Take too long and causes a marked slow down in my system each hour when the backup is running. Parallels has a specific option to not back up the VM with Time Capsule and I have that selected.

Every time I've ever tried to hook an IIS web site to a folder on my Mac (eg not in the VM) it's never worked – endless errors. Finally after a bit of hunting around I pulled together various tidbits of information from the net and made it work. Here's how:

1. In Parallels configuration make sure you are using Bridged Networking, this is to ensure your VM has a separate IP number to your Mac.

2. In Mac System Preferences > Sharing, enable File Sharing. Add the root folder for your web site (on your Mac) to the list of Shared Folders and give all users all rights (I kept it simple with permissions and just gave everyone every right, it's only for my localhost so I don't think security is a big deal).

3. In Windows use File Explorer and open Network and locate your Mac and the root folder for your web site. Copy the path, on mine it looks like \\MACBOOKPRO-31F6\wwwroot

4. In Windows IIS add a new web site, In Advanced Settings set the Physical Path to the network path you copied above

5. Still in Advanced Settings set the Physical Path Credentials to your Mac user name and password. I wound up adding a new Windows user with the same user name and password as I have on the Mac. I'm not completely sure if this is the right thing to do, but heck, it worked.

6. If you already have a default web site in IIS, you'll need to sort out the bindings, you can't have more than one web site on the same port, which by default is 80. Right click the new web site and edit the Bindings. I set the port to 8080.

7. In Windows open your browser and try http://localhost:8080/, you should see the default page, if you have one, from the folder on your Mac. If, like me, it didn't work first time, try creating a simple hello.htm and calling that. I discovered my problem was simply paths and configuration variables in my web site – moral being try calling the most basic page first before blaming errors on IIS rather than your web app.

7 thoughts on “How to host IIS7 web site on Mac OSX folder via Parallels

  1. Excellent David, you made this a lot easier for me.
    A couple of things I noticed along the way.
    * In the Mac File Sharing options, SMB file sharing is required but you can leave AFP file sharing checked if you have that. No need to uncheck that when futzing for results.
    * Nothing will work, of course, until you get the all-green upon “Test Settings” in the Virtual Directory Basic Settings dialog. Obvious, perhaps, but a yellow icon with a “Cannot determine if…” translates to “fail”. No free pass here.
    * I eventually got it working after setting the Physical Path Credentials Type to “Clear Text”. Other options seem plausible but that’s my state now and it’s working.
    These tips may be also br helpful for others:
    * As always, make sure all paths have trailing slashes and backslashes.
    * It seems timeless and inevitable with IIS that, regardless of its version going back to IIS 4, a stop-and-go on the service often yields wonders.
    Thanks for your help!

  2. Good points here Steven thanks!
    As usual I messed around with it for a bit, so thus hard to retrace my steps exactly, you have filled in some gaps.
    I definitely used Clear Text for the credentials after doing the same as you and trying different combinations.
    And yes a stop/start on IIS service often magically makes things work that didn’t previously 🙂
    David

  3. Hi David,
    i tried to host IIS web site on mac folder, with Microsoft Windows 8 (IIS 8.0) and Snow Leopard 10.8.2.
    when i set the network folder (like \\MACBOOKPRO-31F6\wwwroot) and set user name and password, i receive the message “the specified password is invalid. type a new password”.
    i followed all the steps in your article (and Steven’s comment) and i’m sure that the password is correct, but i’ve the same message…

    any suggestion?

  4. Hi Gabriele

    I’m sorry I haven’t tried this with Windows 8, so I don’t know if there’s a difference.
    Do you have accounts on both your Mac and Windows with that username/password?

    David

    • Hi David,

      i’ve found a great workaround!!!

      using parallels’s feature, i set the path in IIS like “\\psf\Home\…” with IIS standard credentials…and now work great!!!

      i hope that it’s helpful

      • Hi Gabriele

        OK, fantastic if it works for you. I don’t recall precisely now, but I have a feeling I tried the \\psf\ path and it didn’t work. But if that’s what’s coming up trumps for you then go for it!

        I’ve had on and off hassles with this, I confess I’m now more often than not just keeping the files on the Windows drive – I wound up turning on Time Machine backups for Parallels VM (bought a bigger external drive so can fit all the data from TM).

        Also, I found a quirk that bugged me a bit – if I have a file on the Mac folder, call it from the browser via IIS, edit the file in Dreamweaver on Mac, IIS seems to have a lock on the file for a few seconds, so Dreamweaver can’t save changes for a few moments. Seems minor, but if I’m working on the file making constant changes and testing, the delay drives me nuts.

        Cheers…David

  5. Pingback: I need to write more blog posts about SQL server and missing toolbars in Excel | David Eedle

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s