如何修复IIS 8中的Global.asax.cs解析器错误?

时间:2016-04-29 20:47:58

标签: c# asp.net iis iis-7 iis-8

我正在将Web应用程序从IIS 7迁移到IIS 8,并且遇到以下解析器错误:

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 'MyAppName.Global'.

Line 1:  <%@ Application Codebehind="Global.asax.cs" Inherits="MyAppName.Global" Language="C#" %>

该应用程序在IIS 7上编译并运行完美。我在IIS 8上配置的应用程序池与在IIS 7上配置相同,但应用程序不想为我编译。我试图删除“继承”,但这只是让我失去了一个错误的兔子洞。它看起来像我的应用程序的.dll在bin文件夹中应该是。我似乎也没有遗漏任何依赖。

另外,对于它的价值,这个Web应用程序在我使用Visual Studio 2010在本地计算机上运行时会起作用,但在使用Visual Studio 2013或更高版本时会出现Global.asax.cs错误。

1 个答案:

答案 0 :(得分:0)

我的项目输出路径已设置为&#34; bin / debug &#34;

尝试将其设置为&#34; bin &#34;