My ASP.NET website calls the .net service from code in App_Code to get some information.
The web service is hosted at http://mydomain/ws/DirectoryService.asmx.
Whenever I deploy a website to any server, and then the same server that hosts the required .net service, everything works fine.
Whenever I deploy a site to the same web server hosting the web service, I get error 401.1.
I have the following binding defined in the web.config site:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="LR Directory ServiceSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://mydomain/ws/DirectoryService.asmx" binding="basicHttpBinding" bindingConfiguration="LR Directory ServiceSoap" contract="ExpertsServiceReference.LRDirectoryServiceSoap" name="LR Directory ServiceSoap" />
</client>
</system.serviceModel>
Apparently, the problem is that of binding. It cannot work from the same server. How to fix the problem?
P.S. web.config, - , , .
: : - .net , IIS, IP-, .
, - Windows, , .