How to change the return url by pointing to the login page?

1

How can I change the value of ReturnUrl passed to the login page when the user is on a specific page and the session expires?

For example, if the user is on the page www.meusite.com/seguranca.aspx and the session ends, instead of directing by default to www.meusite.com/login.aspx?ReturnUrl=seguranca.aspx you would like it to be directed to another page, such as www.meusite.com/login.aspx?ReturnUrl=default.aspx .

For the remaining pages, it would remain normal.

    
asked by anonymous 20.03.2014 / 17:23

2 answers

1

The only way I see you do this is to implement your own HTTP authentication module.

You can see here the implementation of FormsAuthenticationModule controls Forms authentication.

    
24.03.2014 / 00:40
0

I think it depends a lot on what you intend, usually I for example, I usually check in specific activities and pages SE and WHAT user is logged in, if it is not logged in if for example it is trying to call a specific function, I redirect it to login, but if it is simply trying to access a page to which you do not have permission, I redirect to my Default.aspx in question.

I think in general you should redirect it to login, if it is trying to execute something, or access something, but if it does not have permission for example, it goes to default.aspx.

I'm sorry if I did not get to where you wanted to go, but that's where I came to understand your problem.

    
20.03.2014 / 21:17