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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • srimathiparthasarathy
    New Member
    • Feb 2010
    • 18

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

    HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly

    But i have specified my file name correctly

    Code:
    string strServer = Request.ServerVariables["SERVER_NAME"].ToString();
                [B]string strVdir = Request.ApplicationPath;[/B]
                string strloc = "http://" + strServer + strVdir + "/" + "SignIn.aspx?VerifyId=" + keydto.MemberVerifyCode.ToString();
    
                string msgbody = "Thanks for joining ZionRealtors,<br><br>Please memory your registration infos:<br><br><font color=blue size=+1>EmailId: " + MailId + "<br>Password: " + txtMemPassword.Text + "</font>";
                message.Body = msgbody + "<br><br><b><a href='" + strloc + "'>" + strloc + "</a></b>";


    then i have find out am just passing virtual address

    so i changed my code to


    string strVdir = Request.MapPath ;

    now am getting error

    Error 1 Cannot convert method group 'MapPath' to non-delegate type 'string'. Did you intend to invoke the method?
    Last edited by tlhintoq; Feb 22 '10, 02:54 AM. Reason: [CODE] ...Your code goes between code tags [/CODE]
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    string strVdir = Request.MapPath ;

    now am getting error

    Error 1 Cannot convert method group 'MapPath' to non-delegate type 'string'. Did you intend to invoke the method?
    It means what it says... It cannot convert a method to a string type.

    Request.MapPath must be a method. Therefore you need to call it like this
    Request.MapPath (); Methods get called with parenthesis even if there are no parameters being passed.

    Comment

    • srimathiparthasarathy
      New Member
      • Feb 2010
      • 18

      #3
      i did what you have said anyway i still get error
      like

      string strVdir = Request.MapPath ();

      No overload for method 'MapPath' takes '0' arguments

      ???

      Comment

      • tlhintoq
        Recognized Expert Specialist
        • Mar 2008
        • 3532

        #4
        Then go look at the MapPath() method and see what it *does* take for arguments.
        Maps the virtual path in the requested URL to a physical path on the server for the current request.


        Whomever told you to just start grabbing functions randomly because they sounded cool or like they might have meaning to your project - and play with them until you figure it out - lied to you.

        Microsoft built an entire MSDN to teach you about how this stuff works. Go read it and learn it. And I don't mean just between the hours of 8-5 Monday through Friday. If you want to have something to offer your employer then you need to show a little initiative and go learn on your own time and work on his time.

        I strongly suggest you try reading about the types you are trying to use so you understand them BEFORE you just throw them into code in an effort to guess what they are by how they react. The MSDN has complete descriptions and sample code for their use. MSDN for ArrayList

        I would also suggest you start learning from a self-teaching book such as "C# in 21 days" or something similar.

        If you can't be bothered with reading the MSDN before you try to use a new method/control. If you can't be bothered with experimenting on your own but would rather just jump on here and ask someone else to do your research and coding for you... Then quit now. Go learn to be a pastry cook or something.

        Comment

        Working...