Problem debugging WCF service in Azure compute emulator

I’m using VS2010 SP-1 with all updates installed, Azure SDK 1.8, and the Storage Client Library 1.7. Storage Client Library 1.8 had breaking changes in it, and it’s going to take a few days to update and test all of our services, so we’ve been waiting for SDK 2.0 (which came out not too long ago).

I want to talk about the problems I’m having running my WCF services in the compute emulator. I’m curious to see if anybody else is having these kinds of problems, and wanted to see if upgrading to SDK 2.0 fixes the problems.

First, I have a startup task in my service that registers some dll’s. To run my WCF services in the Compute Emulator, I have to comment out that startup task in the csdef file. I also change the number of instances of the web and worker roles to 1, to make it run faster. I change the web.config to have debug=”true” so I can debug the code. I hit F5.

I am running the staging Azure cloud project in my solution, so this runs against blob storage and the SQL database in Azure, not on the local machine, so that complication is removed. When I hit F5 to run the application in the compute emulator, I get this:

This is fairly new. I’ve been having problems for several months, but this is a recent addition. I also see this message when running any of our web applications in the compute emulator. I do have “Launch browser for endpoint” checked, so it does open IE. I think I’ started seeing this message when I updated to IE10, but I couldn’t swear to it.

I click Okay. Now my service is running in the local compute emulator, and I can run my client that calls it and test the calls and stop it at the breakpoints and look at what’s going on, etc. I hit Stop in Visual Studio to stop the service so I can make some changes.

I make changes and hit F5 to run the service in the compute emulator again.  At some point (sometimes it’s the first time, sometimes it’s after a couple of iterations of changes), I get this error:

It worked just a minute ago just fine, so I know the file is right. And once I get this error, the service won’t run right, and I can’t debug into it. If I hit Continue (just for grins), the dialog goes away and then pops up again. If I hit OK, it closes the dialog, but doesn’t stop the service – I have to do that in VS. If I stop it and try to run it again, I get that error again. To get it to run again in the compute emulator, I have to clean the solution, wait a few seconds, and then I can run it.

At this point, I can no longer make changes, do a build to make sure it compiles, and then run it. From this point onward, I have to clean the solution and just run it. I have this happening on both of my development machines, so if it’s something about my setup, it’s on both of them.

In case you’re wondering, I did consider upgrading to VS2012, but the “updates” to the Pending Changes window just add one more layer of difficulty to our work, so my team has decided to wait for VS2013, where they have responded to that feedback from myself (and many, many others).

Next: I’m upgrading to SDK and Tools 2.0, and am interested to see if the problem is going to be fixed. If you’ve had this problem and have managed to fix it, please post your solution in the comments.

Tags: ,

One Response to “Problem debugging WCF service in Azure compute emulator”

  1. Windows Azure Community News Roundup (Edition #70) - Windows Azure Blog Says:

    […] Problem debugging WCF service in Azure compute emulator (posted June 30) […]

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


Follow

Get every new post delivered to your Inbox.

Join 65 other followers

%d bloggers like this: