Click here to Skip to main content
14,972,640 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a controller like bellow

public class MenuController : Controller
        // GET: /Menu/
        public ActionResult Index()
            return View();

        public RedirectResult logout()
            return RedirectPermanent("");

and I set a break-point on logout for first time if I hit URL in address-bar localhost:1145/menu/logout code stop at breakpoint as expected but after that each and time code not stop breakpoint.

What I have tried:

I spend around 2-3 hours and found some stack overflow link where some body write clear browser cache I do that and its working but only once ,that means I have to clear cache each time before debug .I use fire-fox(50.1.0) .try above code to replicate .please help I am stuck badly .
Bryian Tan 6-Jan-17 12:55pm
Do you have to use RedirectPermanent? try

return Redirect("");
KuntalBose 6-Jan-17 12:59pm
Thankx for comment,this is not a problem.main problem is breakpoint not stop to the function if exicute once
Bryian Tan 6-Jan-17 13:03pm
That the default behavior of permanent redirect. That why I asked if that the requirement to use RedirectPermanent, if not, use Redirect.
KuntalBose 6-Jan-17 13:12pm
Thanks ,Redirect() working fine ,and provided link is very informative and helpful for knowledge .
Saineshwar Bageri 27-Jan-17 0:58am
Are you calling logout action Method from Html anchor tag or @html.actionlink.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900