relative url in wcf service binding
Posted
by Jeremy
on Stack Overflow
See other posts from Stack Overflow
or by Jeremy
Published on 2008-12-16T23:55:17Z
Indexed on
2010/04/21
21:23 UTC
Read the original article
Hit count: 277
I have a silverlight control which has a reference to a silverlight enabled wcf service.
When I add a reference to the service in my silverlight control, it adds the following to my clientconfig file:
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_DataAccess" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:3097/MyApp/DataAccess.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_DataAccess"
contract="svcMyService.DataAccess" name="BasicHttpBinding_DataAccess" />
</client>
</system.serviceModel>
</configuration>
How do I specify a relative url in the endpoint address instead of the absolute url? I want it to work no matter where I deploy the web app to without having to edit the clientconfig file, because the silverlight component and the web app will always be deployed together. I thought I'd be able to specify just "DataAccess.svc" but it doesn't seem to like that.
© Stack Overflow or respective owner