asp.net - Redirect to specific page after session expires (MVC6) -


i have c# mvc6 project , want redirect specific page when session expires.

after research tried creating

public class sessionexpireattribute : actionfilterattribute  httpcontext context = httpcontext.current; 

but httpcontext.current not exist in asp.net 5.

how solve problem?

if override 1 of actionfilterattribute methods, can access session enough:

public override void onactionexecuting(actionexecutingcontext context) {     context.httpcontext.session... } 

is sufficient?


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -