Can I have multiple .svc files in one virtual directory under IIS in WCF? If 开发者_如何学运维so how?
You need to have two service contracts and in the web.config
section you need to have the two services registered:
<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>
Then you could have two .svc
files for each of your services.
精彩评论