Bugs in .NET 3.5 Web Service (Dynamic)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Sm9yZGFuIFou?=

    Bugs in .NET 3.5 Web Service (Dynamic)

    We did a same code base test between 1.1 and 3.5.

    In 1.1, when your .NET application reference a library with web reference
    (dynamic), you can always easily overwrite the default URL by specifying a
    different URL in your app config file or web config file.

    Now, in 3.5, I find that this no longer works. No matter what URL you
    specify in app config, it still point to default URL, which seems to be a
    serious bug to us.

    I am not sure if this is an intentional change, (not find any clue yet) or a
    bug.

    I cannot use new WCF for this, as the web service we are referencing is a
    web service written in Java.

    Any insight?

    Thanks

  • John Saunders [MVP]

    #2
    Re: Bugs in .NET 3.5 Web Service (Dynamic)

    "Jordan Z." <JordanZ@discus sions.microsoft .comwrote in message
    news:D5B8A829-4ADB-4EEF-8AA7-72882E7EA238@mi crosoft.com...
    Hi. John. Thanks a lot for pointing it out. You are correct.
    >
    In 2.0, 3.5, we cannot rely on the old configuration section to overwrite
    the dynamic web service URL any more. What we need to do is to configure
    it
    in the new section of configuration file.
    >
    1. Adding section in section group containing web service reference's
    property settings.
    For example:
    <configuration> <configSectio ns <sectionGroup name="applicati onSettings"
    type="System.Co nfiguration.App licationSetting sGroup, System,
    Version=2.0.0.0 ,
    Culture=neutral , PublicKeyToken= b77a5c561934e08 9" >
    <section name="MyWebServ iceRefLibrary.P roperties.Setti ngs"
    type="System.Co nfiguration.Cli entSettingsSect ion, System, Version=2.0.0.0 ,
    Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
    requirePermissi on="false" />
    </sectionGroup></configSections>
    >
    >
    2. Add this setting.
    >
    <applicationSet tings>
    <MyWebServiceRe fLibrary.Proper ties.Settings>
    <setting name="<MyWebSer viceNameSpace_M yWebService"
    serializeAs="St ring">
    <value>http://localhost:8080/axis/services/MyWebService</value>
    </setting>
    </MyWebServiceRef Library.Propert ies.Settings>
    </applicationSett ings></configuration>
    >
    Thanks for posting this. I see that I win my bet!
    --
    --------------------------------------------------------------------------------
    John Saunders | MVP - Windows Server System - Connected System Developer


    Comment

    Working...