[ad_1]
To follow up on that, just in case someone runs into the same problem again, it might also be the case that for whatever reason one of your deployments got stuck in the compute emulator.
What happened to me was that I had a webrole containing multiple websites, each bound to a different hostname. Say: localhost and test.localhost. Normally, you would access these at localhost:81 and test.localhost:81. For some strange reason though, one deployment got into a weird state where it would be listed in the compute emulator, with no Visual Studio debugging it, it would say “Role Instance destroyed” or something along those lines.. This deployment still had the websites deployed in IIS. I then, without knowing about this buggy deployment, accessed the default urls, ie. test.localhost:81 which would load up the old deployment files. The (old) site worked until I opened a page that actually used the RoleEnvironment.GetConfigurationSettingValue
method, and only then I got that exception. It was really frustrating as this boggus deployment obvioulsy didn’t hit any breakpoints nor breaked on exceptions, yet it looked exactly as the site I’ve been working on..
When I realised this, I opened the hostnames under the new port and there the pages worked as expected. Once I removed this buggy deployment from the compute emulator the IIS websites also got deleted and thankfully the ports are now available for use as expected..
[ad_2]