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

32 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. A wired network has some disadvantages when compared to a wireless network, but wireless network is more convenient, especially laptop users, just sign in with password (what can be changed with 192.168.l.l)

    ReplyDelete
  7. Buy online wholesale printed custom cbd boxes and packaging at easy prices and shipping worldwide, with 24/7 customer support. Get a free custom quote now!!

    ReplyDelete
  8. Blackbird packaging provide you with any size, shape design, cbd boxes sooner than any other packaging competitor in the market

    ReplyDelete
  9. Blackbird packaging provide you with any size, shape design, custom bath bomb boxes sooner than any other packaging competitor in the market

    ReplyDelete
  10. Great Article
    Cloud Computing Projects




    Networking Projects



    Final Year

    Projects for CSE





    JavaScript Training in Chennai



    JavaScript

    Training in Chennai




    The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals,

    Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer.

    Angular Training

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

    ReplyDelete
  12. Blackbird packaging company can provide you with any size, shape design, and cookie boxes wholesale sooner than any other packaging competitor in the market

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

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

    ReplyDelete
  15. 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
  16. Blackbird packaging provide you with any size, shape design, custom vape boxes sooner than any other packaging competitor in the market

    ReplyDelete
  17. Blackbird packaging provide you with any size, shape design, custom cookie boxes sooner than any other packaging competitor in the market

    ReplyDelete
  18. Blackbird packaging provide you with any size, shape design, essential oil box packaging sooner than any other packaging competitor in the market

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

    ReplyDelete
  20. 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
  21. 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
  22. Buy leggings for girls online from Dshred at easy prices delivered at your doorstep. Get free shipping

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

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

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

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

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

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

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

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

    ReplyDelete
  31. 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
  32. Buy hand bags online from Al-Fatah at best prices delivered at your doorstep. Get free shipping

    ReplyDelete