I am getting the below error while trying to upload a text file from client machine to a linux shared file. Before the shared file was on a Windows machine, there I did not get the error.
The annoying issue with the error is: it happens some times and it does not happen other time. So cannot reproduce it.
Now, is there any thing ( specially) I need to check if a linux folder is used with ASP.NET 2.0
Edit 1: The below details from debugger:
System.IO.IOException was unhandled by user code Message="A device attached to the system is not functioning.\r\n" Source="mscorlib" StackTrace: 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, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at LoadFile.Button2_Click(Object sender, EventArgs e) in r:\TimeCard\LoadFile.aspx.cs:line 138 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Edit 2: I'm using the below code
FileUpload1.PostedFile.SaveAs(mAttachFileName);
where mAttachFileName will be \\LinuxShare\Share\Emp\123.txt