Avrei un'altra domanda da fare, il codice postato sopra provato in locale va ma provato sullo spazio web mi da il seguente errore:
codice:
Server Error in '/' Application.
Could not find a part of the path 'f:\DZHosts\LocalUser\Neptune\Neptune.somee.com\public\icq.txt'.
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.DirectoryNotFoundException: Could not find a part of the path 'f:\DZHosts\LocalUser\Neptune\Neptune.somee.com\public\icq.txt'.
Source Error:
Line 17:
Line 18: ' salviamo il file nel percorso calcolato
Line 19: FileUpload1.SaveAs(FilePath)
Line 20:
Line 21: ' mandiamo un messaggio all'utente
Source File: f:\DZHosts\LocalUser\Neptune\Neptune.somee.com\lo\Default.aspx.vb Line: 19
Stack Trace:
[DirectoryNotFoundException: Could not find a part of the path 'f:\DZHosts\LocalUser\Neptune\Neptune.somee.com\public\icq.txt'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2013856
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) +998
System.IO.FileStream..ctor(String path, FileMode mode) +65
System.Web.HttpPostedFile.SaveAs(String filename) +87
System.Web.UI.WebControls.FileUpload.SaveAs(String filename) +22
_Default.Button1_Click(Object sender, EventArgs e) in f:\DZHosts\LocalUser\Neptune\Neptune.somee.com\lo\Default.aspx.vb:19
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
Immagino sia un errore legato al percorso di destinazione del file da uplodare, ma in pratica qual'è l'errore? non bisogna dargli il percorso fisico? è semplicemente un impostazione del server? cosa?