How to: Redirect Correctly with ASP.NET Relative URLs
I have an authentication script ( CheckLogin.aspx
), and if any of the credentials do not match my application, it will be redirected (via ) to a denied page ( ). Every time my script runs it gets . Here is a mock file structure of my applications: Server.Transfer
forbidden.aspx
InvalidOperationException: Failed to map the path '/forbidden.aspx'
<root>
..default.aspx
..forbidden.aspx
..<inc>
....scripts.js
..<auth>
....CheckLogin.aspx
As you can see, the page is in a folder inside the root, and the page is inside the root itself. The path I say to redirect my application is . CheckLogin.aspx
forbidden.aspx
/forbidden.aspx
source to share