469,609 Members | 1,455 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

adding user name & password to FileUpload


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
Oct 22 '08 #1
0 924

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Allan Hugo | last post: by
6 posts views Thread by Lou | last post: by
4 posts views Thread by Dave | last post: by
6 posts views Thread by Jeff | last post: by
3 posts views Thread by Jerry Spence1 | last post: by
reply views Thread by Solution2021 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.