Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Consume C# WS in C# App
Message
De
16/03/2008 16:00:27
 
 
À
16/03/2008 12:43:52
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Divers
Thread ID:
01302443
Message ID:
01302494
Vues:
6
>>The default URL is stored in the applicationsettings of the relevant config file and loaded from there anyway. Why not just change that entry directly?
>
>Hi Viv,
>
>I'm not sure which config file you're referring to ... all I've ever seen is that the URL is hard-coded in the reference.cs file that VS generates when you add a web reference.

Hi Bonnie,

For a windows app I get something similar the folowing automatically added to the app.config file when I add the reference to the proj:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <applicationSettings>
        <WindowsApplication2.Properties.Settings>
            <setting name="WindowsApplication2_com_theurl_www_class"
                serializeAs="String">
                <value>http://theurl.com/lvlink/ws/class.asmx</value>
            </setting>
        </WindowsApplication2.Properties.Settings>
    </applicationSettings>
</configuration>
Changing the < value > changes the URL used for the service. I've mangled the above to protect the innocent but you should see something similar. Pretty much the same thing is created in the web.config for a web application as well.
BTW, why are we messing with this stuff on a Sunday anyway<g>
Regards,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform