Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Windows 7 Forum Vista Tutorials Tags

Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Microsoft Technical Newsgroups > .NET General

XDocument Exclusive Access

Reply
 
LinkBack Thread Tools Display Modes
Old 10-06-2008   #1 (permalink)
Tom
Guest


 
 

XDocument Exclusive Access

I can successfully do the following:

xdocument doc = xdocument.load(... my file);
xelement bla = doc.descendants.("it").first();
.... do stuff ...
doc.save("myfile");

the above works great. however, i want to interact with the file with
exclusive access so that no other files can open it/write to it/etc. while
i'm doing stuff with it.

i know that there's the normal FileStream.open (etc., fileshare.none), but
the xdocument class doesn't take a stream as a constructor.

is there any way i can do this without having to use the xmldocument class?

Thanks.


My System SpecsSystem Spec
Reply

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Exclusive User For Media Center?! ThÉoPatrizi Media Center 4 08-16-2008 09:46 PM
When standard users access Vista registry remotely, Access Denied Gayle Vista account administration 1 10-10-2007 11:48 AM
Open file for exclusive access char1iecha1k PowerShell 15 05-18-2007 12:54 PM
Xbox 360 Ushers in Exclusive New Worlds of Entertainment for Most-Anticipated Franchises Ever at X06 z3r010 Vista News 0 09-27-2006 05:01 PM
Exclusive: Microsoft Still Plans October 2006 Vista Release MICHAEL Vista General 29 08-16-2006 07:50 PM


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

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