Monthly Archives: September 2008

You are browsing the site archives by month.

Enabling VS.NET 2008 to work with IIS 7.0

This is likely old ground for some, but I thought I’d cover it again just in case. As you may know Visual Studio allows you to create a new web site on IIS. However, there are some minor steps that you need to complete before it will work appropriately.

Let’s walk through this.

  1. Open Visual Studio .NET 2008
  2. Go to File | Web Site…
  3. Click the Browse… button to choose a Location
    1 - vs08-newwebsite-sm
  4. Click on the Local IIS button on the left
    2 - vs08-iis-sm
    You’ll notice the IIS 6 Metabase and IIS Configuration Compatibility need to be
    installed as well as ASP.NET. The next steps we’ll go through will enable this for
    you.
  5. Go to Start | Control Panel and click on the
    Programs and Features
    applet
  6. Click on the Turn Windows features on or off button on the left
  7. From the Windows Features window, select the IIS Metabase
    and IIS 6 configuration compatibility
    option under IIS 6 Management
    Compatibility
    as well as ASP.NET under Application
    Development Features

    3 - vs08-features-sm
  8. Click OK and wait as Windows configures the service
    4 - vs08-configuring
  9. Once Windows is done configuring IIS, it may ask you to restart. Click Restart
    Now
    .
    5 - vs08-restart
  10. After rebooting, you should be able to walk through steps 1-4 again and create a
    Web site with the Local IIS option.
    6 - vs08-working-sm

This should be all you need to do to enable Local IIS integration with VS.NET 2008.

IIS 7.0 Error Support

I know that most of you reading the blogs on this site have already seen how handy the errors are in IIS 7.0 as compared to previous error conditions. This weekend, I was playing with BlogEngine.NET and thought I’d put it on my personal site (tobint.com) to try it out. I downloaded the software and tried setting it up on my server. After following the brief instructions, I hit an error:

HTTP Error 500.22 – Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

In previous versions of IIS, this might have been all that I had to go on. I’d then search one or several search engines for that exact error and read through blog posts, forums, knowledge base articles and FAQ’s before I found what I needed. In IIS 7.0, I found the friendly error page awaiting me:

Error 500.22

 I looked at the “Things you can try” and a picked the first “fix” on the list. Since my application was not in the Default Web Site, I ran the appcmd for my application in “tobint.com/”. 

AppCmd

 As you can see, the error page correctly identified that my configuration needed to be migrated, and gave me the steps I needed to migrate it effectively. No searching the web. No trying to trace the problem down. No turning on tracing for ASP.NET pages. 

I love this feature. It’s a huge time saver and I don’t think it gets bragged on enough.