The location path in the host.config application does not map to the assembly

I am having a strange problem with an ASP.NET WebAPI C # project where the attribute value <location path="example.namespace.webapi">in applicationhost.configdoes not map to the fully qualified name of the assembly; instead, it marks "(1)"at the end.

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

./ versus/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 tried deleting partitions <location>and forcing VS2015 to restore the configuration by changing the value of the property Anonymous Authentication, but it just creates a location path with (1), even if the corresponding partition doesn’t exist.

What could be causing this behavior?

+4
1

, - IISExpress. :

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

Source: https://habr.com/ru/post/1659711/


All Articles