我正在尝试开发使用WCF服务的Windows Phone应用程序。我按照这里的说法这样做了:
http://www.c-sharpcorner.com/UploadFile/raj1979/5280/
(当然我使用自己的数据库表)。问题是:
There was no endpoint listening at http://localhost:1708/Service1.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
InnerException为The remote server returned an error: NotFound.
Windows Phone应用程序中的ServiceReferences.ClientConfig
:
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService1" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:1708/Service1.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IService1" contract="ServiceReference1.IService1"
name="BasicHttpBinding_IService1" />
</client>
</system.serviceModel>
</configuration>
我不知道如何解决它。有任何想法吗 ?我尝试了很多来自该网站的答案,但没有一个工作
答案 0 :(得分:0)
服务器端支持Silverlight的WCF服务怎么样?它基于CustomBinding而不是basicHttpBinding。
答案 1 :(得分:0)
您必须将Windows Phone模拟器端点地址中的ServiceReferences.ClientConfig从localhost更改为 您计算机的名称。多数民众赞成:)它有效