Tags: architecture, asmx, aspx, bin, comsume, consuming, create, design, dll, errorthe, failed, folderi, http, net, request, save, status, webservice, webservicecompile
The request failed with HTTP status 404: Not Found / when I consuming webservice
I create webservice
compile .asmx to .vb & .dll then save .dll to bin folder
I white .aspx to comsume webservice but error
The request failed with HTTP status 404: Not Found
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with HTTP status 404: Not Found.
And This is my code .aspx to comsume it
<%.architecture.itags.org.Import namespace="drugdetail" %>
<%.architecture.itags.org.Import namespace="system.data" %>
<script language="vb" runat="server"
Private Sub querydrug (Sender as Object , E as EventArgs)
Dim service as new drugdetail.drugdetail()
Dim ds as dataset
ds = Service.showdetail(text1.text )
Enter Drugname : <asp:Textbox id=text1 runat=server />
<asp:button text=Submit Onclick=querydrug runat=server /></br>
<asp:datagrid id="datagrid1" runat="server" />
Any one can help me or suggestion ?
Leave a comment...
- 3 Comments
- Can you browse to the webservice using internet explorer?
You should be presented with a page that lists all the available
methods in the webservice.
Have you checked your webreference that they are still valid?
Fredr!k#1; Fri, 04 Jan 2008 09:11:00 GMT
- I didn't upload webservice to server, just try in my PC by put .asmx file in wwwroot use IIS as web server.
Now i'm online in internet cafe i can't post code .asmx now , i'll be post later after i'll go back my home , Thanks Fredrik2000
I try use webservice .asmx in IE and it's response correct XML file#2; Fri, 04 Jan 2008 09:12:00 GMT
- Don't know if I understand you correctly, but when you set a webreference
to a webservice, it will keep using the 'server' that you pointed it to originally.
So if you have your webservice on your local computer and then create
an application that consumes it, and then puts that application on a server, it will still point
to the webservices on your local computer!
If you check the proxy code that is generated you will see that the hostname is
Fredr!k#3; Fri, 04 Jan 2008 09:13:00 GMT