XmlDocument.Load

N

Nikhil Patel

Hi all,
I use a Word Xml Template in ASP.Net application. Basically when a user
clicks on a certain button on a web form, I open the template using
XmlDocument.Load method; replace some strings in the document with user
selected values; and save the document with a unique name generated at
runtime. Everything works fine in the test environment. But before I deploy
the application, I would like to ask one question - If two users
simultaneously click the button to generate the document; would the
XmlDocument.Load method allow both users to load the document? If not, is
there any other way to achieve this?

Thanks.
-Nikhil
 
J

John Bailo

Nikhil said:
Hi all,
I use a Word Xml Template in ASP.Net application. Basically when a
user
clicks on a certain button on a web form, I open the template using
XmlDocument.Load method; replace some strings in the document with user
selected values; and save the document with a unique name generated at
runtime. Everything works fine in the test environment. But before I
deploy the application, I would like to ask one question - If two users
simultaneously click the button to generate the document; would the
XmlDocument.Load method allow both users to load the document? If not, is
there any other way to achieve this?

Can't you make it a global variable to be loaded in the global.asax file
( Session/Application vars can have complex datatypes ) ? Then you could
load it once in the Application_OnStart event and access it via an
Applcation variable?

If you were doing reads and writes and updates, then you could have to
consider a more complex threadsafe technology such as mutexes or
Application Blocks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top