asp.net mvc - your application has redirected loops in MVC -
after writing code in global.asax error ocured. if keep break point check firing , spinning , browser outcomes above responce["your application has redirected loops"]. `
public class sessionexpireattribute : actionfilterattribute { public override void onactionexecuting(actionexecutingcontext filtercontext) { httpcontext ctx = httpcontext.current; // check sessions here if (httpcontext.current.session["username"] == null) { filtercontext.result = new redirectresult("~/account/login"); return; } base.onactionexecuting(filtercontext); } }`
really funny why stupid error occuring again , again.any idea?
remove actionfilter
accountcontroller
Comments
Post a Comment