ASP.NET 2.0找不到资源对象-正在将网站迁移到承载SharePoint 2007的生产服务器

ASP.NET 2.0找不到资源对象-正在将网站迁移到承载SharePoint 2007的生产服务器,asp.net,iis-7,sharepoint-2007,Asp.net,Iis 7,Sharepoint 2007,从开发服务器迁移到生产服务器(IIS7+WindowsServer2008R2)时,我面临着一个恼人的问题 我们有一个定制的ASP.NET 2.0,它利用不同语言的资源文件 所有这些都可以在开发中正常工作,但在同样承载SharePoint 2007的生产服务器上失败。错误如下。但为了回答显而易见的问题,键“style”确实存在于App_GlobalResources目录下的resx中 Server Error in '/' Application. -----------------------

从开发服务器迁移到生产服务器(IIS7+WindowsServer2008R2)时,我面临着一个恼人的问题

我们有一个定制的ASP.NET 2.0,它利用不同语言的资源文件

所有这些都可以在开发中正常工作,但在同样承载SharePoint 2007的生产服务器上失败。错误如下。但为了回答显而易见的问题,键“style”确实存在于App_GlobalResources目录下的resx中

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: The resource object with key 'style' was not found.

Source Error: 


Line 21:     <asp:ContentPlaceHolder ID="HeadContent" runat="server">
Line 22:     </asp:ContentPlaceHolder>
Line 23:       <link runat="server" id="aa"  rel="stylesheet" href='<%$ Resources:applang,style %>'
Line 24:         type="text/css" />   
Line 25:     <style type="text/css">


Source File: /Applications/MyApp/Site.master    Line: 23 
“/”应用程序中出现服务器错误。 -------------------------------------------------------------------------------- 分析器错误 描述:解析服务此请求所需的资源时出错。请查看以下特定的解析错误详细信息,并适当修改源文件。 分析器错误消息:找不到键为“style”的资源对象。 源错误: 第21行: 第22行: 第23行: 第25行: 源文件:/Applications/MyApp/Site.master行:23
我们做错了什么?该站点是在Classic.NET AppPool(.NET 2.0和Classic)下配置的。

最后,这证明是在服务器上的IIS中进行的错误设置,默认网站在不同目录下搜索编译资源。我不太清楚以前的开发人员是如何做到这一点的,但解决了这个问题后,会重新指向默认网站以查看正确的虚拟目录。

当我看到这个错误时,通常是因为有人从Outlook粘贴内容并在配置文件中获取“智能报价”。这将是无效的,您将得到分析错误。我会检查一下情况是否如此——首先尝试在记事本上粘贴,以确保没有特殊字符漏掉。
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: The resource object with key 'style' was not found.

Source Error: 


Line 21:     <asp:ContentPlaceHolder ID="HeadContent" runat="server">
Line 22:     </asp:ContentPlaceHolder>
Line 23:       <link runat="server" id="aa"  rel="stylesheet" href='<%$ Resources:applang,style %>'
Line 24:         type="text/css" />   
Line 25:     <style type="text/css">


Source File: /Applications/MyApp/Site.master    Line: 23