SoapException server could not process request on ASMX web service on MVC site

I get an exception when trying to access the .asmx web service on the MVC site. I tried a lot of things, such as updating a web link in a console application and creating another quick application for testing, but cannot solve this problem. If I pull the URL out of the svc variable, I can go directly to it.

Exception Details

System.Web.Services.Protocols.SoapException Message = Server error failed to process the request. ---> Value cannot be null. Parameter Name: uriString
Source = System.Web.Services Actor = "Lang =" "Node =" "Role =" "
Stack traces: in System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse (SoapClientMessage message, WebResponse response, responseStream, Boolean asyncCall stream) in System.Web.Services.Protocols.SoapHttpClientProtocol.Invokeeg Method (String) .SendTrackerDataToClarity () in [REDACTED] .Reference.cs: line 78 in [REDACTED] .Program.Main (String [] args) in [REDACTED] .Program.cs: line 33
InnerException:

CODE CONNECTION CODE

var svc = new TrackerClarityService.ClarityIntegration() { Url = url, Credentials = new System.Net.NetworkCredential("user", "pass", "domain") }; svc.SendTrackerDataToClarity(); svc.Dispose(); 

Problem solved

The exception was the web service itself. There were some global variables that were not initialized directly through the .asmx call, which were initialized by the application itself.

Some simple variable checks in the web service and setting up what needs to be fixed fixed the problem.

+7
source share
3 answers

Problem solved

The exception was the web service itself. There were some global variables that were not initialized directly through the .asmx call, which were initialized by the application itself.

Some simple variable checks in the web service and setting up what needs to be fixed fixed the problem.

+2
source

If you use basic auth, in the past this solved my problems:

 NetworkCredential nc = new NetworkCredential(); nc.Domain = "domain" nc.UserName = "user" nc.Password = "pwd" Uri uri = new Uri(svc.Url); ICredentials credentials = nc.GetCredential(uri, "Basic"); svc.Credentials = credentials; 
+1
source

Captain here, this is a message when the WebReference was created but does not have a URL, or the given URL is null and the ist method is called. The origin of an empty URL may be a missing value in the app / web.config file.

-one
source

All Articles