vs 2005 - vb - web page - xp pro
I'm trying to use the fileupload control.
I assume I need to add a user name and password, but can't figure out how.
Dim UpLoadPath As String
UpLoadPath = Server.MapPath("\Blah\") 'I've tried several different
variations of this
Try
fuLoadPromoFile.PostedFile.SaveAs(UpLoadPath & fuLoadPromoFile.FileName)
Label1.Text = "File uploaded!"
Catch ex As Exception
Label1.Text = "File could not be uploaded. " & ex.ToString
End Try
File could not be uploaded. System.UnauthorizedAccessException: Access to
the path 'Blah Blah Blah' is denied. 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) at System.Web.HttpPostedFile.SaveAs(String filename) at
Blah_Default.Button2_Click(Object sender, EventArgs e) in
http://server//Blah/Default.aspx.vb:line 22
Thanks