Dynamically modifying the url for a web service within a dll

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bvanderzanden

    Dynamically modifying the url for a web service within a dll

    I'm having a problem dynamically setting the url for the web service
    used in a dll.
    When I reference a web service it sets it to dynamic and creates a
    setting for the url.
    I have modified the url in the app.config file to our test instance of
    the web service.
    Every time I get the proxy object for the web service the url is set
    to the original value.

    My understanding was that it returns the default value (the original
    url) if there is no config file.

    I've verified that the config file is there and has a different value
    than the default.
    I've tried both running with debug and with a compiled app that calls
    the dll, both to no avail.

    I've also tried using the ConfigurationMa nager to get the value and
    haven't been successful.
    If I create a new appSettings section and create a new setting, I can
    pull the value back using the ConfigurationMa nager

    How do I get it to use the setting created when I set the web
    reference?

    Thx.
    Brian VZ

    Here is the config file.

    <configuratio n>
    <configSections >
    <sectionGroup name="applicati onSettings"
    type="System.Co nfiguration.App licationSetting sGroup, System,
    Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b77a5c561934e08 9" >
    <section name="TestWebRe f.Properties.Se ttings"
    type="System.Co nfiguration.Cli entSettingsSect ion, System,
    Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
    requirePermissi on="false" />
    </sectionGroup>
    </configSections>
    <applicationSet tings>
    <TestWebRef.Pro perties.Setting s>
    <setting name="TestWebRe f_pb_app_Tririg aWS"
    serializeAs="St ring">
    <value>http://pb-app:8001/ws/TririgaWS</value>
    </setting>
    </TestWebRef.Prop erties.Settings >
    </applicationSett ings>
    </configuration>
Working...