简体   繁体   中英

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; instead it's tagging "(1)" on the end.

Thus, when I try to change the IISExpress configuration manually, my changes are ignored.

./.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.

What could be causing this behaviour?

You could be conflicting with something in the master IISExpress config(s). Have a look in:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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