Quantcast
Channel: ASP.NET MVC / Web API / Web Pages
Viewing all articles
Browse latest Browse all 7925

New Post: Witch module redirect user to Login page when action is tagged with Authorize ?

$
0
0
Hello,
I work with MVC 4 since beta versions.
I built a multilingual framework designed to create CMS.
I need to create a kind of override to the method that redirect user to the login page if he is not authenticated.

This is because I use a custom route handler and if the user want to access an english page

For example :

www.mysite.com/fr-fr/products/my_nice_product.htm
www.mysite.com/en-us/products/my_nice_product.htm

so, if I set the login page in the web.config the user is redirected to

www.mysite.com/logon?returnurl=/en-us/products/my_nice_product.htm

And I need to get the language part of the url from the query and insert it in the login address like :
www.mysite.com/en-us/logon?returnurl=/en-us/products/my_nice_product.htm

Could you help me on this point ?

Regards,

Laurent

Viewing all articles
Browse latest Browse all 7925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>