Web service not working on Web Server

R

Robert Bull

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
 
M

Mohamoss

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
 
R

Rob

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top