[英]IISExpress 7.5 has Internal Server Error, whereas IIS 7.5 works
我的web.config中有以下<handlers />
部分,用於為各種文件擴展名注冊ActiveReports 6處理程序:
<handlers accessPolicy="Read, Execute, Script">
<add name="ActiveReportsRpxHandler" path="*.rpx" verb="*" type="DataDynamics.ActiveReports.Web.Handlers.RpxHandler, ActiveReports.Web, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
<add name="ActiveReportsWebCacheHandler" path="*.ArCacheItem" verb="*" type="DataDynamics.ActiveReports.Web.Handlers.WebCacheAccessHandler, ActiveReports.Web, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
<add name="ActiveReportsCompiledReportHandler" path="*.ActiveReport" verb="*" type="DataDynamics.ActiveReports.Web.Handlers.CompiledReportHandler, ActiveReports.Web, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
</handlers>
當將應用程序池配置為在集成管道模式下使用.NET 4.0時,在Windows Server 2008 R2下的IIS 7.5下,此方法可以正常工作。
如果我嘗試在IIS Express 7.5下使用此確切的web.config運行相同的應用程序,則會收到以下令人困惑的錯誤消息:
**HTTP Error 500.19 - Internal Server Error**
**Config Error** Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ActiveReportsRpxHandler'
該錯誤消息沒有多大意義,尤其是如果我將唯一的“ name”屬性更改為其他內容,並且錯誤消息相應地進行了調整。 (不太可能在其他地方復制ActiveReportsRpxHandler6161616161
)
此IISExpress實例遵循以下applicationhost.config:
<site name="xxxxxxx" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Users\xxxxxxx\Documents\Visual Studio 2010\Projects\xxxxxxx\xxxxxxx" />
</application>
<application path="/AIMS" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Users\xxxxxxx\Documents\Visual Studio 2010\Projects\xxxxxxx\xxxxxxx" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:32150:localhost" />
</bindings>
</site>
有什么線索可以解決IIS Express 7.5嗎? 還是我在這里做一些愚蠢的事情?
也許處理程序已在配置文件鏈中的某個位置注冊。 在http://msdn.microsoft.com/zh-cn/library/ms178685(v=vs.100).aspx上查看有關它的詳細信息。 或者,您可以嘗試
<handlers accessPolicy="Read, Execute, Script">
<remove name="ActiveReportsRpxHandler"/>
<add name="ActiveReportsRpxHandler" path="*.rpx" verb="*" type="DataDynamics.ActiveReports.Web.Handlers.RpxHandler, ActiveReports.Web, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
<add name="ActiveReportsWebCacheHandler" path="*.ArCacheItem" verb="*" type="DataDynamics.ActiveReports.Web.Handlers.WebCacheAccessHandler, ActiveReports.Web, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
<add name="ActiveReportsCompiledReportHandler" path="*.ActiveReport" verb="*" type="DataDynamics.ActiveReports.Web.Handlers.CompiledReportHandler, ActiveReports.Web, Version=6.0.1797.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
</handlers>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.