473,574 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XmlDocument.Loa d

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.Loa d 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.Loa d method allow both users to load the document? If not, is
there any other way to achieve this?

Thanks.
-Nikhil
Nov 16 '05 #1
2 6006
Since Load is only reading the file, you should be fine.

--
Patrik Löwendahl [C# MVP]
www.cshrp.net - "Elegant code by witty programmers"
"Nikhil Patel" <do*******@nosp aml.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
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.Loa d 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.Loa d method allow both users to load the document? If not, is
there any other way to achieve this?

Thanks.
-Nikhil

Nov 16 '05 #2
Nikhil Patel wrote:
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.Loa d 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.Loa d 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_OnS tart 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.

Thanks.
-Nikhil


--
http://www.texeme.com

Clusty is the coolest search engine!
http://clusty.com
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8706
by: Ayende Rahien | last post by:
Serious problem I'm using Chris Lovett's SgmlReader class SgmlReader sr = new SgmlReader(); XmlDocument xdoc = new XmlDocument(); sr.DocType = "HTML"; sr.InputStream = new System.IO.StringReader(node.InnerText); xdoc.Load(sr);
5
3594
by: KathyB | last post by:
If someone could just explain this to me...I just don't get it! I have an aspx page where I retrieve several session variables and use xmlDocument to transform xml file with xsl file into an instruction document (not data based) - same as using an xml web control. The resulting html is on the client? but what about the server side of...
1
17117
by: Martin Honnen | last post by:
With both .NET 1.0 and 1.1 I have found the following strange behaviour where System.Xml.XmlDocument.LoadXml doesn't throw an error when parsing a text node with a character reference to an invalid characters like &#x1;. Using the CreateTextNode method I create a text node containing "\u0001a" (C# string literal notation). As far as I...
2
6021
by: Graham Pengelly | last post by:
Hi I am trying to transform on System.Xml.XmlDocument into another using XslTransform without writing the object out to a file. I am guessing it should work something like this... public XmlDocument TransformXmlDoc(XmlDocument docToTransform, string xsltFilePath) { //load the xslt
1
9643
by: Peter Nofelt | last post by:
Hey All, I'm running into this issue with parsing through an xml document by tag name. Below is an example xml document: File Name: things.xml <things> <people> <name>Peter</name>
5
10154
by: Rob Panosh | last post by:
Hello, I am trying to create a xmlDocument from as dataset. My code is listed below. All seems to go well until xmlDocument.Load(CType(ms, System.IO.Stream)) ... I keep getting the following error "The Root Element is Missing" ... any help would be appreciated. Thanks, Rob Panosh
1
2108
by: Gustaf | last post by:
I have a class that contains a certain kind of XML document. The input file is *not* an XmlDocument, but when loaded, I want it to work like the XmlDocument class, like: MyDocument doc = new MyDocument(); doc.Load("input.txt"); // doc is now an XmlDocument // Query or modify the XmlDocument as usual doc.Save("output.xml"); // doc saved...
2
1845
by: supercodepoet | last post by:
I have cXml document I want to load to parse. The document has a DOCTYPE element that points to an external dtd via http. When the document loads it trys a web request which I am assuming is to get the dtd. We have a proxy and this throws and exception when trying to load the document becuase it could not authenticate through the proxy. Is...
4
1679
by: DanThMan | last post by:
The following code works when I debug and when I install the software and run the .exe, but if I try to open the form in the designer (which causes this code to run), I get an error: Private Sub LoadTestSettings() Dim rootPath As String Dim eventHandler As ValidationEventHandler rootPath = My.Application.Info.DirectoryPath eventHandler =...
4
3266
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... We've got a lot of places in our code where we read relatively small xml user preference blocks. Currently that's creating a new XmlDocument in every spot. I was thinking we might see some speed improvements by having one, central XmlDocument and using doc.ReadNode() to process all of the fragments. Other than pumping up the...
0
7832
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7747
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8093
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8262
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8129
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6498
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3768
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2262
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1364
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.