ASP.NET MVC parser error
I have an asp.net mvc application on IIS 6.0 webserver. The problem is: i get a parser error. I tried with the default sample asp.net mvc project but i get the same error:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific p开发者_如何学Goarse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'SampleApp._Default'.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SampleApp._Default" %>
Line 2:
Line 3: <%-- Please do not delete this file. It is used to ensure that ASP.NET MVC is activated by IIS when a user makes a "/" request to the server. --%>
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
I dont have access to the iis because it is running on hosting srv. I set the routing in the global.asax.
Thank you in advance for your help.
To make ASP.NET MVC work in IIS, you need to change a couple of things. There are two or three methods which are described here. You might want to go for the second option, as you said you have no access to IIS.
Is ASP.Net MVC installed on the server?
If not, not is all lost. You can right click on the ASP.NET MVC references and set "Copy Local" to true.
I fixed the problem. The virtual dir. was not configured correctly.
精彩评论