Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Reading an resource XML file...

Reply
Thread Tools

Reading an resource XML file...

 
 
news.bellatlantic.net
Guest
Posts: n/a
 
      11-13-2004
I created a class that populates a bunch of its properties from an XML file
on the file system. I'm planning on using the class on a bunch of sites all
working off the same XML file. In testing the idea, it looks like if two
users open a page that accesses the file one user will be locked out of the
file.

Is this a case for threading? How can I make sure that any number of people
can access the XML file at the same time?

Thanks for any ideas.


 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      11-13-2004
If the XML file is not going to change I'd would just read the
contents into the class and store the class in the Cache object. Then
instead of individual user requests opening the file, they will access
an object already in memory (I'm assuming the properties are valid for
all users on the site, not just a single user).

Even if the XML file changes you could wire up a CacheDependancy
object to watch for changes and reload the object in cache if someone
updates the file.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 12 Nov 2004 19:29:53 -0500, "news.bellatlantic.net"
<> wrote:

>I created a class that populates a bunch of its properties from an XML file
>on the file system. I'm planning on using the class on a bunch of sites all
>working off the same XML file. In testing the idea, it looks like if two
>users open a page that accesses the file one user will be locked out of the
>file.
>
>Is this a case for threading? How can I make sure that any number of people
>can access the XML file at the same time?
>
>Thanks for any ideas.
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resource expression to access resource located in library Heinrich Moser ASP .Net 1 03-27-2008 04:25 PM
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
UnauthorizedAccessException when reading XML files (no problem when reading other file-types) blabla120@gmx.net ASP .Net 0 09-15-2006 02:08 PM
Resource manager problem: naming for embedded resource. Dirc Khan-Evans ASP .Net 1 10-17-2005 12:52 PM
The system cannot locate the resource specified. Error processing resource avishosh XML 2 08-08-2004 06:28 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57