How to resolve: To access local IIS Web sites, you must run Visual Studio in the context of an administrator account.
When you try to open your websites from IIS in Vista or Windows 7, you may receive a message such as this:
To access local IIS Web sites, you must run Visual Studio in the context of an administrator account.
This error can be caused by 3 reasons and here are the solutions:
1 – You do not run the Visual Studio as an administrator. To do this, right click Visual Studio icon and click “Run as Administrator”. Also you can create a shortcut and in the properties of the shortcut, select compatitability and check “Run this program as an Administrator”. This way, your program will always run with administrator privileges.
2 – You do not have necessery Windows Components installed. These components will be shown below the warning. To add these Windows Components, go to Programs and Features in Control Panel, select “Turn on or off Windows Components” and install the components listed. They will most likely be under “Internet Information Services” >> “Web Management Tools” or “Internet Information Services” >> “World Wide Web Services”.
3 – Here is the last and the most probable reason and the solution: Visual Studio 2010 installation can corrupt some of “IIS 6 Management Compatitability” features. Removing and re-installing these from “Turn on or off Windows Components” under Programs and Features in Control Panel will probably solve your problem. They are located under “Internet Information Services >> Web Management Tools >> IIS 6 Management Compatitability”. You will need to restart after uninstalling these components but, no restart is needed after re-installing.
Popularity: 52% [?]
Tags: .NET, ASP.NET, IIS, Visual Studio, Visual Studio 2010