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><configSections> <sectionGroup name="applicationSettings"
type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="MyWebServiceRefLibrary.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup></configSections>
2. Add this setting.
<applicationSettings>
<MyWebServiceRefLibrary.Properties.Settings>
<setting name="<MyWebServiceNameSpace_MyWebService"
serializeAs="String">
<value>http://localhost:8080/axis/services/MyWebService</value>
</setting>
</MyWebServiceRefLibrary.Properties.Settings>
</applicationSettings></configuration>
Jordan
[quoted text, click to view] "John Saunders [MVP]" wrote:
> "Jordan Z." <Jordan Z.@discussions.microsoft.com> wrote in message
> news:0F63C770-8BD1-4185-BEDF-C639287E7962@microsoft.com...
> > 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.
>
> Look in the proxy class to see how it sets the URL.
>
> In particular, I bet this setting has migrated to your new
> Settings.settings file in the Properties folder.
> --
> --------------------------------------------------------------------------------
> John Saunders | MVP - Windows Server System - Connected System Developer
>
>