.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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 12:30:44  来源:igfitidea点击:

Difference between WCF service library and WCF service application

.netwcfiis

提问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 托管。

回答by Thilina H

A service application includes a website host already setup for you. A service library is a library of services that a host can reference and startup.

服务应用程序包括已为您设置的网站主机。服务库是主机可以引用和启动的服务库。

Hereyou can find the best explanation

在这里你可以找到最好的解释