Saturday, March 05, 2011

Migration of Web Sites from IIS6 to IIS7

This note is about my experience to move a web site project from IIS6 to IIS7. The project was developed in ASP.Net in VS 2005. The requirement is to move the web site from one Windows box to another one. The only difference is IIS.

At first, I just copied all the files from IIS6 box to another box. That's the way normally I deploy a web site. However, after the set up on the new box in the same file and web site configuration, the new web site got exception when I tried to access to it from IE. After about one hour exploration, I found that it was caused by a http setting in my web.config. Rick Strahl's blog has one comment on this issue: HttpModule and HttpHander Sections in IIS 7 web.config files.

As Rick said, "you've probably seen the IIS 7 Exception that lets you know that in Integrated mode in IIS 7 you are not supposed to have an httpModules or httpHandlers section", however, my case web.config is different. The following http section caused the exception:

<add path="Reserved.ReportViewerWebControl.axd" verb="*" 
type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
validate="false"/>


After I comment it out, the web site on IIS 7 is OK. This is my note on this issue. I think Rick's view is related to the migration from IIS 6 to IIS 7.

0 comments: