我的ASP.NET网站呼吁在App_Code文件的代码的.NET服务来获取一些信息。一个网站的代码无法连接到一个SOAP服务在同一台服务器
Web服务在http://mydomain/ws/DirectoryService.asmx
主持。
每当我之外的任何服务器上部署一个网站那么必要的.NET服务托管在同一台服务器,一切正常良好。
每当我部署网站相同的Web服务器,web服务托管在,我得到401.1错误。
我有以下的结合在网站的web.config中定义:
<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>
显然,问题在于结合。它不能在同一台服务器内工作。如何解决问题?
P.S.如果我在web.config中注释掉绑定,则网站加载正常,但它不完全正常工作,因为它无法连接到服务。
UPDATE:一个非常重要的细节:我的目标网站和一个.net服务都位于同一个服务器上,同一个IIS,但绑定到不同的外部IP地址,所以问题不能在网络访问字段。
而且,如果我设置从匿名网站的身份验证模式到Windows,一切工作正常,但我需要提供一个窗口,每个我访问该网站时creds。
嗯,'bypassProxyOnLocal =“假“'? –
401.1表示服务正在运行,但您无法进行身份验证。证书是否正确传递? –
@Chris - 试图将其设置为true - 无结果。 –