WCF 中 IIS 下的一个虚拟目录中是否可以有多个 .svc 文件?如果是这样怎么办?
您需要有两份服务合同,并且web.config
部分您需要注册这两项服务:
<system.serviceModel>
<services>
<service name="YourNamespace.Service1"
behaviorConfiguration="returnFaults">
<endpoint
address=""
binding="basicHttpBinding"
contract="Yournamespace.IService1" />
</service>
<service name="YourNamespace.Service2"
behaviorConfiguration="returnFaults">
<endpoint
address=""
binding="basicHttpBinding"
contract="Yournamespace.IService2" />
</service>
</services>
</system.serviceModel>
那么你可以有两个.svc
您的每项服务的文件。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)