HTTP 404

Last post 11-04-2008 2:28 PM by amit.jain. 5 replies.

Sort Posts:

  • HTTP 404

    11-04-2008, 9:50 AM

      Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

    I have a page which needs to be accessed by logged in user. So I created a folder named ‘Manage’ inside my root directory and placed it there. After that I used ASP.NET Configuration tool to create a user and a role, assigned user the role. Allowed role to access root folder and denied manage folder anonymous user access. On login button click redirected to the page.

    Everything works fine until one clicks the button on the page – it turns up to

    The resource cannot be found.

    Description: 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   

    Requested URL: /VM n 1Nov 2008/login.aspx

     

    Web.config settings in root folder are

    <authorization>

       <allow roles="Add Articles" />

    </authorization>

    Web.config settings in folder ‘Manage’ are

    <authorization>

       <deny users="?" />

    </authorization>

    Please help me get rid of this ‘resource cannot be found’ trouble. Thanks in advance.

  • Re: HTTP 404

    11-04-2008, 10:42 AM
    • Star
      7,932 point Star
    • amit.jain
    • Member since 10-06-2008, 1:09 AM
    • Delhi India
    • Posts 1,264

     On button click , user is getting redirected to login page

    It should Login.aspx and not login.aspx

    Don't say thanks rather mark my reply as "Answer" if it helps you ,Doing so u'll get points too
    amiT jaiN

    ASP.NET C#.NET Articles
  • Re: HTTP 404

    11-04-2008, 1:24 PM

     Ok that was the reason. I corrected it

    i dont want it to redirect to Login.aspx. i have a different code on the button click and even if their is no code on buttoon click it is redirecting to the Login.aspx page

    what should i do to make it working

  • Re: HTTP 404

    11-04-2008, 1:31 PM
    • All-Star
      16,912 point All-Star
    • guru_sarkar
    • Member since 08-31-2007, 12:00 AM
    • Posts 2,555

    in your root web.config check your forms authentication section ...

    Set the loginUrl accordingly

    <authentication mode="Forms">

    <forms defaultUrl="default.aspx" loginUrl="yourloginpage.aspx" ....../>

    </authentication>

  • Re: HTTP 404

    11-04-2008, 1:46 PM

     let me put it properly

    I am getting logged in and getting redirected to desired (secured) page (..\Manage\Default.aspx).  their is a button on this page, on click it is redirecting to login page insted of exicuting the code. even if their is no code on the click event, its redirecting to login page.

    what should i do

     

  • Re: HTTP 404

    11-04-2008, 2:28 PM
    Answer
    • Star
      7,932 point Star
    • amit.jain
    • Member since 10-06-2008, 1:09 AM
    • Delhi India
    • Posts 1,264

     Hi abhishek , either post ur code or try this example

    http://rapidshare.com/files/160661051/WebSite2.rar.html

    For login to application

    Use username - amit 

    password - password@1234

    Don't say thanks rather mark my reply as "Answer" if it helps you ,Doing so u'll get points too
    amiT jaiN

    ASP.NET C#.NET Articles
Page 1 of 1 (6 items)