473,395 Members | 1,613 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

using web service with winform

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.
Nov 4 '07 #1
2 8650
it doesn't matter, i have found solution at
http://www.codeproject.com/soap/wsdldynamicurl.asp
Nov 4 '07 #2
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.

On Sun, 04 Nov 2007 17:37:33 +0100, Joza <josip.pejakovic_NO@TRASH_etfos.hrwrote:
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.


--
Happy coding!
Morten Wennevik [C# MVP]
Nov 4 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Cenray | last post by:
How to generate a web request from a Winform Application using a WebService? In a C# Windows Application, when I try to genrate a web request using the following code, it is woking fine ...
1
by: PeterNZ | last post by:
Hi all, I developped an C# app which is using FileSystemWatcher. If a file is created in a specific folder, it opens the file and does some processing. This functionality works without...
2
by: Drew Stoddard | last post by:
We are working in C#/Winforms and are using asynchronous client-side web service calls (the Begin... and End... methods supplied by the web reference creation). Many of these calls are contained...
5
by: Richard Steele | last post by:
I have created a WinForm application that needs to be run as a windows service (the PC is inaccesible by any user) i have successfully installed the application as a windows service. When i start...
2
by: hazz | last post by:
I don't get it. I have a VS2005 solution with a web service project and a windows project. The web service when tested on its own works fine. But when I add it as a web reference and refer to it my...
17
by: Jeremy Chapman | last post by:
I've seen apps where if a windows exe form is running, it publishes a web service. There is no IIS folders or virtual directories required. Does anyone have information on how to do this?
7
by: Stan | last post by:
I need to attach to aspnet_wp.exe in order to debug a web serivice from WinForm client. Why don't I have to do this for ASP.NET / WebForm client? Why doesn't VS.NET debugger attaches...
2
by: Kevin Yu | last post by:
hi all got a questoin here, I have a winform client to call web service and the web service functions have EnableSession =ture, use IE to test the web service session, it works, but how to get...
2
by: Sharon | last post by:
hi all I have a small application assembled from C# winForm client side (few of them) C# webService at the server side
0
by: yao | last post by:
there are two web method in my web service. bool verifyUser(string user, string pwd) DataSet GetData() that I need connect the web service by WinForm, I hope the client is verified by server by...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.