Silverlight: change uri to my dataservice after deployment

I made a service link from my silverlight application to my local dev server. but now I want to deploy this to a testing server, but how can I change the uri in dataservice now? all I am deploying is a XAP file, and in the asp.net world I was used to change the uri in web.config, but obviously there is no silverlight in the application?

+3
source share
2 answers

See this answer for details on how to programmatically configure the WCF proxy endpoint. Performing this method means that you do not need to put any address information in your configuration file.

+3

Silverlight ServiceReferences.ClientConfig web.config. :

<system.serviceModel>
    <bindings>
        <!-- Your binding details here -->
    </bindings>
    <client>
        <endpoint address="http://localhost/servicename/servicename.svc"
           binding="basicHttpBinding" 
           bindingConfiguration="BasicHttpBinding_Iservicename"
           contract="servicenameReference.Iservicename"
           name="BasicHttpBinding_Iservicename" />
    </client>
</system.serverModel>

, .

0

Source: https://habr.com/ru/post/1746978/


All Articles