"Global item configuration" already declared "in web configuration

I get an annoying creation warning in my web configuration. I have about 40 warnings. Global element '{element name}' has already been declared for all elements in my web configuration. This is for the WCF service that I am creating in the same solution as the MVC website. I suspect the problem is that the WCF service is referencing the MVC assembly (to reflect some metadata), and both web configuration files are somehow included as a result of duplicate elements. The search only revealed different problems than the one I have.

Is there a way to fix this problem, perhaps by telling the configuration manager to ignore the configuration file in the specified MVC assembly?

EDIT. When I tried to maximally separate my different dependencies, my warning messages disappeared after turning off the computer.

+2
source share
1 answer

Separate the service from your host. IE has its service in a more or less clean build, and then references it from your console host, your wcf host, the host of your Windows server, and your mvc host projects separately.

+3
source

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


All Articles