繁体   English   中英

IISExpress 7.5出现内部服务器错误,而IIS 7.5起作用

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM