Server Error in '/' Application.

The process cannot access the file 'C:\inetpub\wwwroot\Ghiluccatalog\errors.txt' because it is being used by another process.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.IOException: The process cannot access the file 'C:\inetpub\wwwroot\Ghiluccatalog\errors.txt' because it is being used by another process.

Source Error:


Line 865:         {
Line 866:             string Sql = "select * from tbl_Professions where Language='" + Language.ToLower() + "' order by profession";
Line 867:             List<DataRow> ds = CopECommerce.Util.ExecuteListCommand(Sql);
Line 868:             foreach (DataRow prof in ds)
Line 869:             {

Source File: c:\inetpub\wwwroot\GhidiniV2\App_Code\ScriptService.cs    Line: 867

Stack Trace:


[IOException: The process cannot access the file 'C:\inetpub\wwwroot\Ghiluccatalog\errors.txt' because it is being used by another process.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +935
   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) +1242
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +146
   System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) +126
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) +105
   System.IO.StreamWriter..ctor(String path, Boolean append) +57
   CopECommerce.Util.LogError(String Message, Boolean OnlyText) in c:\inetpub\wwwroot\iPartnerV3_C\CopECommerceV2.1\CopECommerce\Util.cs:1125
   CopECommerce.Util.ExecuteListCommand(String CommandString) in c:\inetpub\wwwroot\iPartnerV3_C\CopECommerceV2.1\CopECommerce\Util.cs:738
   ScriptService.RenderFooter(Int32 SiteId, Int32 PageId, Boolean FromCatalog, String Language) in c:\inetpub\wwwroot\GhidiniV2\App_Code\ScriptService.cs:867
   CoperonWebForm.LoadVariables() in c:\inetpub\wwwroot\GhidiniV2\App_Code\CoperonWebForm.cs:147
   ProductsList.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\GhidiniV2\ProductsList.aspx.cs:86
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4494.0