Mental Jetsam

By Peter Finch

Running ASP.NET 2.0 applications using Vista IIS 7

Posted by pcfinch on March 31, 2007

I’ve been using Vista (RC2) for a while [thanks Microsoft!!! :-)] and I quite like it, apart from the constant security prompts. As a unix/linux programmer as well, the contstant security prompts are not so bad. You come across that a lot on any restricted access/secure platform, it’s just that Vista is so… “in your face”… That said, I’m not going to be swapping to it permanently any time soon. I think I’ll wait till it matures a bit.

Anyway, I just spent 3 hours trying to get ASP.NET running on it under IIS 7 on Vista. It’s not as easy as it sounds as IIS 7 comes locked down pretty tight. After a lot of browsing around I finally worked out how to do it… and it turns out to be relatively simple. Just run the following command.

C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_regiis -i

Simple yes… No… there is more! Because of Visita’s lovely new security model, running this command as a normal user does not work, and because it’s a command line it just gives you a nice [useless] message telling you it can not run the operation.

An error has occurred: 0x800702e4 The requested operation requires elevation.

So, create a shortcut to it, add the “-i” to the end of the command line in the shortcut. Then right click of the shortcut and select “Run as administrator” and it should work.

Good luck!


25 Responses to “Running ASP.NET 2.0 applications using Vista IIS 7”

  1. You must run aspnet_regiis with adminsitratot permission.

    good luck !

  2. Jeff said

    Suggest launching cmd elevated to do those kinds of commands. It’s under accessories, right click and run as elevated or keep a shortcut that has the compat tab run as admin set.

  3. ravi said

    Hi Ravindra,

    Please help me i cannot resolve these problem.

  4. Khaled said

    also you can run the console as Administrator

    Thanks for help

  5. Shubha said

    Running cmd as Admin worked… thanks

  6. Vijay said

    Thanks!! It works for me..

  7. Brian said

    Thanks for the tip, works wonderful

  8. lawan said

    this dosent work nthing happens man…. i ran C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_regiis -i loggedin as admin.

  9. Steve said

    Excellent fix – thanks!

  10. Milo said

    Thanks it works

    One more solution(Even though you log in Admin account)

    find the cmd in search textbox in the startmenu right click and run as administrator and then use the same command and it works.

    Tested in Windows 7

  11. Pawan said

    I get an error as An error has occurred: 0x80004005 Unspecified error

  12. umair said

    Thanks buddy, it works for me. Vista security really become headache…..

  13. Anonymous said

    Waw cool!
    glad I found this page…
    I’ve searching a way to do this about an hour ~_~

  14. Anoop said

    You are a genious man..!!!

  15. Alon said

    Thank you vvery very very very much!!!

  16. Ramesh Babu said

    Step1: Run command prompt as administrator (Right click ‘VS2008 Command Prompt’ and click ‘run as administraor’

    Step 2: Execute aspnet_regiis -i

  17. Vikas said

    Thanks dude, that a good trick to run the command.

  18. Venkat said

    Great! It’s worked Thanks:)

  19. journey said

    that’s true!just right click it and select run as administrator…
    thank you!

  20. Fahad said

    it works

  21. Firoz khan said

    yes it working


  22. Abhishek said

    It’s Worked.

  23. erchiqui.mohammed said


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google 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 )

Connecting to %s

%d bloggers like this: