简体   繁体   English

无法连接到远程计算机上的IIS服务器

[英]Can't connect to IIS server on remote machine

I have create iis server on remonte machine (Windows Server 2008 R2). 我在remonte机器(Windows Server 2008 R2)上创建了iis服务器。 This is my web.config: 这是我的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>

That is app.config for client application: 这是客户端应用程序的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>

I have add IIS server role to my remote machine, i set physical path to locate publised file from server application (publised from VS). 我已将IIS服务器角色添加到我的远程计算机,我设置了物理路径以从服务器应用程序(从VS发布)中定位发布的文件。 All of authentication i set to Disabled, only Anonymous Authentication is Enabled. 我将所有身份验证都设置为“禁用”,仅启用了“匿名身份验证”。

When i try connect to WSDL with SoapUi i go error: 当我尝试使用SoapUi连接到WSDL时出现错误:

Error getting response; java.net.UnknowsHostException: winserver2008

When i want connect to server with client app i must write username and password (administrator password don't work). 当我想使用客户端应用程序连接到服务器时,我必须输入用户名和密码(管理员密码无效)。 What i must do to can connect to server without authentication. 我必须要做的是无需身份验证即可连接到服务器。 What i should change on server(Windows server) or app.config to can connect correctly. 我应该在server(Windows server)或app.config上更改的内容才能正确连接。

Probably i have bed web/app.config 可能我有床web / app.config

Ok i found solution: On MS Server i change for now website connect as (in bassic setting) to administrator. 好的,我找到了解决方案:在MS Server上,我现在更改为网站(以默认设置)连接到管理员。 This is only for now and i change it later. 这仅是目前,我稍后将其更改。 Second i change web.config on server: 第二我更改服务器上的web.config:

  <system.serviceModel>
<bindings>
  <wsHttpBinding>
    <binding name="Binding" closeTimeout="00:05:00" sendTimeout="00:10:00">
      <security mode="None" />
      <reliableSession enabled="true" />
    </binding>
  </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" bindingConfiguration="Binding"
      contract="BandD.Serwis.SerwisISS.Interface.IDictionariesService" />
    <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
      name="mex" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="http://http://xxx.xxx.199.89:7833/Service/DictionariesService" />
      </baseAddresses>
      <timeouts closeTimeout="00:01:00" openTimeout="00:10:00" />
    </host>
  </service>
</services>

At last i change client app config: 最后,我更改客户端应用程序配置:

<system.serviceModel>
    <bindings>
        <wsHttpBinding>
            <binding name="WSHttpBinding_IDictionariesService">
                <reliableSession enabled="true" />
                <security mode="None" />
            </binding>
        </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" />
    </client>
</system.serviceModel>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM