Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 20, 2012 08:44 AM by Danielj86
Mar 27, 2007 02:19 PM|LINK
See the below code:
1 ResXResourceWriter rw =
3 rw.AddResource("IntegerData", 2);
In my ASP,NET Web Portal, I am using the above code to do the 'Translation' functionality. Actually the need is allow a Administrator to define the translation of the Web-Pages for the various languages at runtime.
This all is happening at the run time.
But the probelm is once the system saves the file after writing, it clears the Session, Cache and Application state. Clearing these State objects definietly leads to halt in the Web-Application and ultimately throws the flow of control
to Login page.
i.e. It is behaving the way we encounter, after wriiting into Web.config / Global.asax at runtime.
Please help asap.
Mar 28, 2007 04:58 AM|LINK
Any changes made to resource files or files under /bin folder will lead to an application restart clearing your session/application variables. This restart is actually neccessary because the ASP.NET runtime needs to load the new/modified values fromthe changed
files and clear its old cache (for e.g. it caches the resource files values to avoid multiple reads to the files).
As far as I know you cannot avoid this if you are changing the files at runtime. What you can do is to use Database instead of resource files for this runtime "translation".
Hope this helps,
Mar 28, 2007 07:15 AM|LINK
Thanks Vivek. I understand the root cause, but still looking for some Trick.
Mar 17, 2010 09:03 PM|LINK
Did you find a trick to that? I am having the same issue.
Nov 20, 2012 08:44 AM|LINK
Make sure Resources.resx is not read-only