.net WCF服务库和WCF服务应用的区别
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19354921/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Difference between WCF service library and WCF service application
提问by user2818487
I want to send a file from android to .NET server, will it make any difference if I use a WCF service application and WCF service library? (Further info: I am using IIS for hosting.)
我想从 android 发送一个文件到 .NET 服务器,如果我使用 WCF 服务应用程序和 WCF 服务库会有什么不同吗?(更多信息:我使用 IIS 进行托管。)
回答by Rahul Patel
you need to use a wcf service application project and host it over IIS. If you are creating a WCF client library, you need to add another project in your solution and add reference of service in it to host. If you want to keep separate projects for service library and hosting project so that you can host it on some other hosting application also, you can go for second approach. other wise WCF service Application is enough for IIS hosting.
您需要使用 wcf 服务应用程序项目并通过 IIS 托管它。如果要创建 WCF 客户端库,则需要在解决方案中添加另一个项目,并将其中的服务引用添加到宿主。如果您想为服务库和托管项目保留单独的项目,以便您也可以将其托管在其他托管应用程序上,则可以采用第二种方法。其他明智的 WCF 服务应用程序足以用于 IIS 托管。

