In my company we have set up an Active Domain Controller on a windows server 2008, and another windows server to store our files on and install TFS and SQL Server, and we have several client machines on one domain.

I have a multi layered windows application, one layer is a webservice project including "AppWebService.asmx". The web service is a set of functions that read/write to an SQL Server located on a windows server 2012.

As a test, I published (File System) the webservice project, took the output files and stored them in IIS on our server, then installed the windows app on the server and it run well using the webservice published.

Now I want to install the windows app on all domain machines and make them use the same webservice located in IIS on our server, but I keep getting the following error:

There wasw no endpoint listening at http://localhost/App/AppWebService.asmx that could accept the message. This is often caused by an incorrect address or SOAP action.

Although if on the server I surf to "http://localhost/App/AppWebService.asmx" I can see the methods included in it.

This is my App.config (in the main project of the windows app):

<?xml version="1.0" encoding="utf-8" ?>
        <add name="App.Properties.Settings.AppConnectionString"
            connectionString="Data Source=PRODUCTION;Initial Catalog=AppDB;User ID=ui;Password=mypassword"
            providerName="System.Data.SqlClient" />
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
                <binding name="AppWebServiceSoap" maxReceivedMessageSize="2147483647"/>
        <!--<endpoint address="http://localhost:4550/AppWebService.asmx"
            binding="basicHttpBinding" bindingConfiguration="AppWebServiceSoap"
            contract="com.app.AppWebServiceSoap" name="AppWebServiceSoap" />-->
      <endpoint address="http://localhost/App/AppWebService.asmx"
            binding="basicHttpBinding" bindingConfiguration="AppWebServiceSoap"
            contract="com.app.AppWebServiceSoap" name="AppWebServiceSoap" />

And this is the Web.Config in the webservice project:

<?xml version="1.0" encoding="utf-8"?>
  For more information on how to configure your ASP.NET application, please visit
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    <modules runAllManagedModulesForAllRequests="true"/>

So what should I do to make my app runs and able to access the webservice on IIS from domain machines as well as it is able to do it on the server? (IIS features and roles are all enabled)

1 Answer 1


Localhost is exactly that, the local host. It works when testing it on the server itself because the server is connecting to itself via localhost. When testing it from another machine you need to connect via the server ip address or name, not localhost. When using localhost, each machine will try connecting to itself, which of course won't work.

  • Glad to help...
    – joeqwerty
    Dec 11, 2015 at 16:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .