Web service not working on Web Server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert Bull

    Web service not working on Web Server

    I have created an asp.net app that comnsumes a web service for data
    access to a database. I created both the app and the service on my
    local machine for easy debugging purposes. I am now finished with the
    app and the service, both working and communicating with each other
    fine on my local machine. I have copied the folders onto the web
    service, created the virtual directories for both, and changed the URL
    of the web service to the service on the Web server. I get the
    following error: 'The request failed with HTTP status 404: Object Not
    Found'
    The app seems to be looking for the service but can't find it. Is
    there anything else I am supposed to change? Thanks in advance.

    -Rob
  • Mohamoss

    #2
    RE: Web service not working on Web Server

    Hi Rob
    Make sure that in your application that call the web service has a proxy
    class that point to the correct new location of the web service.
    When you add webreferce into your application to the webservcie at the
    design time , it pointed to the current location of the webservice at that
    time . this need to be changes ( within the proxy class that was created to
    your webservice as follows .
    Open the proxy class that was created to your webserive in the web
    application ( it probably called service1.vb )
    Then make the constructor points to the current location of the webserive
    (the deployment url )
    public Service1() {
    this.Url = "http://localhost/WebService1/Service1.asmx";
    }
    If you already have done that , try to call your webservice from IE window
    to make sure if it works
    hope this helps
    Mohamed Mahfouz
    MEA Developer Support Center
    ITworx on behalf of Microsoft EMEA GTSC

    Comment

    • Rob

      #3
      RE: Web service not working on Web Server


      Thanks Mohamed. Eventually I figured that out. The reference was
      pointing to the local host of my machine instead of the host on the web
      server. It seemed like I had to change this pointer in 10 or 12
      different places, but it finally worked. Thanks for your time.

      -Rob


      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...