locked
spent the entire day.... RRS feed

  • Question

  • User692055318 posted

    On trying to set up IIS 7 and .cshtml pages. Still not working. I still do not have it working. Does it usually take 8 hours to set up IIS? I have tried every post I could find. I am looking at the handler mappings and when I change cshtml-Integrated-4.0 from System.Web.HttpForbiddenHandler to System.Web.DefaultHttpHandler I get the mesage "The DefaultHttpHandler.BeginProcessRequest method is not supported by IIS integrated pipeline mode." So I put it back and I get " This type of page is not served." Seriously? Is there no way to make this work? 

    Yes I have web pages installed

    Yes I have the WPI installed and set up IIS per the Recommended Server Configuration for Web Hosting Providers which set up everything.

    Yes I checked the application pools and made sure they were using the correct one and it was pointing to the correct .net version of 4.0.30319

    Yes I checked the identity and make sure it was a privileged user.

    I am assuming that this only works locally which is going to be a problem since I need to move this to the intranet web server.

    Thanks for any suggestions that aren't any of the ones above.

    Laura

    Monday, December 23, 2013 4:05 PM

Answers

  • User692055318 posted

    I found it. This is the most bizzare thing I have ever seen! This will only work if you put any .cshtml file in the web root. If I remove the .cshtml from the web root and try to invoke any from a subdirectory it will not work.

    What is that all about?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 24, 2013 11:07 AM

All replies

  • User1563932795 posted

    Hi Laura, if your website is MVC try changing/adding this setting to true in your web.config:

    <add key="webpages:Enabled" value="true" />

    If that doesn't work try Add Deployable Dependencies... as described here:

    http://stackoverflow.com/questions/10441568/do-i-need-to-install-mvc-3-4-on-web-server-to-run-mvc-application

    If you are not using MVC or if those don't help there is some good tips on IIS 7 setup here: http://mvolo.com/troubleshoot-iis7-errors-like-a-pro/

    Monday, December 23, 2013 7:25 PM
  • User692055318 posted

    Thanks Darren,

    I should have mentioned. I tried that to to no effect. I should also mention. I have 3 web configs one at the root of the default website, one at the folder level and one at the site.

    Laura

    Tuesday, December 24, 2013 7:31 AM
  • User692055318 posted

    I found it. This is the most bizzare thing I have ever seen! This will only work if you put any .cshtml file in the web root. If I remove the .cshtml from the web root and try to invoke any from a subdirectory it will not work.

    What is that all about?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 24, 2013 11:07 AM