Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/274.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# 在局域网上访问wcf时未定义端点_C#_Wcf_Wcf Binding_Wcf Endpoint - Fatal编程技术网

C# 在局域网上访问wcf时未定义端点

C# 在局域网上访问wcf时未定义端点,c#,wcf,wcf-binding,wcf-endpoint,C#,Wcf,Wcf Binding,Wcf Endpoint,这是我的app.config代码: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neut

这是我的app.config代码:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <configSections>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
      <section name="HelloWorldService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" />
  </system.web>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>
    <services>
      <service name="HelloWorldService.HelloWorld">
        <endpoint address="" binding="basicHttpBinding" contract="HelloWorldService.IHelloWorld">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/HelloWorldService/HelloWorld/" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, 
          set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
          <!-- To receive exception details in faults for debugging purposes, 
          set the value below to true.  Set to false before deployment 
          to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

  <applicationSettings>
    <HelloWorldService.Properties.Settings>
      <setting name="conString" serializeAs="String">
        <value>Data Source=192.168.1.1,1433;Initial Catalog=Cock;Integrated Security = false;user=ok;password=123;</value>
      </setting>
    </HelloWorldService.Properties.Settings>
  </applicationSettings>
</configuration>

数据源=192.168.1.11433;初始目录=旋塞;综合安全=假;用户=ok;密码=123;
以下是我在访问wcf服务时遇到的错误

在http://*:8080/HelloWorld.svc上没有端点侦听 我可以接受这个消息。这通常是由地址不正确引起的 或SOAP操作


您似乎已经在8733端口上托管了服务

尝试使用下面的url访问服务

http://localhost:8733/Design_Time_Addresses/HelloWorldService/HelloWorld/HelloWorld.svc


基本上,我尝试在其他机器上访问该服务,以便使用ip地址而不是本地主机
http://localhost:8733/Design_Time_Addresses/HelloWorldService/HelloWorld.svc