ConfigurationErrorsException: this item is not currently associated with any context

I get a strange exception, which, it seems to me, is related to the WCF configuration object, but what’s wrong is completely unclear to me

The first random error like "System.Configuration.ConfigurationErrorsException" occurred in System.Configuration.dll

Additional Information: This item is not currently associated with any context.

ServiceModelSectionGroup serviceConfigs = ServiceModelSectionGroup.GetSectionGroup(config); ServiceElement serviceConfig = serviceConfigs.Services.Services[serviceType.ToString()]; << here exception 

enter image description here

+8
c # exception configuration wcf
source share
2 answers

It seems that many other people have solved this problem simply by turning off the violation of this exception - see here , here , here and here , for example. Nobody seems to know what an exception is.

I have to add that I had to add the exception manually to my Debug / Exceptions list - it did not display by default.

+14
source share

I was able to fix this problem by deleting everything in the bin folder and restoring the solution.

0
source share