Home > DeveloperSection > Forums > How to consume webservices from asp.net mvc application
Takeshi Okada
Takeshi Okada

Total Post:89

Posted on    February-02-2015 10:27 PM

 ASP.Net Web Services  ASP.NET MVC 

 1 Reply(s)
 978  View(s)
Rate this:

There is a external web services.

I can invoke it from my winform application, but I cannot invoke it from my asp.net mvc web application.

Error message is like this :

System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://ihexds.nist.gov:9080/tf6/services/xdsrepositoryb that could accept the message. This is often caused by an incorrect address or SOAP action.

Is there anything to configure for my mvc web application to consume it?

Edit :

following is my code to invoke web services

WCF.Message msgInput, msgOutput;


msgOutput = WCF.Message.CreateMessage(WCF.MessageVersion.Soap12WSAddressing10, "");


string endpointName = GetRepositoryEndPointName();

XDSRepository.XDSRepositoryClient client = new XDSRepository.XDSRepositoryClient(endpointName);


msgOutput = client.ProvideAndRegisterDocumentSet(msgInput);

ezra heywood
ezra heywood

Total Post:145

Posted on    February-02-2015 10:46 PM

Judging from your comments, I think your problem is proxy server related. I think you're using a proxy server internal to your company. You have to specify in you web.config file that you want the dotnet code to use the credentials you're logged on with. Add this to your web.config and try again:


    <defaultProxy enabled="true" useDefaultCredentials="true" >



It's also possible that you're working with a .pac script. In that case you have to explicitly specify the proxy server like so:


    <defaultProxy useDefaultCredentials="true">

        <proxy proxyaddress="http://proxyserver:proxyport"/>



Don't want to miss updates? Please click the below button!

Follow MindStick