0

我的输出窗口是这样的:

------ 构建开始:项目:WcfService,配置:调试任何 CPU ------ WcfService -> C:\Users\Zaid\Downloads\WcfService\WcfService\WcfService\bin\WcfService.dll --- --- 发布开始:项目:WcfService,配置:调试任何 CPU ------ 连接到 http:// someIP :xxxx... 无法创建网站“http:// someIP :xxxx”。服务器意外关闭了连接。========== 构建:1 成功或最新,0 失败,0 跳过 ========== ========== 发布:0 成功, 1 失败, 0 跳过 ==========

因为它在 IIS 服务器上完美运行。我在 Web.config 文件中的代码是:

    ![<?xml version="1.0"?>
<configuration>
  <system.serviceModel>
    <services>
      <service name="WcfService.Service1" behaviorConfiguration="serviceBehavior">
        <endpoint address="" binding="basicHttpBinding" contract="WcfService.IService1"/>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
        <host>
          <baseAddresses>
            <add baseAddress="http://14.200.162.57:6968/WcfService/Service1.svc"/>
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="serviceBehavior">
          <serviceMetadata httpGetEnabled="True"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
  <system.webServer>
    <directoryBrowse enabled="true"/>
  </system.webServer>
  <system.web>
    <compilation debug="true"/>
  </system.web>
</configuration>][1]

我的发布方法是:

FPSE

4

0 回答 0