I want to host my WCF service on Microsoft IIS (IIS hosting).
To do this, I created my service:
public class MyService : IMyService {
public MyService() {
}
public MyService(...) : this() {
}
...
}
[ServiceContract]
public interface IMyService {
...
}
I created an svc file (a good approach to provide a base address for my service):
<@ServiceHost Service="MyService" @>
But at the same time, when placing my service (just creating a virtual directory in IIS that points to the folder where my application is located, usually this is the project directory), IIS will call the default constructor.
How do I get IIS to call another constructor?
PS: I know what you can specify HostServiceFactory. Is that what I should use here? He returns me the factory and host. For the host, I cannot act on the parameters passed by the host. However, how to solve this problem?
. , (IoC) IoC, Unity, Spring.NET. . WCF ? , WCF , ...