Saturday, 15 May 2010

c# - cannot upload file to server getting error "device not ready" -


When I'm trying to upload .htm file to select a file server dropdown list me the details of the exception is to find exceptions below

  system by user code. IOkIOException was busting message = device is not ready. Source = mscorlib StackTrace: at System.IO .__ Error.WinIOError (Int32 errorCode, String maybeFullPath) (string path System.IO.FileStream.Init, FileMode mode, using FileAccess, Int32 rights, Boolean useRights, fileshare share, Int32 BufferSize, FileOptions option, SECURITY_ATTRIBUTES on System.IO.FileStream..ctor secAttrs, string msgPath, Boolean bFromProxy, Boolean useLongPath) (string path System.IO.StreamReader, FileMode mode, using FileAccess, fileshare share, Int32 BufferSize, FileOptions the option). .ctor (string path, Encoding encoding, Boolean DetectEncodingFromByteOrderMarks, Int32 BufferSize) on System.IO.StreamReader..ctor (string path, Encoding encoding) on ​​System.IO.File.InternalReadAllText (string path, Encoding encoding) at System.IO .File.ReadAllText (String Path) in e_request.Report.DropDownList1_SelectedIndexChanged (Object Sender, EventArgs e): \ Users \ Administrator \ Desktop \ SmartUltrasoundPatientSchedulingSystem \ t runk \ code \ e_request \ e_request \ Report_Writing.aspx.cs: Line System .Web.UI.WebControls.ListControl.OnSelectedIndexChanged (EventArgs e) (on System.Web.UI.WebControls.DropDownList.RaisePostDataChangedEvent) 107 .UI.WebCo on System.Web Ntrols.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent () at System.Web.UI.Page.RaiseChangedEvents () System.Web.UI.Page.ProcessRequestMain (Boolean are included in StagesBeforeAsyncPoint, Boolean StagesAfterAsyncPoint) string Doc_content = File.ReadAllText ( "e: \\ Rajesh \\ US_schedular \\ template_htm \\" + DropDownList1.SelectedItem + ".htm"); Doc_content = Server.HtmlEncode (Doc_content); Foreach (String Parameter in Description) {Doc_content = ReplaceText (Doc_content, variablenames [count], parameters); Count ++; } CcAditor 1 Text = doctor_content;  

I think that you do not have to access the directory this method .

  Srhwarkmappth (...)  


No comments:

Post a Comment