Accessing the dashboard in tries to download cshtml file instead of loading the page

I have recently installed the application on both my local test server and my live web server. They are both Windows Server 2003 with IIS6. The application works fine on my local test server but it works partially on the live server. When I try to access the dashboard in the settings section, instead of loading the page, the browser tries to download the page. And when I click on themes (another cshtml page) I get a lot of strange text starting with @using BlogEngine.Core.Packaging @{ Page.Title = Resources.labels.themes;.....etc

I have been googling a lot but most answers seem to focus on IIS7 and the ones that seemed to apply for IIS6 did not seem to apply since they mentioned checking for missing DLLs (which isn't the case since the bin folder contains the exact same files as the one in the working server).

Things I have tried:

1) Resintalling the blog engine

2) Install MVC 3

3) Adding a mime type "text/html" to the ".cshtml" extension under the HTTP Headers tab in the web site properties (in IIS6)

4) Adding a dedicated application pool for the website

Some of the suggestions I found suggested that I should set the application pool to use .Net 4, but I don't know how to set that in IIS6 (unlike IIS7.5) and I set the setting in the website properties to 4.

Any help or pointers would be greatly appreciated.



OK. It appears that the problem has now been solved. For the benefit of other people having the same problem, here is how to do it:

1) In IIS Manager, go to website > properties > Home Directory > Configuration

2) Add two application extensions for .cshtml and .cshtm, setting both to:

executable = c:\windows\\framework\v4.0.30319\aspnet_isapi.dll


Note that after doing this I was still having the problems with the browser trying to download the files rather then loading the pages. This was solved by clearing the browser cache (was using Chrome).

Need Your Help

Check if main window of application is open and loaded

objective-c macos cocoa window mainwindow

Part of my app is opening applications and preserving the work space that they have opened in. My problem is checking if the main application window has opened so I can go and switch to the next work

How .xib is actually loaded during runtime?

ios iphone

I want to know how an .xib is loaded into the memory during runtime or whenever we run the application.