Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I configure IIS7 for .cshtml pages

Posted on 2010-09-20
4
Medium Priority
?
6,914 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 2000 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

Technology Partners: 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…
Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

609 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