Solved

web service path in asp.net

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
While working on Silverlight and WCF application, I faced one issue where fault exception occurred at WCF operation contract is not getting propagated to Silverlight client. So after searching net I came to know that it was behavior by default for s…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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