Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can not add web reference in VS 2010
Message
From
21/04/2011 18:04:50
 
 
To
21/04/2011 14:31:20
General information
Forum:
ASP.NET
Category:
Web Services
Miscellaneous
Thread ID:
01508059
Message ID:
01508077
Views:
45
As an additional note, note that by default VS 2010 will add the Web Service as a service under this new way of doing things. This will not allow you to fully manipulate the properties of the Web Service object such as when we did it in .NET Framework 2.0. If you wish to be able to switch the URL of the Web Service object at run time, for example, you will have to click on Advanced and then on "Compatibility\Add Web Reference".

You will probably find some threads about it back in August/September of last year when I faced that situation. In one situation, the project serves for development and multiple production servers. So, the proper URL is not known at design time, or at least, we cannot know in advance to which one we will bounce it at run time. It depends on some client's configuration who use it. For example, when I want to test, I use the same EXE but based on some remote configuration, after the first hit to the main server, it knows that it has to switch me to the development server, thus something like this happens:
        ' Assign the Web Service URL
        oWebService.Url = cUrl + "/WebService/WebService.asmx"
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform