Solved

Asp.net - default login and "Permission denied" pages

Posted on 2010-09-22
2
496 Views
Last Modified: 2012-05-10
How do I redirect a user to a login page that is not the default ~/Account/Login.aspx?

And how do I redirect a user to a default "Permission Denied" page?
0
Comment
Question by:Rick
2 Comments
 
LVL 51

Expert Comment

by:HainKurt
ID: 33737836
create this page

~/Account/Login.aspx?

add this into it

server.transfer("newpath/newpage.aspx", true)
0
 
LVL 13

Accepted Solution

by:
Onthrax earned 500 total points
ID: 33738852
You can alter your web.config to change the default login aspx page.


<authentication mode="Forms">
<forms loginUrl = "frmLogin.aspx" name="3345C" timeout="1"/>
</authentication>

as to the redirect. You need to verify authentication after the login button has been pressed and use the server.transfer method to redirect to a permission denied page.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question