I have created a WCF service library (not a WCF service application). The project output is a dll.
How can I host this on IIS 7.5/WAS?
I believed that creating a service library was the way to go so that 开发者_如何学Pythonit could be used on a variety of hosts, whereas the service application is limited to IIS.
I'm getting lost in MS mumbo jumbo here, so I'd appreciate any help on getting this service deployed.
Thanks!
Edit I got the service hosted by following these instructions: http://msdn.microsoft.com/en-us/library/ms733109.aspx.
It seems like there has to be a better way to host service libraries. Deployment shouldn't require taking settings from app.config and moving them into web.config. Is it standard to wrap them in service applications? Is that even possible?
How are other people handling this?
Yes, creating separate library is good practice because hosting code is not coupled with your services. But you still have to write a host. In WAS, host is in a Web application.
To host service in WAS you have to create .svc file and configuration for each service. That is the reason why you have to copy configuration from app.config
to web.config
.
In .NET 4.0 this can be simplyfied with configuration based activation (no .svc is needed) end default endpoints.
精彩评论