asp.net mvc 2 Change redirection of unauthorized actions

Posted by ile on Stack Overflow See other posts from Stack Overflow or by ile
Published on 2010-04-01T18:28:44Z Indexed on 2010/04/01 18:33 UTC
Read the original article Hit count: 504

Solution is called Portal which holds Areas/CMS/Login folder inside it. Login controller in CMS/Controllers is the same as AccountController in Portal solution. I customized Login and it works all fine except one thing: When I use [Authorize] filter and If user is not logged in than he is redirected to http://localhost:1177/Account/LogOn?ReturnUrl=%2fCMS%2fArticle and I would like that redirection takes user to here:
http://localhost:1177/CMS/Login

Any idea how to solve this?

Thanks in advance

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about unauthorized