When developing C# Web applications in Visual Studio 2008 on Windows 7, I usually disable Visual Studio Development Server and setup directly with the Local IIS Web server. However, I run into the following error message.
Unable to create the virtual directory. To access local IIS Web sites, you must install the following IIS components:
IIS 6 Metabase and IIS 6 Configuration Compatibility
ASP.NET
Windows AuthenticationIn addition, you must run Visual Studio in the context of an administrator account.
For more information, press F1.
Simply following the steps as specified in the error window fixes the issue. This can be accomplished by making the four required changes:
- Search for the application ‘Turn Windows features on or off’ by searching for it from the Start Menu or find it in the Control Panel. A window called ‘Windows Features’ will open.
- To turn on ‘IIS 6 Metabase and IIS 6 Configuration Compatibility’, navigate to: Internet Information Services > Web Management Tools > IIS 6 Management Compatibility > IIS 6 Metabase and IIS 6 Configuration Compatibility. Check the final checkbox.
- To turn on ‘ASP.NET’, navigate to: Internet Information Services > World Wide Web Services > Application Development Features > ASP.NET. Check the final checkbox.
- To turn on ‘Windows Authentication’, navigate to: Internet Information Services > World Wide Web Services > Security > Windows Authentication. Check the final checkbox.
- Click the OK button on the Windows Features window and wait for the installation to finish. A restart of Windows is not necessary.
- To run Visual Studio in the context of an administrator account, close all instances of Visual Studio 2008. Find the Visual Studio 2008 application icon. Right click and select Run as administrator.
- When Visual Studio 2008 loads, try setting and apply the Use Local IIS Web server setting.
At this point, the error message will not appear anymore and your application will run on your local IIS Web server.
RSS Feed
Posted in
Tags: 
