Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have to migrate an ASP.Net web site from IIS6 to IIS7. I tried to copy the all files for a web site from IIS6 (c:\inetpub\wwwroot\MySite) to another box with Windows Server 2008 R2 where IIS7 is the default web server.

However, the simply copy seems not working. Should I rebuild the web site for IIS7 or should I make changes on the new box with IIS7 such as web.config?

Thanks for the comments. Further investigation I found that http handers seems caused exception:

<!--httpHandlers>
  <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"/>
</httpHandlers-->

After I comment out the above handler in web.config, the web page works fine. This is just my initial test. I am not sure if I should rebuild the web site from source codes or not. If so, do I need to specify for IIS7?

share|improve this question
    
You really need to expand on what "not working" means. Assuming the new box has been set up properly (everything you need is installed), you might just need to migrate the configuration file. –  Brandon Mar 3 '11 at 22:09
    
It should work without rebuilding. Please expand "seems not working". –  Shoban Mar 3 '11 at 22:11
    
Check out this blog post. –  StackOverflowException Mar 3 '11 at 22:43
add comment

migrated from stackoverflow.com Mar 4 '11 at 18:13

This question came from our site for professional and enthusiast programmers.

2 Answers

Also try, both under <system.webServer> :

<validation validateIntegratedModeConfiguration="false"/>

else it won't work because the Reporting Services handler invalidates this mode. then under <handlers>

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

Obv substituting the above for your version 8. You will also have to uncomment what you did as it will expect it to be there. Old versions of Reporting Services handler are not really IIS7 aware.

Basically the handler needs to be registered in the IIS7 part of the web.config as well as the "classic" part.

share|improve this answer
add comment

HTTP handlers are handled differently in IIS7 vs. IIS6. A couple of things you could try:

1) Change your app pool from 'integrated' mode to 'classic' mode (probably would not be the first choice, but will certainly get it working).

2) Reconfigure your web.config file (this is probably the route you should go). In integrated mode, http handlers need to be moved to the section (IIS6 has them in the system.web section).

Here is some additional information you may want to have a look at:

http://msdn.microsoft.com/en-us/library/bb515251.aspx

Of note, have a look at the "Moving a Web Application to Integrated Mode" section.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.