views:

29

answers:

3

hi guys I'm with a question.

Imagine, my web site is restricted in some URLs, in a login page i try to access a url than i dont have permition

And if i doesnt i need to redirect to default page.

which is the best choice to do?

TY

A: 

is some attribute or element than i can put on webconfig than for users without permission to access that location redirects to default page?

ROCK HEART
You should be editing your original question for this, instead of adding answers each time. Or alternatively you can add comments to your question.
zapping
A: 

solved.

In login.aspx.cs pageload

protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Request.IsAuthenticated && !string.IsNullOrEmpty(Request.QueryString["ReturnUrl"])) { // This is an unauthorized, authenticated request...
Response.Redirect("YOUR_PAGE_URL"); } } }

ROCK HEART