web service and updating web reference with vb.net design time vs run time 
Author Message
 web service and updating web reference with vb.net design time vs run time

Hi,

I had the exact same issue.  
I noticed that every web service has a URL property, so all you need to
do is instantiate the web service, set the URL from a setting in your
app.config file (or the registry if you wanted to) and away you go.
This way clients can change the app.config to point to a different URL
that hosts the same web service if one of your servers go down.

Here is the code from my app...>

' instantiate a copy of my web service
Dim w As New HcsServices.main

Try
' set the url from my app.config file
 w.Url = _
system.Configuration.ConfigurationSettings.AppSettings.Item("WebServices
")

            ' call my web service method
            IP = w.GetIPAddress

         ' error handler
        Catch ex As Exception

            ' if it didnt work pass some useful information to the error
log
            Dim strErr As String = "Web Service Error in
frmSettings.btnGetIP_Click URL:" & w.Url
            WriteToLog.Invoke(strErr & ControlChars.CrLf & ex.ToString,
EventLogEntryType.Error)

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Fri, 14 Oct 2005 20:55:39 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. web service and updating web reference with vb.net design time vs run time

2. Design time vs Run time

3. Run Time vs Design Time - No Current Record

4. Design Time vs Run Time

5. Design time vs. Run time

6. Conversion time from COM to .NET Web Service

7. Assign a treeview at design run time to other at design time

8. Code running in design time or run-time?

9. Copy / Paste special in to a VB app to get real-time numbers updated from Web

10. Copy / Paste special in to a VB app to get real-time numbers updated from Web

11. Copy / Paste special in to a VB app to get real-time numbers updated from Web

12. Where is Web Design-Time Control Type Library?

 

 
Powered by phpBB® Forum Software