そして私の出力ウィンドウはこれです:
------ ビルド開始: プロジェクト: WcfService、構成: Debug Any CPU ------ WcfService -> C:\Users\Zaid\Downloads\WcfService\WcfService\WcfService\bin\WcfService.dll --- --- 公開開始: プロジェクト: WcfService、構成: 任意の CPU をデバッグ ------ http:// someIP :xxxx に接続中... Web サイト '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