You can't turn back the clock. But you can wind it up again.

Further to my earlier post I encountered another issue migrating sites for a client from IIS6 to IIS7. If your site uses any httpHandlers or httpModules you will need to perform these steps to migrate your web.config to include the missing configuration sections required by IIS7. First of all I would suggest listing out all sites using AppCmd and the following command: [code]%systemroot%system32inetsrvAPPCMD list sites[/code] Your output should be similar with the following: [code]SITE "Default Web Site" (id:1,bindings:HTTP/*:80:,state:Started) SITE "Site1" (id:2,bindings:http/*:81:,state:Started) SITE "Site2" (id:3,bindings:http/*:82:,state:Stopped)[/code] Make a note of the object specific identifier in quotes as you will need this to specify the website/app whose web.config you wish to migrate. Next you will need to run another command to perform the migration as follows: [code]%systemroot%system32inetsrvAPPCMD.EXE migrate config "object-specific-identifier/"[/code] There is a very important point worth noting here as it caught me out for quite a while, be sure to include a trailing slash after your object specific identifier or the command will fail. All being well your should get a message similar to this confirming the web.config has been migrated. [code]Successfully migrated section "system.web/httpModules". Successfully migrated section "system.web/httpHandlers".[/code] That's it, for me the app was back up and running again after these steps.

comments powered by Disqus