System.IO.IOException: Процесс не может получить доступ к файлу "D:\To1C\Orders\Order_2026-04-20_12_03_11_000001897.xml", так как этот файл используется другим процессом.
в System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
в 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, Boolean useLongPath, Boolean checkHost)
в System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
в System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
в System.Xml.XmlWriterSettings.CreateWriter(String outputFileName)
в System.Xml.Linq.XDocument.Save(String fileName, SaveOptions options)
в TradeAgentWeb.Controllers.Api.OrderController.SaveOrderXmLFile(Int32 orderId, Int32 tradeAgentId) в C:\bitbucket.org\TA\tradeagentserver\src\TradeAgentWeb\Controllers\Api\OrderController.cs:строка 130 Запись заказа в ХМL-файл 12:04:17 20-04-2026