发布到IIS服务器后无法加载类型'namespace._default'

时间:2015-03-30 19:39:47

标签: c# asp.net iis

让我的应用运行起来。我将它发布到 IIS 并收到以下错误:

Server Error in '/Library' 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 'go._default'.

Source Error: 


Line 1:  <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="go._default" %>
Line 2:  
Line 3:  

Source File: /library/go/default.aspx    Line: 1 

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009

如何解决此错误?仅供参考:我只有文件系统访问此服务器。我将其从VS发布到\\Servername\Library\go位置。

编辑:我忘了提到我确实检查了bin文件夹,其中有三个文件,两个.dll用于我通过nuget添加的包,以及一个{{1 }}

1 个答案:

答案 0 :(得分:0)

当我使用发布到较大网站的子文件夹时,上传的bin文件放在\Library\go\bin中,但服务器正在\Library\bin中查找它们。 / p>

创建\Library\bin文件夹并复制.dlls解决了问题。如果有人想评论如何重写Inherits=中的路径以将其保留在\Library\go\bin文件夹中,那将不胜感激。