|
-
Apr 4th, 2004, 11:01 AM
#1
Thread Starter
Fanatic Member
uploading image [RESOLVED]
hey all
im writing an aspx page, which uses the "file field" control to upload image, however im getting a security warning "access denide" do u know what security account asp.net uses ?
many thanks
'ok i dont thnk its a security problem this is the error im getting
System.IO.DirectoryNotFoundException: Could not find a part of the path "D:\Domains\usedseadoo.co.uk\adpics". at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at usedseadoo.co.uk.placead.Button1_ServerClick(Object sender, EventArgs e) in H:\Live Web Sites\usedseadoo.co.uk\PlaceAd.aspx.vb:line 40
VB Code:
Private Sub Button1_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ServerClick
If Not (Me.UploadFile.PostedFile Is Nothing) Then
Try
UploadFile.PostedFile.SaveAs("D:\Domains\usedseadoo.co.uk\adpics")
Me.Label2.Text = "File uploaded"
Catch ex As Exception
Me.Label2.Text = "Error saving file <b>C:\\" & _
UploadFile.Value & "</b><br>" & ex.ToString()
End Try
End If
End Sub
Last edited by carlblanchard; Apr 4th, 2004 at 02:00 PM.
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
-
Apr 4th, 2004, 01:07 PM
#2
Frenzied Member
Make sure the ASPNET account has the correct permissions on this location.
D:\Domains\usedseadoo.co.uk\adpics
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|