2010-02-05 83 views
0

我在IIS 6.0 webserver上有一个asp.net mvc应用程序。问题是:我得到一个解析器错误。我尝试用默认的样品asp.net mvc的项目,但我得到了同样的错误:ASP.NET MVC分析器错误

Parser Error 
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse 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 

我没有访问IIS,因为它是在托管SRV运行。我在global.asax中设置了路由。

非常感谢您的帮助。

+0

究竟是什么错误? – jao 2010-02-05 18:19:21

回答

0

我解决了这个问题。虚拟目录。未正确配置。

+0

这个答案可以使用一些细节。究竟是什么配置不正确? – 2014-03-18 23:18:45

0

要使ASP.NET MVC在IIS中工作,您需要更改几件事情。有两种或三种方法描述为here。您可能想要进行第二种选择,正如您所说的,您无权访问IIS。

+0

这正是我所做的。 – Peter 2010-02-05 18:52:42

0

ASP.Net MVC是否安装在服务器上?

如果没有,不是全部都丢失了。您可以右键单击ASP.NET MVC引用并将“复制本地”设置为true。

+0

MVC的dll不在GAC中,但我上传到bin目录。 – Peter 2010-02-05 18:51:52