SVC文件和WCF项目之间的关系? [英] Relationship between SVC files and WCF projects?

查看:98
本文介绍了SVC文件和WCF项目之间的关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建WCF项目时,默认成员文件只是普通的csharp类文件,而不是svc文件. WCF项目是否需要svc文件?什么时候应该使用它们?

When creating a WCF project, the default member files are just ordinary csharp class files, rather than svc files. Are svc files required with a WCF project? When should they be used?

推荐答案

.svc文件在IIS中托管WCF服务时使用.

.svc files are used when you host your WCF service in IIS.

此处 IIS中有一个处理.svc文件的模块.实际上,是ASPNET ISAPI模块,它将对.svc文件的请求转交给已为ASPNET配置的处理程序工厂类型之一,在这种情况下

There's a module within IIS that handles the .svc file. Actually, it is the ASPNET ISAPI Module, which hands off the request for the .svc file to one of the handler factory types that has been configured for ASPNET, in this case

System.ServiceModel.Activation.HttpHandler,System.ServiceModel,Version = 3.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089

System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089


如果您在IIS之外的其他地方托管WCF服务,则不需要.svc文件.


If you are hosting your WCF service in something other than IIS, then you don't need the .svc file.

这篇关于SVC文件和WCF项目之间的关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆