find a location for property in a new city

Friday 9 September 2011

Not running in a hosted service or the Development Fabric - Azure

I got an InvalidOperationException with message "Not running in a hosted service or the Development Fabric" while trying to access my Azure site hosted on my local IIS. I have encountered this before and solved it but this time it confused be further so I thought this time I should document it.

The cause of this issue is that you are not running you Compute Emulator or your Storage Emulator. You can get these when you download and install the Windows Azure SDK (currently at v1.4). Once you have these you must have them running and, according to Michael Collier's blog post, they must be running as administrator too.

This can be done in two ways:

  • Going to Start > All Programs > Windows Azure SDK v1.4 > Compute Emulator and run it as administrator (which I can't find how to do).
  • Run the site in debug mode. This will cause the emulators to start running (since Visual Studio is running as administrator). Your IIS hosted site will then also be able to run.

I found the first way didn't work but that was because I didn't know I had to run them as administrator before I read Collier's post. However, after reading it I still can't figure out how to run it as administrator without using Visual Studio.

So usually I hit F5 to start debugging in the 127.0.0.1:{random port} page that starts up. I then close that window and continue using my IIS hosted site now that the emulators are running as administrator.

I have found one further complication though on the odd occasion. It seems that if you attempted to run your site before you had the emulators running, got the error and then started the emulators, you would still get the error. When this happens I found if I restart my site and application pool in IIS manager it will begin to work with the already running emulators correctly.

Conclusion

I now believe that you must have your Azure Compute Emulator(s) running as administrator before your site and application pool start up to run an Azure site successfully in IIS in a development environment.

Follow britishdev on Twitter

25 comments:

  1. Awesome! Great work with this post, i am sure people should have got impressed with this post.

    ReplyDelete
  2. Hi Colin, Thanks for the post - was exactly what I was looking for. In reference to your point you can right-click -> properties on the "Computer Emulator" program and then under the "Compatibility" tab you can select "Run this program as administrator". You've probably found this anyway by now as quite an old post but thought I'd mention it.

    ReplyDelete
  3. Motifz Designer Lawn. 1, 2 & 3 Piece Unstitched Premium Embroidered Lawn 2019, Premium embroidered Lawn, Premium lawn, Premium lawn 2019, Motifz, Premium lawn in Pakistan. Shipping worldwide. Stitching option available.

    ReplyDelete
  4. Motifz Designer Lawn. 1, 2 & 3 Piece Unstitched Premium Embroidered Lawn 2019, Premium embroidered Lawn, Premium lawn, Premium lawn 2019, Motifz, Premium lawn in Pakistan. Shipping worldwide. Stitching option available.

    ReplyDelete
  5. So usually I hit F5 to start debugging in the 127.0.0.1:{random port} page that starts up. I then close that window and continue using my IIS hosted site now that the emulators are running as administrator. iPage coupons

    ReplyDelete
  6. buy cbd bath bombs wholesale online from blackbird packaging at best prices. get free shiping

    ReplyDelete
  7. buy grocery online in pakistan from alfatah at best prices. Get free shipping

    ReplyDelete
  8. Buy home appliances online in Pakistan from Al-fatah at best prices. Get free shipping

    ReplyDelete
  9. Shop from a wide range of Local and Imported variety of makeup removers online from Al-Fatah. Shop from a diversified range of makeup removers and makeup remover wipes from all top brands. Buy the best for your skin. Avail Free Delivery on orders above 1000 PKR for selected cities in Pakistan.

    ReplyDelete
  10. buy gym wear online for men from dshred at best prices deliered at your doorstep. Get free shipping

    ReplyDelete
  11. This is a great article thanks for sharing this informative information. I will visit your blog regularly for some latest post. I will visit your blog regularly for Some latest post. keep up and thanks for this, this time to take advantage of Flooring Repair Services In Houston TX visit for more details and more services.

    ReplyDelete
  12. You completed certain reliable points there. I did a search on the subject and found nearly all persons will agree with your blog. thanks this time to take advantage of Mold Inspection Services in San Diego visit for more details.

    ReplyDelete
  13. Buy leggings for girls online from Dshred at easy prices delivered at your doorstep. Get free shipping

    ReplyDelete
  14. Buy shorts men from ndure at best prices delivered at your doorstep. Get free shipping

    ReplyDelete
  15. Buy best t shirts for men from dshred at best prices delivered at your doorstep. Get free shipping

    ReplyDelete
  16. Buy Good quality baby food online Pakistan at best prices from medisense. Order Now and enjoy fast delivery at your doorstep.

    ReplyDelete
  17. Buy online best quality salazodine ec 500mg online Pakistan from medisense at your door step.

    ReplyDelete
  18. Now You can buy multivitamins online in Pakistan from medisense where all kind of supplements and vitamins are available. Quick delivery.

    ReplyDelete
  19. Now You can buy online pharmacy in Lahore from medisense where all kind of medicine are available. Quick delivery.

    ReplyDelete
  20. Buy Good quality lilly insulin pen price in Pakistan with affordable rates at your door step. Fast delivery.

    ReplyDelete
  21. Buy sports bra for gym online from Ndure at best prices delivered at your doorstep. Get free shipping.

    ReplyDelete
  22. Excellent information you have shared, thanks for taking the time to share withus such a great article. I really appreciate your work. this time to take advantage of Roofing Contractor Services In Cedar Park TX visit for more details.

    ReplyDelete
  23. Buy hand bags online from Al-Fatah at best prices delivered at your doorstep. Get free shipping

    ReplyDelete
  24. govt job in chhattisgarh
    Ans. Here we provide details about the upcoming and incoming Govt. Jobs in Chandigarh, Results, Admit Card, Exam Pattern, Exam Syllabus, Exam Date Notices in the Chandigarh Govt. Jobs Page.

    ReplyDelete