3 comments

  1. Very helpful. Many thanks.

    What if we’re dealing with web service? How can we make a custom handler?

    dencio ango-ango Beantwoorden

  2. If you’re using WCF you can create a custom HostFactory and reference that in the svc file that is associated with the service. If of course you’re using IIS to host the WCF service.
    If you are hosting the service inside a custom host you can construct the instance of the service using unity and provide that instance to the constructor of ServiceHost.

    willemm Beantwoorden

  3. Thanks for the quick reply.

    I’m using an ASP.NET web service. Not WCF.

    Usually I use ASP.NET MVC on my projects, however this project requires us to use ASP.NET Web Form.

    IoC is working on web forms after I followed your blog (I thank you, dude). However it aint working on web service.

    dencio ango-ango Beantwoorden