Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ConfigurationErrorsException: This element is not currently associated with any context

I am getting strange exception which seems to me is related to WCF configuration object but what is wrong is completely unclear to me

A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll

Additional information: This element 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

like image 515
Captain Comic Avatar asked Aug 19 '11 07:08

Captain Comic


1 Answers

Looks like a lot of other people have solved this problem just by disabling breaking on this exception - see here, here, here and here, for example. Nobody seems to have any idea what use this exception is, though.

I should add that I had to add the exception manually to my Debug/Exceptions list - it didn't appear by default.

like image 64
Shaul Behr Avatar answered Oct 24 '22 12:10

Shaul Behr