ASP.NET  webservice  - Unable to  Reference URL  with Localhost

Posted on 2014-08-13
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
         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 ?

Question by:Sam OZ
    LVL 82

    Expert Comment

    by:Dave Baldwin
    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.

    Author Comment

    by:Sam OZ
    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
    LVL 82

    Expert Comment

    by:Dave Baldwin
    Ok, you need to click on "Request Attention" to get others to look at your question.
    LVL 19

    Accepted Solution


    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

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

    Expert Comment

    by:käµfm³d 👽
    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?
    LVL 16

    Expert Comment

    by:Rose Babu

    Have you hosted your webservice in IIS and tested ?

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

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
    Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
    Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

    754 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

    20 Experts available now in Live!

    Get 1:1 Help Now