簡體   English   中英

ASP.NET MVC解析器錯誤

[英]ASP.NET MVC parser error

我在IIS 6.0網絡服務器上有一個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中設置路由。

預先感謝您的幫助。

若要使ASP.NET MVC在IIS中工作,您需要進行一些更改。 有這些描述的兩個或三個方法在這里 您可能想要第二種選擇,因為您說您無權訪問IIS。

服務器上是否安裝了ASP.Net MVC?

如果沒有,就不會全部丟失。 您可以右鍵單擊ASP.NET MVC引用,然后將“復制本地”設置為true。

我解決了這個問題。 虛擬目錄。 配置不正確。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM