Tuesday, November 30, 2010

Azure SDK 1.3 Beta - System.ServiceModel Exception on Debug

I started using the new Windows Azure 1.3 SDK (BETA) yesterday and after I installed it I began getting a strange error when I tried to run Debug from Visual Studio 2010.


System.ServiceModel.CommunicationObjectFaultedException was unhandled
Message=The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.

This issue drove me crazy for the last day and after much weeping and gnashing of teeth, I figured out what the fix is:

Make sure your web role web.config is writable (i.e. not locked in read-only by source control or the read-only file bit.)

It looks like there is a bug in the Azure SDK 1.3 that is causing the web.config to be written to during the instantiation of the Azure dev fabric roles. If the web.config is read-only, Azure is blocked from editing the file (no actual edits take place that I can find) and the bizarro System.ServiceModel.CommunicationObjectFailedException message bubbles up.

Secondarily.... Make sure that any declarations are moved to . This was a minor issue causing a few hiccups (not the main problem), but I thought it was worth mentioning.

Hope that helps everyone.

Aaron
http://www.churchofficeonline.com

1 comment:

Dmitry Lyalin said...

Thank you so much this fixed it for me :), i was being driven totally nuts!

Its funny because i had a source control problem at first so web.config was not in TFS, once i fixed that i started getting this error and it was really a showstopper to my testing, but this did fix it.

I work for Microsoft and will email the Azure team a link to your post and my experience to ensure they know about it