2011-08-23 115 views
0

当我在Visual Studio 10中运行项目时,我不断收到以下错误。我从其他人那里获得了该项目,并且必须展开它,所以我很确定它与路由值有关,因为它来自另一台计算机。但我不知道该怎么做。它以前工作,但后来我试图连接到数据库(通过创建一个新用户),然后开始发生。解析器错误消息:无法加载类型'MYAPP.WebUI._Default'

Server Error in '/' Application. 
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 'MYAPP.WebUI._Default'. 
Source Error: 
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MYAPP.WebUI._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. --%> 
Source File: /Default.aspx Line: 1 

的Default.aspx.cs文件:

public partial class _Default : Page 
{ 
    public void Page_Load(object sender, System.EventArgs e) 
    { 
     // Change the current path so that the Routing handler can correctly interpret 
     // the request, then restore the original path so that the OutputCache module 
     // can correctly process the response (if caching is enabled). 

     string originalPath = Request.Path; 
     HttpContext.Current.RewritePath(Request.ApplicationPath, false); 
     IHttpHandler httpHandler = new MvcHttpHandler(); 
     httpHandler.ProcessRequest(HttpContext.Current); 
     HttpContext.Current.RewritePath(originalPath, false); 
    } 
} 

请帮助。

回答

0

解决了它。结果使用Chrome浏览器,如果您打开多个选项卡登录到mvc应用程序,系统会感到困惑。我开始使用Internet Explorer,它阻止了Visual Studio中的调试器自动防止这种情况发生。

相关问题