Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Can';无法连接到远程计算机上的IIS服务器_C#_Asp.net_Wcf_Iis_Windows Server 2008 R2 - Fatal编程技术网

C# Can';无法连接到远程计算机上的IIS服务器

C# Can';无法连接到远程计算机上的IIS服务器,c#,asp.net,wcf,iis,windows-server-2008-r2,C#,Asp.net,Wcf,Iis,Windows Server 2008 R2,我已在远程计算机(Windows server 2008 R2)上创建iis服务器。这是我的web.config: <system.serviceModel> <bindings> <wsHttpBinding> <binding name="Binding" closeTimeout="00:05:00" sendTimeout="00:10:00" /> </wsHttpBinding> </binding

我已在远程计算机(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>
当我想用客户端应用程序连接到服务器时,我必须写用户名和密码(管理员密码不起作用)。 我必须做什么才能在没有身份验证的情况下连接到服务器。我应该在服务器(Windows server)或app.config上更改什么才能正确连接

可能我有bed web/app.config

好的,我找到了解决方案: 在MS服务器上,我暂时将网站连接为(在BASIC设置中)管理员。这只是暂时的,我以后再改。 第二,我更改服务器上的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>

最后,我更改了客户端应用程序配置:

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

其他人可能会重复这一点,因为我创建了WCF服务并托管了它,但我无法连接到它。
  <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>
<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>