Website code cannot connect to soap service on the same server

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, , .

+1
2

. , , ( ) , IUSR: enter image description here

+1

, - - ​​, .

- ( 80, HTTP), - , .

, - 8080, :

address="http://mydomain:8080/ws/DirectoryService.asmx"
0

Source: https://habr.com/ru/post/1531377/


All Articles