PC Review


Reply
Thread Tools Rate Thread

Add web reference programatically

 
 
=?Utf-8?B?YmJkb2J1ZGR5?=
Guest
Posts: n/a
 
      20th Feb 2007
I need to add a web reference programatically on the application's load
event. Can anybody help me out with this

Thanks in advance
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=
Guest
Posts: n/a
 
      20th Feb 2007
I think you need to improve the description of the problem. You cant add a
brand new reference to a web service at runtime as your code wont use it at
all and it would therefore be useless. You can however specify for the URL
for a reference to be held in the config file so it can be changed if thats
what your after.


--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com


"bbdobuddy" wrote:

> I need to add a web reference programatically on the application's load
> event. Can anybody help me out with this
>
> Thanks in advance

 
Reply With Quote
 
=?Utf-8?B?YmJkb2J1ZGR5?=
Guest
Posts: n/a
 
      20th Feb 2007
I found out some info. I think all I need to do is to change the url in the
web services proxy. Does anyone have any code that I could see how to do this

Thanks

"bbdobuddy" wrote:

> I need to add a web reference programatically on the application's load
> event. Can anybody help me out with this
>
> Thanks in advance

 
Reply With Quote
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      20th Feb 2007
What you are describing is *NOT* "adding a webreference programatically". You
are describing setting the Url property of a pre-existing webService proxy
client class at runtime. You can do this by simply pulling out your url from
an appSettings element in the web.config, or from a database, and setting the
Url property just before making the proxy method call.

This code here
http://weblogs.shockbyte.com.ar/rodo.../09/10698.aspx
*IS* an example of dynamically creating a webreference and proxy class.
There are other similar such examples should you care to look.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"bbdobuddy" wrote:

> I found out some info. I think all I need to do is to change the url in the
> web services proxy. Does anyone have any code that I could see how to do this
>
> Thanks
>
> "bbdobuddy" wrote:
>
> > I need to add a web reference programatically on the application's load
> > event. Can anybody help me out with this
> >
> > Thanks in advance

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programatically Enable VBIDE Reference? RayportingMonkey Microsoft Excel Programming 6 28th Aug 2008 09:51 PM
programatically reference controls on spreadsheet =?Utf-8?B?azJzYXJhaA==?= Microsoft Excel Programming 2 31st Oct 2006 01:57 PM
Adding Reference Programatically =?Utf-8?B?QmVuV2ViZXI=?= Microsoft Access 4 7th Jun 2006 08:30 PM
Adding a reference programatically Fred Microsoft Excel Programming 11 29th Apr 2006 12:55 AM
add ocx reference at runtime and programatically =?Utf-8?B?S2V2aW4=?= Microsoft Excel Programming 1 7th Feb 2004 01:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:44 AM.