Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

ASP.NET  webservice  - Unable to  Reference URL  with Localhost

Posted on 2014-08-13
6
Medium Priority
?
307 Views
Last Modified: 2014-08-25
Hi Experts,

     I have written a test webservice TestWS  using VS2010  ( Just to add two  integers  -  AddInt)

      My whole issue is - I am not able to Reference  the WebService  URL  as
           http://localhost:/TestWS/Service.asmx
         
         But I have to reference as http://localhost:59329/TestWS/Service.asmx   . And then I am able to get the expected results in another .NET windows application

     ( Infact , even this  works only after I  run the Debug of the Webservice ( But even after I close the browser and  stop debugging , it still works )

     Can you help to fix this ?

   Thanks
0
Comment
Question by:Sam OZ
6 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40259934
First, if it worked you wouldn't need the ':' after 'localhost': http://localhost/TestWS/Service.asmx  Second, if it is actually running on port 59329, there is no reason to think it should work without the port number.  'http://localhost/' without a port number goes to port 80, the standard HTTP port.
0
 

Author Comment

by:Sam OZ
ID: 40259975
Sorry , it is a typo - it is actually http://localhost:59329/TestWS/Service.asmx  ...... Infact my primary issue is not about the port ...   I should be able to  get the result from WebService  in my second application  at all times..  ( Right now it fetches result only when I open the Webservice code in VS and run it ...... It works even after I close the  debugger  but only till I close the VS Editor for Webservice
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40260050
Ok, you need to click on "Request Attention" to get others to look at your question.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 19

Accepted Solution

by:
Amandeep Singh Bhullar earned 2000 total points
ID: 40267590
Hi,

It seems like you are running your service from the Visual Studio, not from IIS.
In order to keep your service running after closing VS editor, you need to host a service on IIS

Below are the good links which will help you to host the service on IIS
http://krismanohar.com/blog/?p=34
http://www.codeproject.com/Articles/28693/Deploying-ASP-NET-Websites-on-IIS-7-0

I am assuming that you are having IIS 7 installed on your PC
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40267593
It's still not clear what your issue actually is. Are you merely concerned as to why the service still runs after you stop debugging?
0
 
LVL 16

Expert Comment

by:Rose Babu
ID: 40269814
Hi,

Have you hosted your webservice in IIS and tested ?

provide us some more details about the issue you are facing.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

571 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