Solved

web service path in asp.net

Posted on 2009-05-13
1
367 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

803 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