Tip/Trick: Using IIS7 on Vista with VS 2005

A few people have pinged me over the last week asking about how to use VS 2005 with an IIS 7.0 web-site on Windows Vista.  Specifically, they've run into an issue where they see a dialog message asking them to install the FrontPage Server Extensions, or they get a "You must be a member of the administrators group" message when they try to connect (see dialog below):

Bradley has published a nice blog post that describes detailed steps on how to enable VS 2005 to connect to IIS 7.0.  To quickly summarize you need to follow the below two steps to enable it:

1) You need to make sure that you have the the optional "IIS 6 Management Compatibility" option installed within IIS7.  This installs an API for the new configuration system that is compatible with the old Metabase APIs (which is what VS 2005 uses).  You can select this using the "Turn Windows Features on or Off" option in the Vista Control Panel:

 

2) You need to make sure you launch VS 2005 with "elevated" privledges so that you have admin privledges to connect to IIS (this is needed to debug a service, as well as create sites and/or change bindings that impact the entire machine).  You can do this by right-clicking on the VS icon and select the "Run as Administrator" option when launching VS:

Note that this is needed even if your user is already in the administrators group if you have UAC enabled (which is on by default with Vista).  If you disable UAC (which you can also do via the control panel), then this second step isn't required.  Running VS 2005 with "elevated" privledges won't be required if you use the built-in VS 2005 Web-Server (since it has reduced privledges already).  It is only required when connecting and running/debugging with IIS locally.

We'll be updating Visual Studio 2005 to have more accurate error messages to help guide you to the above steps more naturally in the future.  Until then, just use the above steps and you are good to go.

Hope this helps,

Scott

46 Comments

  • Try to visit any page and after that "Build" project,you'll get error:
    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    ...and intellisense dosen't work anymore.
    What does it means?
    Thanks.

  • Good stuff. The reason I failed to create website by using the IIS is I forget to give the admin right to VS.NET 2005, Thanks.

  • Hi Andrey,

    Are you seeing this on each build? I know there there is an issue with that error message with Vista RC1 (that is now fixed for the final build) that can cause this -- but I don't think it is on each build.

    Thanks,

    Scott

  • Hi Scott,

    I've still got a ton of .Net 1.1/VS.Net 2003 web apps to maintain.

    I downloaded Vista RC1 via MSDN and have been having a lot of fun with it in a dual boot.

    Trouble is, the Web Developer component of VS.Net 2003 won't install on Vista because FrontPage Server Extensions aren't detected.

    Is there a workaround planned for this or are we stuck keeping XP around for maintenance of older projects?

  • And there was me spending hours on that problem!
    Thanks ;)

  • Hi Josef,

    We will have a web download for Frontpage Server Extensions on top of IIS 7.0 at somepoint in the future. It isn't available/ready yet - but is being worked on currently.

    Hope this helps,

    Scott

  • Hi Scott, that’s very reassuring. Thanks!

  • Hi Scott, I've still got a ton of .Net 2.0/VS.Net 2005 express web apps to maintainexpress ,But i publish web apps to iis7 web site,now i have probleum,can't updata data to access 2003,give the mdb to full control(admin),so it can delete table row,but can't updata table,please tell me,why?

  • I'm also seeing the same intellisense / 'Attempted to read or write protected memo' issues in RC1

  • Hi David,

    Can you send me an email describing the exact error and settings you've made? I can then loop in some folks to help debug it.

    Thanks,

    Scott

  • Hi Stephen,

    Can you send me email with more details on your exact configuration and scenario? I will then loop in a few additional folks to the thread to help investigate.

    Thanks,

    Scott

  • Hi Jovan,

    Can you go into Windows Setup and check to make sure that Windows Authentication is installed for IIS7? By default it isn't -- so that might be the problem.

    Hope this helps,

    Scott

  • Hi Scott!

    Thanks for the reply but I have installed Windows Authentication for IIS7? Any other tip?

    Apart from this I must say that VS start and performs much better in Vista than on XP

    /Jovan

  • Hi Jovan,

    Can you send me an email describing your scenario and configuration better? I'll then loop you in with a few of the debugging folks to help you fix this.

    thanks,

    Scott

  • Hi Pradeep,

    This is unfortunately a bug in RC1 of Vista. It is fixed in newer builds of Vista, but right now there probably isn't anyway to work around it.

    Sorry!

    Scott

  • Hi Scott
    I just upgrated my XP Pro to Vista RC1. I created a website in VS 2005, published it but when I try to run it in my browser, I get the "Service Unavailable" error. I then wen to IIS 7 and realized that the application pool always stops when I run the site in my browser. Do you please have a solution for this problem?
    Thanks

  • Hi CD,

    Can you send me mail with more details about the issue? I will then loop you in with a few people from the IIS7 team to help.

    Thanks,

    Scott

  • One thing on the authentication errors. I had to move my app to the classic .net app pool to get it to debug from within Visual Studio, once i did this with the aboved mentioned tips from Scott all worked fine.

    Tim

  • i want to vista updata

  • When I try to turn on ASP.Net I get an error after it tries to turn it on "An error has occurred. Not all of the features was sucessfully changed".

    I upgraded from Windows XP to Vista.

    Any ideas?

  • Hi Scott
    I want to know,
    - What difference between IIS6 and IIS7?
    - What difference between ASP.NET on windows XP and ASP.NET on windows vista?

  • Hi Yui,

    I'd recommend visiting the http://www.iis.net website. It contains a ton of good material that discusses IIS7.

    Thanks,

    Scott

  • Hi David,

    Can you send me an email that describes your configuration and error message more? I can then help loop you in with someone from the IIS team who can help.

    Thanks,

    Scott

  • Hi Scott

    Is there any more news on the FP Web Extensions being available for download for Vista?

  • Hi Jason,

    Can you send me email directly (scottgu@microsoft.com)? I will then loop you in with the IIS team who can give the best update.

    Thanks,

    Scott

  • Hi Scott,

    I'm getting the same error David got. I upgraded from XP to RTM Vista release and get an error when I try to enable ASP.NET ("An error has occured. Not all of the features were successfully changed").

    Thanks,
    Brian
    (will email you directly as well)

  • Hi Scott,
    I get the same error as David and Brian. This was an upgrade from a XP (.net 1 + 2) machine to RTM.

    THanks,

    Doug

  • Any update on when the FPSE for IIS 7 will be available?

  • Hi Terry,

    I don't have an updated ETA - but if you want to send me email directly (scottgu@microsoft.com) I'd be happy to loop you in with someone from the team who can update you on it.

    Thanks,

    Scott

  • Hi James.

    Unfortuanately your advice didn't work for me :-(. I get a error when I try to re-register ASP.NET 2.0 using "aspnet_regiis -i" (An error has occurred: 0x80004005 Unspecified error).

    There are a whole bunch of errors in the System Event Log: failed to complete process setting package xxx into Installed(Installed) state. The earliest error was:

    Windows Servicing failed to complete the process of setting package Windows Foundation (Foundation) into Installed(Installed) state

    I'm starting to wonder if I should just reinistall...

  • Hi Brian,

    Can you send me email (scottgu@microsoft.com) with details? I'll then loop in some folks from my team who can help.

    Thanks,

    Scott

  • Hi Lee,

    Can you send me email with more details about the debugging issue with IIS7? I can then loop in some folks from the team who can help.

    Thanks,

    Scott

  • Scott,

    I'm seeing similar situations as described by Brian above while upgrading to Vista RTM from Win XP. I've used your steps, those from another blog, and a couple of my own, but I keep coming down to the same 0x80004005 error. I have captured a slew of events. Can I send these to you as well?

    One of the other oddities I'm seeing which probably relates to this, is that VS 2005 does not provide me the opportunity to even create websites from the start page or from the menu "File". I have tried different settings and I'm still being denied.

    Best Wishes,
    Keith Nicholson, MVP C#

  • Hi Keith,

    Could you send me an email with details about the problem you are seeing (email address is: scottgu@microsoft.com)?

    I can then loop you in with someone on my team to help investigate and get this fixed.

    Thanks,

    Scott

  • Hi,

    I was having problems with the 0x80004005 error when running aspnet_regiis as well.

    I removed IIS to try and install it again, but it wouldn’t let me if I tried to install ASP.NET with it…

    It’s now sorted for me as I’ve just had some help from a very helpful guy at Microsoft called Gjergji Stasa who Scott reffered me to, so thanks to you too Scott. He said to do this…

    Delete the ASP.Net filters manually from the section of %windir%\system32\inetsrv\config\applicationhost.config and try to reinstall ASP.Net along with IIS.

    It now all works for me. Hope this helps someone else... :)

  • I am having problems installing or rather enabling IIS7 in vista. every time I try, no matter which options I choose, I get the following error message:
    "An error has occurred. Not all of the features were successfully changed"
    Is there anything at all I can do to sort this out?

  • I cant send any email out using localhost. maaybe I missed something using VS2005 and Vista.

  • Thanks Jac. I went through the applicationhost.config file and I deleted all the entries that weren't absolutely necessary and finally managed to get my ASP.NET to install.

    I much appreciate the advise :o)

  • Solution to "An error occurred..."

    Open C:\Windows\System32\inetsrv\config\applicationhost.config

    Remove ISAPI filter entries inside the sections.

    Stop the w3svc with "net stop w3svc"

    run "aspnet_regiis -i"

    Start the w3svc with "net start w3svc"

  • when the FPSE for IIS 7 will be available?
    how i install VS2003 with web development?

  • Hi Gsus,

    If you want to send me email directly, I can loop you in with someone from the team to get an update on FPSE for IIS7.

    Thanks,

    Scott

  • Scott, any update on availability of FPSE for IIS7?

  • JAC. you rock!. that totally worked

  • Hi mansachs,

    I'm really sorry to hear you are having problems. Can you send me email at scottgu@microsoft.com repeating this question? I will then put you in touch with someone who can help guide you through it and make sure you are up and running.

    Thanks,

    Scott

  • Scott,

    when i install sql 2005 express advanced, the repoting services dont create your pages on iis.
    This is related with admin permissions?

    do you have any solution for this ?

    thanks.

  • Hi Fred,

    Can you send me an email about this question? I can then loop you in with someone who can help.

    Thanks,

    Scott

Comments have been disabled for this content.