Search code examples
c#asp.netresx

change .resx file runtime causes session to expire


I have created page to change the resource file dynamically by the web site admin. but now when user changes the value in resx file, it saves correctly but it causes the session to expire. How can i overcome this? Does anyone has idea about it, i tried to search but only to find that when we change .resx file it again compiles the website and causes app pool restarts.

Project is website and its in 4.0


Solution

  • When you change the resx file, the worker process is recycled. If you are using in-process session state, the sessions are lost. Possible work-arounds: use out-of-process session storage, or store your resources outside of the virtual directory (and manage updating them yourself).

    Ref: http://weblogs.asp.net/owscott/archive/2006/02.aspx