【问题标题】:How to find out where a handler mapping is being inherited from in IIS如何找出从 IIS 中继承处理程序映射的位置
【发布时间】:2013-04-30 13:56:09
【问题描述】:

这是我的问题。我正在安装我工作的公司在 5.0.4 版 DotNetNuke 安装中开发的模块。

.dnn 清单文件有一个包含此添加的节点部分

<node path="/configuration/system.webServer/handlers" 
    action="update" key="name" collision="overwrite">
    <add name="svc-Integrated" verb="*" path="*.svc"
     type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=1111111111111111" resourceType="Unspecified" 
        preCondition="integratedMode"/>
</node>

DNN 应用程序的 web.config 尚未在 configuration/system.webServer/handlers 部分添加此内容,因此将其添加到 web.config。

然后在尝试加载网站时,我收到一条错误消息:

Cannot add duplicate collection entry of type 'add' with 
    unique key attribute 'name' set to 'svc-Integrated'

我花了一些时间寻找 svc-Integrated 的重复条目可能来自哪里,最后发现在 IIS 中查看 DNN Web 应用程序所在的网站。它有一个 Handler Mappings 部分,并且 svc-Integrated 标记位于网站中,Entry TypeInherited

我试图找出 svc-Integrated 处理程序是从哪里继承的。

编辑:我在 machine.configweb 上查看了 c:\windows\Microsoft.NET\Framework\v2.0.50727\CONFIG .config 文件,并且根本没有名称为“svc-Integrated”的条目。我尝试在 machine.configweb.config 中查看 Framework64 文件夹和 v4.* 文件夹,但没有 svc - 集成在 ANY 的这些位置中,因此我不知道 IIS 从何处获取此处理程序定义:(

【问题讨论】:

    标签: asp.net asp.net-mvc iis dotnetnuke


    【解决方案1】:

    当 Handler 的 Entry TypeInherited 时,您可以通过在 Connections中上一层了解它的继承位置> Internet Information Services (IIS) Manager 左侧的面板,然后双击 Server Components 组中的 Handler Mappings .在该层上找到相同的 Handler,并查看它是否是从另一个层级继承而来的,或者它是否是该层级的本地。

    我发现 IIS7 中机器的处理程序映射来自 "C:\Windows\System32\inetsrv\config\applicationHost.config"

    technet.microsoft.com 上的[This article] 帮助我找到了我在其中找到本地条目的级别的配置文件,并解释了配置继承级别。

    Machine.config。该文件位于 %windir%\Microsoft.NET\Framework\framework_version\CONFIG。

    .NET Framework 的根 Web.config。该文件位于 %windir%\Microsoft.NET\Framework\framework_version\CONFIG。

    ApplicationHost.config。此文件位于 %windir%\system32\inetsrv\config。

    这就是我试图找到的 svc-Integrated 配置条目的位置。

    我最终只是在我的应用程序的 Handler Mappings 中右键单击 svc-Integrated 处理程序映射,然后单击“删除”。这解决了我的应用程序在尝试覆盖处理程序映射时遇到的冲突。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-02-21
      • 2021-09-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-11
      • 1970-01-01
      相关资源
      最近更新 更多