Re: Global resource file

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: martin (marc_NO_SPAM_1234_at_hotmail.com)
Date: 03/05/04


Date: Fri, 5 Mar 2004 13:42:04 +1300

Hi Alvin,

No really resolved it.

 can uses an xml file to hold all of my strings for error messages

eg
<Errors>
        <Key ErrNum="1" value="Must enter a date"/>
        <Key ErrNum="2" value="A fatal error occured -- closing program"/>
        <Key ErrNum="3" value="An non fatal error ccured"/>
</Errors>

however, I am unsure about concurency issues such as a number of users
accessing the strings at the same time.
No one will ever write to this xml resources file except me.
I don't want me writing to it to ever cause an error, and I don't want
errors to happen when a certain number of users try to read the file.
I especially don't want to hold these values in a database as I will retrive
them often.

I did think about caching the error XML file in memory but it will be quite
large.

any ideas would be appreciated.

cheers

martin.

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:ODRbyYZAEHA.2768@tk2msftngp13.phx.gbl...
> Your post went unanswered. Have you resolved this issue?
>
> --
> Regards,
> Alvin Bruney [ASP.NET MVP]
> Got tidbits? Get it here...
> http://tinyurl.com/3he3b
> "martin" <marc_NO_SPAM_1234@hotmail.com> wrote in message
> news:OUntJKAAEHA.620@TK2MSFTNGP11.phx.gbl...
> > Hi,
> >
> > I have noticed that every aspx page that I created (and ascx file)
has
> an
> > assosiated resource file aspx.resx.
> > However what I would like to do is have a single global resource file
for
> > the site.
> > The resources in this global resource file will possibly change quite
> often,
> > there I guess this rules out using web.config as every time web.config
> > alters the application is recompiled, also I am not sure of the possible
> > consequences of dynamically changing web.config.
> >
> > I was thinking that I could use the resource file of global asax as a
> global
> > resource file however I am unsure of whether that is what this file is
for
> > or if it is exclusivly for global.asax.
> >
> > I guess my only option is an XML file. I have ruled a database out as a
> > means to store global resources.
> > The main resources that I wish to store are strings to signify success
or
> > faliure messages on a website.
> >
> > cheers
> >
> > martin
> >
> >
> >
> >
>
>



Relevant Pages

  • Re: Global resource file
    ... when you try to write to the resource file, obtain a write lock on the file. ... This will prevent concurrency issues. ... > I did think about caching the error XML file in memory but it will be ... >>> However what I would like to do is have a single global resource file ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Can a local resource string be dynamic (asp.net 2.0)
    ... As for the linking global resource in local resource file question, ... In some of the strings, we would like to put the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Multilanguage
    ... User choose which strings should be translated ... >> The resource file is only a storage space, you can switch languages ... that the app use the last selected language on start up. ...
    (microsoft.public.vb.general.discussion)
  • Re: MUI(Multilingual User Interface) for pocket pc
    ... locale so the application could link to the correct string. ... You can write a "template" resource file, ... probably is to distribute a property file or XML file, ... Windows Mobile Pocket PC Smartphone Programming Hints and Tips ...
    (microsoft.public.pocketpc.developer)
  • Re: Form Localization
    ... my forms share strings so I need somewhere centralized where the ... central resouce file to be swapped in and out by the CLR depending on ... culture as per the usual .net behaviour. ... possible to have 1 resource file for each culture which contains the ...
    (microsoft.public.dotnet.framework.windowsforms)