Solved

web service path in asp.net

Posted on 2009-05-13
1
355 Views
Last Modified: 2013-12-17
Hi,
I have created a webservice in VS.NET 2005  and deployed it in IIS (http://localhost/WebService1/Service.asmx)
Now i created a proxy in asp.net application and called a method like
WebApplication3.localhost.Service1 _service = new WebApplication3.localhost.Service1();
           string x = _service.HelloWorld();
           Response.Write(x);
==============
Keepign in mind if this has to be moved to Test Servers/ Production etc . Can I have this path in
web.config of asp.net application   <add key = "WebServicePath"  value = http://localhost/WebService1/Service.asmx

and then call it in asp.net application (Is it necessary in this case to create proxy) or how can I call this and invoke a method (please let me know the best way to deal with keeping in mind about deployment of asp.net and webservice)
0
Comment
Question by:dotnet0824
1 Comment
 
LVL 18

Accepted Solution

by:
Gary Davis earned 300 total points
ID: 24380869
The web reference can be either dynamic or static (a property). If dynamic, the url will be stored in the appsettings in the web.config for you with an appropriate name.
You also have the opportunity to set the Url property programmatically after instantiation of the web service object and before you call the method.
Gary Davis
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now