- Ensure the ServiceRoute name in Global.asax ends with .svc (or anything except extentionless that is mapped to C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll)
- Ensure .NET 4.0 app pool exists (or create one called AppPoolNET4)
- Create new Virtual Directory under the website in IIS6
- Switch to use AppPoolNET4
- Change ASP.NET version to 4.0 (restart IIS reqd)
- Web.config stuff:
- Look after your old IIS6 modules under <system.web> since <system.webServer> is ignored:
<httpModules>
<clear/>
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</httpModules>
- May need to clear handlers and other sections e.g. <httpHandlers><clear/></httpHandlers>
- Ensure you have aspNetCompatibilityEnabled="true" like so:
<system.serviceModel><serviceHostingEnvironment aspNetCompatibilityEnabled="true" />...
- Spec a shiney new 4.0 compiler too:
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider,System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v4.0"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>