Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4080020
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:52:33+00:00 2026-05-20T17:52:33+00:00

There’s a function that I have written which basically does encryption for me 4

  • 0

There’s a function that I have written which basically does encryption for me 4 times in a day and writes the encryption in a xml file. Now we have 4 regions them being Dev,QA,ITE and PROD. I did not get any errors in DEV,QA,ITE but in PROD weird things are happening.
The first exception on which the code failed was this

Invalid XML document, The document does not have a root element.. at System.Xml.XmlDocument.Save(String filename)

and got this exception too:

The process cannot access the file 'configfile.xml' because it is being used by another process.   at System.IO.__Error.WinIOError(Int32 errorCode, StringmaybeFullPath)at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.Xml.XmlDocument.Save(String filename)

I have a feeling this is happening due to concurrent requests. The programming language used is C# with ASP.NET 2.0.

Can someone enlighten me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T17:52:34+00:00Added an answer on May 20, 2026 at 5:52 pm

    The “file being used by another process” exception is certainly down to trying concurrent access (and this could be from the current process).

    Process Explorer can help here: search for the name of the file to see what processes have handles to the file.

    With respect to the XML error: either XML is “Well Formed” or it isn’t XML. And that means having exactly a single root element.

    Well formed:

    <root>
      Stuff
    </root>
    

    Not XML:

    <root1>
      Stuff
    </root>
    More stuff
    

    There is limited capability within .NET for loading “XML Fragments” which can break the document rules, but this is really for insertion into a complete document, not as an alternative to the XML rules.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are numerous Agile software development methods. Which ones have you used in practice
There is a vim function Send_to_Screen(text) which sends some text to a console screen
There is a conversion process that is needed when migrating Visual Studio 2005 web
There is a field in my company's Contacts table. In that table, there is
I have text I am displaying in SIlverlight that is coming from a CMS
I have just tried to save a simple *.rtf file with some websites and
There is any syntax to use something like this?: <?php function get_foo() { return
There is a container, for example lets say which has a volume of V.
there's a CMS system and there's aspx page without backend file. I can add
There is a product which runs multiple reports to indicate the quality of different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.