by Mikael Henriksson
25. November 2009 11:57
If found this to be helpful
- Run an elevated command prompt
- Run the following command:
"%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r -y
- Last and also very important is the need for a base address, it seems IIS 7 does not figure this out by itself:
<system.serviceModel>
<services>
<service name="RESTService.Service"
behaviorConfiguration="Default">
<host>
<baseAddresses>
<add baseAddress="http://localhost:80/" />
</baseAddresses>
</host>
<endpoint address=""
behaviorConfiguration="Default"
binding="webHttpBinding"
contract="RESTService.Service" />
</service>
</services>
</system.serviceModel>
Just speficy the baseAddress and you should be good to go. Navigate to your svc file and you can start consuming it.