Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Web Service reference doesn't change
Message
From
05/09/2010 01:30:00
 
 
To
All
General information
Forum:
ASP.NET
Category:
Web Services
Title:
Web Service reference doesn't change
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01480168
Message ID:
01480168
Views:
119
I have some code which should change the URL of the Web Service reference based on what is selected on the form. This has already worked before. I used that technique on another project. Basically, it goes like this:
            MessageBox.Show(oWebService.Url)

            ' Get the Web Service URL
            oWebSerfvice.Url = Server.Text + "/WebService/MyWebService.asmx"

            MessageBox.Show(oWebService.Url)

            lcXML = oWebService.Activate()
So, basically, in the first message box, I can see that it is the one from the .config file. Then, I change it. The next message box shows the new URL. Then, I call the Activate() method. It works. If I would show the URL of the Web Service after, I would still be able to see that the new value is still returned. However, when the Activate() method is called, it goes to the reference of the one from the .config file. It ignores the new value that has been set in the property. It seems something is making that property read only but it doesn't generate any error. Like I said, when I do that on the project it works. I can hit a test server and switch back to a production server. But, in this new project, I just cannot find why it doesn't call the new URL I just set.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform