13 Jan
Arif Khan 0 Comments

Attaching to IIS Process using Parallels Desktop

Before diving into details, this blog applies to the following environment:

Parallels Desktop 10 for Mac - Version 10.1.4 (28883)
Windows 8.1 Pro
Mac OS X Yosemite Version 10.10
Xamarin Studio Version 5.7.1 (build 17)

Let's follow the steps below to get things working:

Step 1: Configure Windows Network

Go to the VM's configuration and select Host-Only Network as the Type:
 


Step 2: Find out Windows Network configuration

We need to know the Windows machine name and the IP address of the Windows machine.

Look up the Windows machine name:

 
And the IP address. Type ipconfig in the command window to bring up the list of IP addresses:
 
Step 3: Set up Mac to allow applications to find the Windows machine

We need to edit the hosts file on the Mac. So let's open the terminal application on Mac and type in: sudo nano /private/etc/hosts. This command will use nano to open the hosts file which resides in /private/etc folder:
 
It will ask you for the password. As soon as you enter a valid password and hit enter, nano will open the hosts file for editing.

Go to the bottom of the hosts file and enter the IP address and name of your Windows machine:
 
Step 4: Validate

That is all you should need. Now to see if it works, let us do some debugging. In my case, I am using Xamarin to make a call to an ASP.Net HTTPHandler on Windows machine.

On Windows machine, I am going to open Visual Studio with the HTTPHandler code and attach to the IIS process that is running the HTTPHandler:
 
I have added a breakpoint to ProcessRequest() method in the HTTPHandler.

Now on my Mac, I have Xamarin Studio open. The code in here will make a call to the HTTPHandler using HTTPClient:

 
Once the call to the HTTPHandler is executed, I go to my Visual Studio instance and there is my breakpoint waiting for me:

 
Indeed, the right set of tools make it very easy for us to develop software.

 
Comments
Blog post currently doesn't have any comments.
 Security code