Friday, 23 October 2009
Okay, assuming your website is up and you launch your webpage, you're likely to get a server 500 error.
If you're running Vista you will be provided with more details of the 500 error, however, if you're running 2008 Server then there is a distinct possibility you will receive no further information.
Note: this method will not make use of II7 integration mode, instead it will be running your website under IIS6 compatibility mode for IIS7.

Step 1:

II7 doesnt support the the traditional web.config file. You have to convert it. Here is how.
Open a new console window.
%systemroot%\system32\inetsrv\appcmd.exe migrate config "website/virtual-directory"

This is an example if you're web.config is in your website root.
c:\windows\system32\inetsrv\appcmd.exe migrate config "mywebsite/"

This is an example if you're web.config is in virtual directory called "myvirtualdir" within your website.
c:\windows\system32\inetsrv\appcmd.exe migrate config "mywebsite/myvirtualdir"

Step 2:

If you browse your webpage now you will likely get the error "System.Web.HttpException: Request is not available in this context".
To resolve this, you need to switch your application pool to use the classic .Net application pool.

Go to IIS management, select your website and on the Actions frame click Basic Settings.
Change your Application Pool to use Classic .NET AppPool, click OK and your're sorted.


Thats it. If you decide that you need to run your application in IIS7 integration mode later, investigate the changes you need to make within your web.config which complies with the IIS7 requirements to run in integration mode.



posted on Friday, 23 October 2009 14:35:20 (South Africa Standard Time, UTC+02:00)  #    Comments [0] Trackback
Related posts:
AppFabric, Static Content Not Loading
HTTP Compression
IIS6 Native HTTP Compression Tutorial
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):