当我在Visual Studio 10中运行项目时,我一直收到以下错误。我从其他人那里得到了这个项目,我必须扩展它,所以我很确定它与路由值有关,因为它来自另一台电脑。但是我不知道该怎么做。它以前工作,但后来我尝试连接到数据库(通过创建一个新用户),然后这开始发生。
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 :(得分:0)
解决了它。结果是使用Chrome网络浏览器,如果您登录到打开多个标签的mvc应用程序,系统会感到困惑。我开始使用Internet Explorer,它会自动阻止Visual Studio中的调试器阻止这种情况发生。