我创建了一个WCF Service Library
inVS2012
并将其加载到我的本地IIS
.
我的客户端是一个Windows-Mobile 6.5
设备,客户端的配置文件是使用netcfsvcutil.exe
. 在调试过程中一切正常,但是当我将服务上传到外部时,即使从外部 URL 生成文件,IIS
我仍然会收到异常。这是位于远程服务器上的文件:There was no endpoint listening...
netcfsvcutil.exe
web.config
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="TestBinding" receiveTimeout="00:01:00" sendTimeout="00:01:00">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="MyService.CollectionService">
<endpoint address="" binding="basicHttpBinding" contract="MyService.ICollectionService" bindingConfiguration="TestBinding">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/MyService/CollectionService/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="True" />
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
并且客户端端点是这样生成的:
public static System.ServiceModel.EndpointAddress EndpointAddress =
new System.ServiceModel.EndpointAddress("http://1.2.3.4/MyService/MyService.CollectionService.svc");
当我将服务上传到外部时,我没有进行任何配置更改IIS
,我只是将文件从一个虚拟目录复制并粘贴到另一个。可能有帮助的一些事情是在没有任何超时的情况下引发异常。