Solved

web service path in asp.net

Posted on 2009-05-13
1
401 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET Complete Life Cycle for all the controls 2 46
Broken .resx file generating errors 18 44
Read top line from CSV file 14 60
Javascript function 3 23
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

710 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