1
Answer

C# winform Exception on few systems

narasimman g

narasimman g

14y
10.3k
1

this is c# winform
I'm performin write  operation on the application startup path.Out of 3/5 systems below exception occurs. is this happening due to Admin/Access Rights on that system/drive?
System.IO.IOException: The process cannot access the file 'C:\Program Files\Sample\test.xml' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   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, Int32 bufferSize, FileOptions options)
 
Answers (1)