Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1056535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:43:41+00:00 2026-05-16T17:43:41+00:00

I have implemented the standard Login control and everything works fine. However when i

  • 0

I have implemented the standard Login control and everything works fine.

However when i enter an invalid URL it gets redirected to the Login page.

e.g.

mywebsite.com/xxx correctly gives a 404

but

mywebsite.com/xxx.aspx causes a redirect to the login page

I am using ASP.NET 3.5 on Windows Server 2008.

I have set up the web.config with the following

and also

<httpErrors existingResponse="Replace">
<remove statusCode="403" />
<remove statusCode="404" />
<remove statusCode="500" />
<error statusCode="403" path="/xyz/NoAccess.htm" responseMode="Redirect" />
<error statusCode="404" path="/xyz/FileNotFound.htm" responseMode="Redirect" />
<error statusCode="500" path="/xyz/FileNotFound.htm" responseMode="Redirect" />
</httpErrors>

Authentication is via webforms

<authentication mode="Forms">
<forms loginUrl="Login.aspx" defaultUrl="~/External/SomeView.aspx"></forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>

So it seems the login page is hijacking my 404.
How do i make http://www.mywebsite.com/xxx.aspx return a 404 instead of redirecting to the login page?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T17:43:41+00:00Added an answer on May 16, 2026 at 5:43 pm

    I think you need to make your 404 page accessible to all users – try adding this to your web.config:

    <location path="/xyz/FileNotFound.htm">
        <system.web>
          <authorization>
              <allow users="*"/>
          </authorization>
        </system.web>
    </location>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented few payment websites using PayPal Standard, PayPal Website Pro, PayPal Express
I have a form with most of its functionality implemented using standard TAction. I
I have successfully implemented a standard WCF service bound to MSMQ using the net.msmq
I have implemented a custom designer class which inherits from DocumentDesigner. The standard Form
I have a login form on the home page of an ASP.NET 3.5 website
We implemented new coding standards, which call for our private members to have a
I have implemented a function to validate .edu domains. This is how I am
I have implemented basic syntax highlighting by properly setting the NSTextStorage delegate of my
I have implemented arbitrary links in my rtb using the CodeProject found here .
I have implemented an ASP.NET http handler. It appears to me that there is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.