This project is read-only.

BE admin problems

Jul 19, 2011 at 7:43 PM
Edited Jul 19, 2011 at 8:01 PM


Any ideas why some Admin pages give me "404" errors while the Blog seem to work ok ?

Tha pages are :




While they seem to exist as files. And it seems that they all are "cshtml" files.

IIS 7.5 & NET4


Jul 20, 2011 at 11:33 AM

Hi zaratustra

Seem your IIS is missing .cshtml extension in MIME Types


Jul 20, 2011 at 11:37 AM


Yes i thought so and i added it.

Now the 404 error is gone but i see "code" when executing the pages. I have opened a ticket about it in my hoster and i wait. Seaching the Internet i see that this is a well know problem, still not a clear answer.


Jul 21, 2011 at 5:42 AM


Have the same problem... 

Jul 28, 2011 at 4:15 AM

Hi, I too have this problem, however it only seems to be occuring on additional sites. The defualt blog seems to work fine, but the other sites are not. Also, I note that this works fine in my local iis (iis7) but on my server running server 2003, iis6, is where i'm having the issues.

Have added MIME type for .cshtml, installed .net 4.0 but no joy.

Thanks in advance for any help.

Jul 29, 2011 at 12:59 AM


I have the same problem, but only in the virtual blogs. I think, that the specific handler is missing...

Aug 2, 2011 at 1:19 AM

Hi Guys, Not sure if you are still struggling with this, but I solved it by adding a wildcard mapping in IIS. Simple to do, goto the properties of the website in IIS6, Then on the 'Home Directory' tab select the 'configuration' option for the applictation settings. Add a wildcard application map by selecting insert, and point it to the 'aspnet_isapi.dll' in your .net 4 installation directory (usually C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll). restart your website and all should work fine.

I know that there are other methods to solve this, but I found this one quickest and easiest to do, and as I have my BE set up on it's own website, don't see any other issues with haveing this set up this way. Hope this helps.

Aug 2, 2011 at 4:58 PM

@rockyroad: that works, but for virtual blogs you have to disable the option for verifying, that the file exists.

In additon, you have to modify /admin/_Layout.cshtml: replace everywehre Utils.RelativeWebRoot + "  with "~/ for the css- and js references:

        <link href="@Href("~/admin/style.css")" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" href="@Href("~/admin/colorbox.css")" type="text/css" />
        <link rel="stylesheet" href="@Href("~/admin/tipsy.css")" type="text/css" />

        <link rel="shortcut icon" href="@Href("~/pics/blogengine.ico")" type="image/x-icon" />
        <script src="@Href("~/Scripts/jquery.js")" type="text/javascript"></script>
        <script src="@Href("~/Scripts/jquery.cookie.js")" type="text/javascript"></script>
        <script src="@Href("~/Scripts/jquery-jtemplates.js")" type="text/javascript"></script>
        <script src="@Href("~/Scripts/json2.js")" type="text/javascript"></script>
        <script src="@Href("~/admin/admin.js")" type="text/javascript"></script>

Hope, that helps :-)

Aug 20, 2011 at 7:30 PM

I am having the same issue but am on IIS7. How do I fix this?

Aug 20, 2011 at 7:31 PM

@ Zaratustra,

I'm having the same issue you had but on IIS 7.0. How do I fix this?

Sep 18, 2011 at 12:41 PM

In IIS 7.5 you should remove request filtering for .cshtml files =>

Oct 4, 2012 at 10:51 PM

I just installed a fresh copy of BlogEngine.NET on IIS 6 (Windows Server 2003) and using a SQL Server 2005 db. After tweaking all the pre-requisite connection string settings in the web.config, setting up db user permissions, making sure the IIS_WPG had Read permissions to the main folder, and Write permissions to the App_Data/datastore folder, and setting this website up as ASP.NET 4.0 app, I was ready to test. Everything okay, except when trying to access any page calling the .cshtml files, received errors.

First, I tried adding the .cshtml Mime Type to IIS in general, but that only renders those files in straight html text format.

Next, I tried RockyRoad's approach listed above (then restarting IIS), but that just gave other errors.

Finally, as a variation on RockyRoad's approach, I did the following:


  1. Opened the website Properties
  2. click on Home Directory tab
  3. click on Configuration under Application Settings (made sure before though to create new dedicated AppPool)
  4. on Mappings tab, under Application Extensions, click ADD
  5. for Executable, enter Rocky's suggestion: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
  6. enter .cshtml for Extension

Restart IIS, and all should be good to go (worked for me).

Good luck.

(PS - BE developers, might want to fix this.. but thx for the great app)

Oct 18, 2012 at 12:19 PM
Edited Oct 18, 2012 at 12:20 PM


Did it your way and it worked beautifully. Many thanks.