locked
HTTP Error 404.0 Not Found RRS feed

  • Question

  • User-2062901272 posted

    Hi Experts,

    Can anyone help me on HTTP Error 404.0 Not Found

    The data successfully submitted and save on the DB but it cannot find the page and it does exist. I am using IIS 7

    here is the Error Detailed

    Module: IIS Web Core

    Notofication: Maprequesthandeler

    Handler: StaticFile

    Error Code: 0x80070002

    Can anyone help on why does this error pop out

    Thanks and Best Regards

    Thursday, June 21, 2018 9:34 AM

All replies

  • User475983607 posted

    Pretty simple a 404 means the URL was not found.  Other than that there is not much we can do on the forum as you have not posted enough information.  

    What is the URL?  What kind of application is this?  Can you post source code that reproduces the issue?

    Thursday, June 21, 2018 9:52 AM
  • User-2062901272 posted

    Hi mgebhard,

    Thanks for the reply.

    But my problem is that when i try to execute in my localhost there is no problem on the URL.

    But on my publish Web Server that were the error occurs.

    Please see below code

     protected void btnResend_Click(object sender, EventArgs e)
        {
            try
            {
                string_link = "https://sample.com/Sample/Calendar/?RequestCode=" + Session["ProviderKey"];
                this.btnResend.Enabled = false;
                SendEmail(txtReEmail.Text.Trim());
                this.btnResend.Enabled = true;
                Session.RemoveAll();

    // This is were the URL error occurs Response.Redirect("~/Successful.aspx", false); } catch (Exception ex) { errorLogs.LoggedError(ex.Message, HttpContext.Current.Request.Url.AbsoluteUri, Request.Browser.Browser, Request.Browser.Version, Request.ServerVariables["HTTP_USER_AGENT"]); Response.Redirect("~/ContactAdministrator"); } }

    Friday, June 22, 2018 12:07 AM
  • User1724605321 posted

    Hi ryoka012,

    Please confirm whether you have Successful.aspx in root website directory . You can check the directory structure or directly type the url in browser.

    Best Regards,

    Nan Yu

    Friday, June 22, 2018 6:32 AM
  • User-2062901272 posted

    Hi Nan yu,

    Thanks for the reply.

    Yes i can confirm that the Successful.aspx is in my root folder.

    Friday, June 22, 2018 6:46 AM
  • User753101303 posted

    Hi,

    What if you try to access this page directly from: your browser? Does it work ? The 404 couldn't come from your previous http request ?

    Edit: rather than just ex.Message I would log ex.ToString() to get the full details about the exception. Or could it be a problem on /ContactAdministrator ?

    Friday, June 22, 2018 7:23 AM
  • User-2062901272 posted

    Hi ParriceSc,

    Thanks for the reply.

    I tried it localhost and it show no error but when it in the publish server it return 404 error.

    Friday, June 22, 2018 7:27 AM
  • User753101303 posted

    I meant I would try to access this page from my browser and on the server on which I have a problem to make 100% sure this page actually works.

    If yes, I believe the error might be not what you think :
    -  do you see your contactadministrator page being shown ? I not could be caused by this one. What you shown comes from your own log or from IIS ?
    - also I would log ex.ToStirng() rather than ex.Message to get the full exception chain and the call stack rather than just a message

    Friday, June 22, 2018 7:32 AM
  • User-2062901272 posted

    Hi PatricSC,

    Sorry but that would not be possible.

    Here is my answer to your question

    • do you see your contactadministrator page being shown ? 
      • No, same error on the Successful
    • I not could be caused by this one. What you shown comes from your own log or from IIS ?
      • I did not find any logs.
    • also I would log ex.ToStirng() rather than ex.Message to get the full exception chain and the call stack rather than just a message
      • errorLogs.LoggedError is a function that save on my table
      • error shows "Thread was being aborted".

    Friday, June 22, 2018 7:56 AM
  • User475983607 posted

    A 404 error means the URL was not found.  The fact that you are seeing the error "Thread was being aborted".  Indicates this line is not causing the error.

    Response.Redirect("~/Successful.aspx", false);

    Are you sure the deployed code matches what you posted?  The following line of code would cause the described error.

    Response.Redirect("~/Successful.aspx");

    Have you verified /ContactAdministrator/default.aspx exists?

    Lasly, 404 error messages show the requested URL that was not found.  Please post the requested URL.   Use the browser's dev tools and view the network tab to get the URL.  The request will show in red.  

    https://developers.google.com/web/tools/chrome-devtools/network-performance/

    Friday, June 22, 2018 10:50 AM
  • User753101303 posted

    So the problem changed ? As pointed by mgebhard "Thread was being aborted" happens when using Response.Redirect("somewhere"); It should NOT happen when using false in the 2nd argument.

    For the 404 I was trying to understand what you see in your browser and from where comes the information you shown to us. What I suspected is that the problem could be perhaps not in the first but rather in the 2nd redirect.

    Friday, June 22, 2018 11:17 AM