asp.net mvc 4 - No access to Session on Error 400 -
i'm having issue how handle bad request (error 400) in mvc 4 application. followed article: http://www.digitallycreated.net/blog/57/getting-the-correct-http-status-codes-out-of-asp.net-custom-error-pages error pages setup send proper response codes. works codes i've tested far (403, 404, , 500). i'm having troubles 400 error code because lose access session , user objects when error thrown. using session , user generate menus (different users can see different menus depending on role). when call menu controller generate menu, throws null ref exception because there isn't session or user object. read don't have access session until after acquirerequeststate event raised. suspect haven't gotten there yet (how can check in debugger?). other options have? thinking store information in cookie instead of session, i'd rather not...
Comments
Post a Comment