简体   繁体   English

applicationhost.config中的位置路径未映射到程序集

[英]Location path in applicationhost.config not mapping to assembly

I'm having a strange issue with an C# ASP.NET WebAPI project where the <location path="example.namespace.webapi"> attribute value in applicationhost.config is not mapping to the fully qualified name of the assembly; 我在与一个C#ASP.NET的WebAPI项目,其中一个奇怪的问题<location path="example.namespace.webapi">在属性值applicationhost.config不映射到所述组件的完全合格的名称; instead it's tagging "(1)" on the end. 相反,它在最后标记"(1)"

Thus, when I try to change the IISExpress configuration manually, my changes are ignored. 因此,当我尝试手动更改IISExpress配置时,我的更改将被忽略。

./.vs/applicationhost.config : ./.vs/applicationhost.config

<location path="example.namespace.webapi">
    <!-- VS2015/IIS is ignoring this section -->
    ...
</location>

<location path="example.namespace.webapi(1)">
    <!-- VS2015/IIS creates and uses this section -->
    ...
</location>

I've tried deleting both <location> sections, and forcing VS2015 to regenerate the configuration by changing the Anonymous Authentication property value, but it simply creates the location path with a (1) , even when the proper section doesn't exist. 我尝试删除两个<location>部分,并强制VS2015通过更改Anonymous Authentication属性值来重新生成配置,但它只是创建了带(1)的位置路径,即使正确的部分不存在也是如此。

What could be causing this behaviour? 什么可能导致这种行为?

You could be conflicting with something in the master IISExpress config(s). 您可能与主IISExpress配置中的某些内容发生冲突。 Have a look in: 看看:

C:\Program Files\IIS Express\AppServer\applicationhost.config
C:\Program Files (x86)\IIS Express\AppServer\applicationhost.config

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Applicationhost.config未更新 - Applicationhost.config not updated 以编程方式解锁applicationHost.config中的部分 - Unlock section in applicationHost.config programmatically C# applicationHost.config 未找到但存在 - C# applicationHost.config not found but exists IIS CLI为我的项目生成带有site的applicationhost.config - IIS CLI generate applicationhost.config with site for my project Microsoft.Web.Administration-ApplicationHost.Config中带有httpError的NullReferenceException - Microsoft.Web.Administration - NullReferenceException with httpErrors in ApplicationHost.Config 由于applicationHost.config无效,.Net构建失败 - .Net build is failing due to invalid applicationHost.config 如何将IIS ApplicationHost.config文件解析为.Net对象? - How to parse the IIS ApplicationHost.config file into .Net objects? ASP.NET 核心 web.config requestFiltering 不覆盖 applicationhost.config - ASP.NET Core web.config requestFiltering not overriding applicationhost.config 初始化 applicationhost.config 文件失败。 找不到 IIS Express - Initializing the applicationhost.config file failed. Cannot find IIS Express applicationHost.config 错误:由于 IIS 共享配置的权限不足,无法写入配置文件 - applicationHost.config Error: Cannot write configuration file due to insufficient permissions with IIS shared configuration
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM