Archive for the ‘Visual Studio’ Category

Enable IIS Manager in Windows 7

To enable the IIS Manager in Windows 7, you’ll need to follow the following steps:

  1. From Windows 7′s Start Menu, search for ‘Turn Windows features on or off’ or find the application from the Control Panel.
  2. To enable IIS Management Console, browse to: Internet Information Services > Web Management Tools > IIS Management Console. Check the final checkbox.
  3. Click the OK button and try searching for ‘Internet Information Services (IIS) Manager’ from the Start Menu. If it appears, this means that the installation worked.

Unable to add to the Web site. Unable to add file. Access is denied.

While taking over a C# Web Application that had been migrated to work with Visual Studio 2008 (originally developed and migrated from Visual Studio .NET 2003), I occasionally ran into issues while trying to publish the web application to the production server (or any server for that matter). In the output log, there were multiple error messages, all stating:

Unable to add ‘XXX.aspx’ to the Web site. Unable to add file ‘XXX.aspx’. Access is denied.

Each XXX.aspx would be a different files. What I learned after browsing and searching Google is to make sure the files on the production (or target) server are not marked as Read Only. The solution was to:

  1. Go to the Publish directory
  2. Highlight all files and folders
  3. Right click and select Properties
  4. Make sure the Read-only attribute checkbox is unchecked (white and not gray or checked)

References:
http://forums.asp.net/p/1074678/3431238.aspx#3431238

Unable to Create Virtual Directory in VS2008 and Windows 7

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 Authentication

In 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:

  1. 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.
  2. 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.
  3. To turn on ‘ASP.NET’, navigate to: Internet Information Services > World Wide Web Services > Application Development Features > ASP.NET. Check the final checkbox.
  4. To turn on ‘Windows Authentication’, navigate to: Internet Information Services > World Wide Web Services > Security > Windows Authentication. Check the final checkbox.
  5. Click the OK button on the Windows Features window and wait for the installation to finish. A restart of Windows is not necessary.
  6. 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.
  7. 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.