Vivek Thakur

Chaotically Complex

  Home  |   Contact  |   Syndication    |   Login
  102 Posts | 1 Stories | 317 Comments | 66 Trackbacks

News



Archives

ASP.NET Ventures

An important point to note while globalizing your ASP.NET 2.0 web applications is regarding dynamic updation of the .resx files once published on the remote server. We would like to have this flexibility so that the users themselves can modify values in the resource files (which are simple XML files following Microsoft ResX Schema) once the application is deployed on a server without re-compiling the entire application itself. The ability to do so depends on what project model we have followed for our web application in VS 2005.

If we are using the WebSite Project model (which is default in VS 2005) then resource files only under the App_LocalResources will get published as raw .resx files on the server as these are not compiled. These resource files can be edited on the server (as they are compiled during runtime). Files under the App_GlobalResources folder are compiled into individual resource specific dlls and published on the server, so you cannot edit the resource files which are under App_GlobalResources once they have been published using the WebSite project model. If you need to add new locale resources then you need to first manually generate the new .resources file using the tool resgen.exe and then compile it to a satellite assembly using Assembly Linker tool.

If we are using a Web Application Project (WAP) model, then files both under the App_GlobalResources as well as App_LocalResources folders will get published as raw .resx files which are editable. So I think that using WAP gives you this slight flexibility which the default WebSite model does not provide.

Note that whenever we change any file under the /bin folder of the deployed web application, an application restart will occur, which may cause loss of data (like values stored in Session etc).

posted on Thursday, December 14, 2006 4:49 PM

Feedback

# re: Editing Resource Files after publishing in ASP.NET 2.0 12/7/2007 2:53 PM Irfan
As you said it is possible to edit the .resx files runtime with WAP
will you please explain how can we achieve that?
any help would be more appriciable

# re: Editing Resource Files after publishing in ASP.NET 2.0 7/24/2008 5:15 PM kumaravel
I need to change the resx file values at runtime/or it can be changed by site admin at runtime. I am using vs2008. Can you please expalin how is it possible ?

Post Feedback

Title:
Name:
Email: (never displayed)
Url:
Comments: 
Please add 5 and 8 and type the answer here: