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" ?> <configuration> <configSections> </configSections> <connectionStrings> <add name="App.Properties.Settings.AppConnectionString" connectionString="Data Source=PRODUCTION;Initial Catalog=AppDB;User ID=ui;Password=mypassword" providerName="System.Data.SqlClient" /> </connectionStrings> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="AppWebServiceSoap" maxReceivedMessageSize="2147483647"/> </basicHttpBinding> </bindings> <client> <!--<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" /> </client> </system.serviceModel> </configuration>
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 http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> </system.web> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration>
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)