这是我的web.config文件:
<services>
<!--Note: the service name must match the configuration name for the service implementation.-->
<service name="_1C_GBCService.GBCService" behaviorConfiguration="GBCServiceBehavior">
<endpoint address=""
binding="wsHttpBinding"
contract="_1C_GBCService.IGBCService" />
<!--Add the following endpoint.
Note: your service must have an http base address to add this endpoint.-->
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="GBCServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<!--policyVersion="Policy15"-->
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
答案 0 :(得分:0)
这可能是因为您还没有为您的终端定义任何地址,如下所示
<endpoint address="" <-- Here
binding="wsHttpBinding"
contract="_1C_GBCService.IGBCService" />
定义终端的地址
<service name="_1C_GBCService.GBCService" behaviorConfiguration="GBCServiceBehavior">
<endpoint address="GBCService"
binding="wsHttpBinding"
contract="_1C_GBCService.IGBCService" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/"/>
</baseAddresses>
</host>
......
</service>
</services>
然后,您可以尝试使用URL http://localhost:8080/