Solved

How do I configure IIS7 for .cshtml pages

Posted on 2010-09-20
4
6,720 Views
Last Modified: 2012-05-10
Hello,

We're looking at using WebMatrix to develop a new website using the Razor syntax. I'm trying to get all the pieces in place and familiarize myself with everything before we start the project. I've successfully written an app on a developer pc, and set up our IIS so that we can use WebDeploy to push the code from the deleveloper pc to the Server. When I try to run the app, which works perfectly on the developer station, the IIS server returns a 404.3 error indicating that the default.cshtml cannot be served.

I have verified that the .dll for the project were correctly deployed to inetpub/wwwroot/bin directory on the server.
I have also added to the web.config, based on another post, a system.web section.
I have verified that .Net Framework 4 Client Profile, Extended are installed on the Server

Thanks
0
Comment
Question by:RCM01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 28

Expert Comment

by:strickdd
ID: 33725881
Verify your handler mappings include the proper mapping for .cshtml. (Select the website and click "Handler Mappings")
0
 
LVL 2

Author Comment

by:RCM01
ID: 33726344
I did check and there isn't a handler listed. Any idea of a handler to add. I can't find one listed.
0
 
LVL 14

Accepted Solution

by:
wolfman007 earned 500 total points
ID: 33726550
If you only have the .Net Framework 4 Client Profile then you will not have ASP.NET so you will be missing everything required to run ASP.NET 4.0

Which is why your handler mapping is missing.

The .NET Framework 4 Client Profile is a subset of the .NET Framework 4 that is optimized for client applications.

Features Not Included in the .NET Framework Client Profile
--------------------------------------------------------------------------------

The .NET Framework 4 Client Profile does not include the following features. You must install the .NET Framework 4 to use these features in your application:

ASP.NET

Advanced Windows Communication Foundation (WCF) functionality

.NET Framework Data Provider for Oracle

MSBuild for compiling

From

.NET Framework Client Profile
http://msdn.microsoft.com/en-us/library/cc656912.aspx

I would recommend uninstalling the .NET Framework Client Profile, and then installing the full version of the .NET Framework Version 4.0 and then trying your application again.
0
 
LVL 2

Author Comment

by:RCM01
ID: 33729218
Thanks wolfman007
That was it. I can't believe I missed that. We've been messing with the server so much, I didn't even think to check that.
One other thing that I had to do after installing .Net4 was to make sure that the website was using the application pool for .Net4. Mine wasn't and I received a 404.17 error when i tried to access it after installing the .Net4 framework.
Also, to save some headaches for anyone else who is trying WebMatrix, our IIS is behind a firewall and after several attempts at using FTPS to publish to it, I ended up using WebDeploy which requires that the WebManagementService be installed and running on the IIS server.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question