using web service with winform

J

Joza

Hi!

I'm learning about web services and i made my own... now i want to
use this service with winforms... i have added webreference for my
service in solution explorer but i want dynamically add url for
my serivce in code, for example if I change address of serivce
my users also must change address of webservice in aplication.
How to do that?

Thanks!

J.
 
M

Morten Wennevik [C# MVP]

Hi Joza,

When you add a webreference to a project, Visual Studio automatically adds app.config to the project (or edits web.config or app.config if they already exist) and adds an entry containing the url to the web service. You (or the users)can change this url manually to connect to a different web site. Note that for app.config, it will compile to <outputfile>.config.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top