0

I have create iis server on remonte machine (Windows Server 2008 R2). This is my 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:

  <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). All of authentication i set to Disabled, only Anonymous Authentication is Enabled.

When i try connect to WSDL with SoapUi i go error:

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.

Probably i have bed web/app.config

Newer
  • 79
  • 1
  • 11
  • Possible duplicate of [Host WCF service application on IIS](http://stackoverflow.com/questions/20674398/host-wcf-service-application-on-iis) – Mohammad Feb 26 '17 at 10:47
  • This is somthin others, becouse i have create WCF servis and i host it, but i can't connect to it. – Newer Feb 26 '17 at 13:32

1 Answers1

0

Ok i found solution: On MS Server i change for now website connect as (in bassic setting) to administrator. This is only for now and i change it later. Second i change web.config on server:

  <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>
Newer
  • 79
  • 1
  • 11