Results 1 to 2 of 2

Thread: HTTP 404. The resource you are looking for (or one of its dependencies) could have...

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2021

    Post HTTP 404. The resource you are looking for (or one of its dependencies) could have...

    Hi everyone.

    Just want to ask if anyone can help me regarding my web application.
    I develop a program for employee to apply for an overtime and after they submit the application, the manager will receive an email with a link to "Approve" and "Reject".
    It's all working fine before but when I formatted my laptop and try to run the program, when I click the link Approve or Reject it always give me the error "HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed...""

    This is the code that I used which is working before.

    Using mm As New MailMessage(ConfigurationManager.AppSettings("UserName"), "sample email")
    'mm.Bcc.Add("sample email") ------+ "-" & OTRefNo
    mm.Subject = "Leave Application - Date Applied: " & Now.Date
    Dim body As String = "Dear Manager, "
    body += "<br /><br />Leave application created by user: " + Me.txtEmpName.Text + " needs your approval."
    body += "<br /><br />Please check leave application details." + Chr(13)
    body += "<br /><br />Date of Application: " + Me.dteAppCal.SelectedDate.Date + Chr(13)
    body += "<br />Time: " & txtTime.Text + Chr(13)
    body += "<br />Reason: " & Me.txtReason.Text & Chr(13)
    body += "<br /><br />Important Note: You need to approve this leave application prior to the start date of leave, otherwise this will be rejected automatically." + Chr(13) & Chr(13)
    body += "<br /><br />Please click <a href = '" + ConfigurationManager.AppSettings("webAppServer") + "/otapproval.aspx?ID=" + Session.SessionID + "'>APPROVE</a>" + " to approve or " + "<a href = '" + ConfigurationManager.AppSettings("webAppServer") + "/otrejectionReason.aspx" + "'>REJECT</a>" + " to reject the leave application."
    body += "<br /><br />Thank you."
    body += "<br /><br />Note: Subject for HR Review"
    mm.Body = body
    mm.IsBodyHtml = True
    Dim SmtpMail As New SmtpClient
    Dim basicAuthenticationInfo As New System.Net.NetworkCredential(ConfigurationManager.AppSettings("UserName"), ConfigurationManager.AppSettings("Password"))

    SmtpMail.Port = Integer.Parse(ConfigurationManager.AppSettings("Port"))
    SmtpMail.Host = ConfigurationManager.AppSettings("Host")
    'SmtpMail.UseDefaultCredentials = False "https://" +
    SmtpMail.Credentials = basicAuthenticationInfo
    SmtpMail.EnableSsl = Convert.ToBoolean(ConfigurationManager.AppSettings("EnableSsl"))

    End Using

    I don't know if I did something wrong with the IIS configuration settings or it is mainly the coding error, because when I use "Response.Redirect" syntax, it redirects me to the same page that I mentioned on the above code "<a href>".

    Hope someone can help me.

    Thank you very much in advance.


  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002

    Re: HTTP 404. The resource you are looking for (or one of its dependencies) could hav

    All that code does is generates and sends an email. You'd have to look at the resulting emails to see what links it is generating for your Approve & Reject. There's nothing inherently wrong with the code itself. It does look like you're pulling the Approve & Reject URLs (or part of) from some configuration... so that's where I'd start. My guess, that's not configured correctly.

    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width