Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error updating service reference

When trying to update a service reference in a class library (VS2013), i get the following error.

"The configuration for the service reference could not be updated due to the following issue: An error occurred creating the configuration section handler for system.serviceModel/bindings: AssemblyResolveEvent handlers cannot return Assemblies loaded for reflection only."

This same error happens when i try to delete the reference as well.

Any help in sorting would be greatly appreciated.

like image 363
markusrambarkus Avatar asked May 20 '14 13:05

markusrambarkus


People also ask

How do you update a service reference?

To update a service reference In Solution Explorer, right-click the service reference and then click Update Service Reference. A progress dialog box displays while the reference is updated from its original location, and the service client is regenerated to reflect any changes in the metadata.

How to update web service reference in asp net?

In Solution Explorer, open your project's App_WebReferences folder and click the node for the Web reference you want to update. Right-click the reference and click Update Web Reference. The new files for the XML Web service are downloaded to your project.


2 Answers

I've had the same issue after updating to VS2013 Update 2.

I've solved the issue by temporarily cutting the whole system.serviceModel section out of web.config, pasting it somewhere else like Notepad. Then, I've saved the web.config without the service model section. Then, I was able to update the service reference successfully. After updating the service reference, I've pasted the service model section back to web.config and it worked successfully.

like image 73
Can Poyrazoğlu Avatar answered Nov 10 '22 07:11

Can Poyrazoğlu


I was able to work around this similarly to Can by temporarily removing the extensions element of the system.serviceModel section and any associated extension elements. In my case the extensions were Azure Service Bus extensions.

like image 34
burton Avatar answered Nov 10 '22 05:11

burton