简体   繁体   English

Windows Phone中的WCF服务

[英]WCF service in windows phone

I don't know to decide, what should I use in windows phone app. 我不知道要决定,我应该在Windows Phone应用中使用什么。 WCF service library or WCF service application? WCF服务库还是WCF服务应用程序? I've tried to create the first one, but I can't add reference to it. 我尝试创建第一个,但是无法添加对它的引用。 So i've tried add service reference, but no service found. 因此,我尝试添加服务参考,但未找到服务。 Second one WCF service app is working, add service reference find my service and i can work with it, but it's hosted on development server. 第二个WCF服务应用程序正在运行,添加服务参考可以找到我的服务,我可以使用它,但是它托管在开发服务器上。 Please, give me good advice, should I use first choice or second choice? 请给我个好的建议,我应该选择第一还是第二选择? I have to note, that these service will be used my phone app and web app too. 我必须注意,这些服务也将用于我的电话应用程序和Web应用程序。 thanks 谢谢

EDIT: Finally I gonna use WCF service application. 编辑:最后,我将使用WCF服务应用程序。 When I click discover and go, I get this error: 当我单击发现并运行时,出现此错误:

The type 'WcfNotificationService.Service1', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

If you want to host a WCF Service in IIS, you should use "WCF Service Application". 如果要在IIS中托管WCF服务,则应使用“ WCF服务应用程序”。 The library is just a service library, without any hosting. 该库只是一个服务库,没有任何托管。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM