【发布时间】:2017-02-25 14:48:37
【问题描述】:
我已经在远程机器(Windows Server 2008 R2)上创建了 iis 服务器。这是我的 web.config:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="Binding" closeTimeout="00:05:00" sendTimeout="00:10:00" />
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="DictionaryServiceBehaviors">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="DictionaryServiceBehaviors" name="BandD.Serwis.SerwisISS.Service.DictionariesService">
<endpoint address=""
binding="wsHttpBinding"
contract="BandD.Serwis.SerwisISS.Interface.IDictionariesService"
bindingConfiguration="Binding"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
<host>
<baseAddresses>
<add baseAddress="http://xxx.xxx.199.89:7833/BandD.Serwis.SerwisISS.Service/DictionariesService/"/>
</baseAddresses>
</host>
</service>
</services>
这是客户端应用程序的 app.config:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IDictionariesService" />
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://xxx.xxx.199.89:7833/Service/DictionariesService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IDictionariesService"
contract="DictionariesService.IDictionariesService" name="WSHttpBinding_IDictionariesService">
</endpoint>
</client>
我已将 IIS 服务器角色添加到我的远程计算机,我设置了物理路径以从服务器应用程序(从 VS 发布)定位已发布的文件。我将所有身份验证设置为禁用,仅启用匿名身份验证。
当我尝试使用 SoapUi 连接到 WSDL 时出现错误:
Error getting response; java.net.UnknowsHostException: winserver2008
当我想使用客户端应用程序连接到服务器时,我必须输入用户名和密码(管理员密码不起作用)。 我必须做什么才能在没有身份验证的情况下连接到服务器。我应该在服务器(Windows 服务器)或 app.config 上更改什么才能正确连接。
可能我有床 web/app.config
【问题讨论】:
-
这是其他人,因为我创建了 WCF 服务并托管它,但我无法连接到它。
标签: c# asp.net wcf iis windows-server-2008-r2