I have been specifically requested to blog about getting an ASP.NET 4.0 site working on a Windows 2008 server that has never run a 4.0 web site before.
- Make sure the 4.0 framework is installed on the server!
- Patch it will ALL the security patches have been applied. ((for a live server, make sure that you tested the patches on your development server first)
- You will find the HTTP Log status codes at http://support.microsoft.com/kb/943891 - they are very important in understandign the IIS logs)
After installing, turn on 4.0, by doing the following:
- Start the Internet Information Services (IIS Manager)
- Select the server node in the connections pane. (this is the node above Application Pools, FTP Sites and Server Farms)
- Double click the ISAPI and CGI Restrictions item in the centre pane
- You should see 1 or 2 ASP.NET v4.0.30319 entries, select Enable in the Actions pane for all of them.
- ASP.NET 4.0 should now run!
Remeber after creating your new 4.0 ASP.NET site. select the Sites node and find out the Id of it. By default, the IIS logs are at C:\inetpub\logs\LogFiles and if your site is say 21, then the logs will be created in the W3SVC21 sub-directory. The key point about using these logs is that in the event of an error when trying to start the site for the first time, the log will contain the status code and the sub-code. By having the full code and sub-code, set up issues can be resolved in minutes instead of hours.