I want to host service with multiple binding without custom factories.
http://seesaudi.com, http://seesaudimor.com
I found solution:
Solution in .Net 3.5:
Set the baseAddressPrefix to one of the addresses:
- Set the endpoints in your web.config file to be absolute URIs:
<system.serviceModel> <serviceHostingEnvironment> <baseAddressPrefixFilters> <add prefix="http://seesaudi.com"/> </baseAddressPrefixFilters> </serviceHostingEnvironment> </system.serviceModel> |
<services> <service> <endpoint address="http://seesaudi.com/Service1.svc/e1" Binding="..." Contract="..." /> <endpoint address="http://seesaudimor.com/Service1.svc/e2" Binding="..." Contract="..." /> </service> </services> |
In order to enable multiple site binding, you need to set multipleSiteBindingEnabled to true in your application.
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> |
No comments:
Post a Comment