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?