We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Access to the path "D:\Test.log" is denied.

I get this error when running the ExportFromGrid sample project. An unhandled exception of type ''System.UnauthorizedAccessException'' occurred in mscorlib.dll at ExportFromGrid.Form1.Main() in c:\program files\syncfusion\essential suite\2.1.0.30\excelrw\samples\grid\exportfromgrid\cs\form1.cs:line 139 Additional information: Access to the path "D:\Test.log" is denied. d: is my CDROM drive. I don''t see any references to this path in the code. Thanks, Brian

2 Replies

AD Administrator Syncfusion Team November 8, 2004 09:18 AM UTC

Hi Brian, Sorry for the delay in responding. I cant think of any reason why you would get that exception since that path is not referenced in the sample. Could you please try running this version of the sample instead ExportFromGrid_8338.zip Please let me know if you are still getting the same exception. Thanks. Best regards, Stephen. >I get this error when running the ExportFromGrid sample project. > >An unhandled exception of type ''System.UnauthorizedAccessException'' occurred in mscorlib.dll >at ExportFromGrid.Form1.Main() in c:\program files\syncfusion\essential suite\2.1.0.30\excelrw\samples\grid\exportfromgrid\cs\form1.cs:line 139 >Additional information: Access to the path "D:\Test.log" is denied. > >d: is my CDROM drive. I don''t see any references to this path in the code. > >Thanks, >Brian


AD Administrator Syncfusion Team November 9, 2004 02:52 PM UTC

I get the same error... It comes on this line: myWorkBook.SaveAs("Sample.xls"); and is: An unhandled exception of type ''System.IO.DirectoryNotFoundException'' occurred in mscorlib.dll Additional information: Could not find a part of the path "D:\Test.log". Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path "D:\Test.log". at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.IO.StreamWriter.CreateFile(String path, Boolean append) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path) at Syncfusion.ExcelRW.Implementation.WorksheetImpl.SerializeRows(OffsetArrayList records) at Syncfusion.ExcelRW.Implementation.WorksheetImpl.Serialize(OffsetArrayList records) at Syncfusion.ExcelRW.Implementation.WorkbookImpl.Serialize(OffsetArrayList records, ExcelSaveType saveType) at Syncfusion.ExcelRW.Implementation.WorkbookImpl.SaveAs(String FileName, ExcelSaveType saveType) at Syncfusion.ExcelRW.Implementation.WorkbookImpl.SaveAs(String FileName) at ExportFromGrid.Form1.button1_Click(Object sender, EventArgs e) in C:\TEMP\ExportFromGrid\cs\Form1.cs:line 174 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at ExportFromGrid.Form1.Main() in C:\TEMP\ExportFromGrid\cs\Form1.cs:line 139 >Hi Brian, > >Sorry for the delay in responding. > >I cant think of any reason why you would get that exception since that path is not referenced in the sample. > >Could you please try running this version of the sample instead > >ExportFromGrid_8338.zip > >Please let me know if you are still getting the same exception. Thanks. > >Best regards, > >Stephen. > >>I get this error when running the ExportFromGrid sample project. >> >>An unhandled exception of type ''System.UnauthorizedAccessException'' occurred in mscorlib.dll >>at ExportFromGrid.Form1.Main() in c:\program files\syncfusion\essential suite\2.1.0.30\excelrw\samples\grid\exportfromgrid\cs\form1.cs:line 139 >>Additional information: Access to the path "D:\Test.log" is denied. >> >>d: is my CDROM drive. I don''t see any references to this path in the code. >> >>Thanks, >>Brian > > > >

Loader.
Live Chat Icon For mobile
Up arrow icon