I am trying to use dependency injection with WCF REST (WebGet) and am having trouble understanding where I would use Unity to build my object to host the web service.
I have seen many examples all over the web, but they seem to all be hosting the service in a console app or Windows service.
Currently my config file looks like this:
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<services>
<service name="Services.MyRestService">
<endpoint address="http://localhost:8732/api" binding="webHttpBinding" contract="Shared.Services.IMyRestService"/>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior>
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
Currently the way it works is using the built in WCF service host in Visual Studio. However, I'd like to run this in IIS and use Unity to configure my container. Now I am using "bastard injection" to get the job done, but would like to use Unity to supply the data provider implementation, etc.
My question is, what configuration changes do I need to make to host this in IIS and also where do I configure the container and let IIS know about it.
There are no SVC files as this is a WCF Service Library.
Thanks in advance!