开发者

BindingFailure when calling Service Reference method

开发者 https://www.devze.com 2023-04-03 05:51 出处:网络
My .NET 4.0 project contains a few 开发者_StackOverflow社区service references. One of them if giving problems when calling a service method.

My .NET 4.0 project contains a few 开发者_StackOverflow社区service references. One of them if giving problems when calling a service method. It's a SOAP service and when testing with SoapUI i can connect to it and execute methods successfully.

This is the .NET code:

var client = new MyNamespace.MyProject.MyServiceReference.MyServiceClient();
client.Open();

var response = client.SaveApplication(request);

client.Close();

Opening the connection works fine, but when i call the SaveApplication method, i get the following exception:

The assembly with display name 'MyNamespace.MyProject.XmlSerializers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 2. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'MyNamespace.MyProject.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

I really have no clue to what causes this exception... Please help :)


Found the answer here: How do I fix a Binding Failure in Soap? I had to turn off MDA BindingFailure exceptions in Visual Studio because i don't want to add the service as Web Reference.

0

精彩评论

暂无评论...
验证码 换一张
取 消