WebException, HTTP 404

  • Thread starter Thread starter Miro
  • Start date Start date
M

Miro

I have an application with a couple of aspx-sites in a
frame.aspx, consuming two web-services. (three projects
in the same

solution) I install this in a tree structure as follows:

<webbserver>\<ApplicationName>\<firstWebserviceName>
<webbserver>\<ApplicationName>\<secondWebserviceName>
<webbserver>\<ApplicationName>\<clientName>

When I run the pages I get the following error:

System.Net.WebException: The Request failed with HTTP
status 404: Object Not Found.

Stack Trace:
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadR
esponse(SoapClientMessage...
System.Web.Services.Protocols.SoapHttpClientProtocol.Invok
e(String methodName...
VaClient.DataAccess1.Service1.GetFromDatabase(...)
VaClient.WebForm2.Page_Load(...)

where VaClient is the namespace and GetFromDatabase is a
WebMethod in one of the web services.

I load several pages in the frameset and only the ones
consuming the webservice causes this error. The other
pages loads

fine. I guess it can't find the web service but I don't
know what to do. I thought it had something to do with
the

tree-structure but I installed it EXACTLY the same way on
another computer and it worked! I've checked the database
access

with a simple aspx so it's not the issue. Any suggestions?

Both computers are Windows 2000 SP4, MDAC 2.7, Framework
1.1

/Miro
 
Hello Miro,

Thanks for posting in the group.

Based on my understanding, now the problem is: You have 3 ASP.NET projects
in a solution. 2 are web services and the rest one is a web service client.
However, one page which consumes one web service returns error.

Since the problem is not happening on another machine, which has the same
settings, I don't think the problem is related to coding. The problem may
reside in the registration of that web serivce on that machine.

To troubleshoot the issue, could you please create a new web client
solution to consume that web service on that problematic machine? If it
could consume without any error, the problem may happen on that web client.
If it also can't consume, we may need to double check the web service.
Generally speaking, error 404 means it couldn't find the web service there.

Please also post here with:

1) How you referenced the web service? Through wsdl or VS.NET IDE?
2) Is there any proxy setting inside?

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Miro,

Thank you for using Microsoft Newsgroup Service. Based on your description,
You've made three web project in same solution. Two of them are ASP.NET
webservice projects and one is a ASP.NET web appliation which preform as a
client to consume the two webservices. However, when you Run the
client(asp.net application) and at the page which calls one of the ASP.NET
webserive, you encountered a '404 object not found' error. Also, the other
pages which doesn't call any webserivce(please confirm this) run well and
you've tested the same applications' structure on another machine(the
structure on another machine really exactly same as the one with error? or
anything else different form it?). Please correct me if my understanding of
your problem is not quite exact.


To make the problem more clear for use to troubleshoot, please confirm the
following items:

1.Is the tree-structure with error just the structure when you created it
in VS.NET?(such as the Virtual Directory name of all the three projects.
And its web url?) Have you moved them after develpment?

2.Since it fails at calling a certain webmethod in the webservice. Would
you please try add another simple webmethod(such as a "Hello World" method
in the same webservice) and call it from the same page. Thus, we can
confirm whether the problem is within the webmethod or not.

3.Since the "404 page not found" error is most likely caused by the
webservice( asmx) not correctly found. So you can try type the URL of the
asmx file (such as "http://localhost/MyWebService/Service1.asmx" in the
Internet explorer directly to see whether the test page can occur). If not,
there must be something wrong with the certian webservice. Else if the test
page display correctly, I think you may compare the url with the one of the
web reference you add in your asp.net client application. If the url are
different, try adding the web reference again using the correct one to see
whether the problem disappear.


Please try my preceding suggestions and let me know whether they will help.


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top