ASP.NET Page.User is null during AJAX request -


i'm using mvc2 framework , 1 of views has bit of conditional logic gets page.user.identity object , comparison other values determine display.

that works fine on initial page load, when make ajax call partial page updates (i'm doing manually yui3, not .net ajax stuff) page.user object null.

anyone know why page context seems discarding user object asynchronous requests?

thanks,

chris

if request-handling method static webmethod, there won't page instance work , page null (that is, won't able resolve page.user).

if indeed problem, use httpcontext.current.user instead. (and sure read why asp.net ajax page methods have static?)


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -