davearia Posted February 14, 2005 Posted February 14, 2005 Hi All, I am trying to upload an image from my local machine to my remote server. Here is the most relavent code: If (filePictureDialog.PostedFile.FileName.Length > 0) Then imageString = System.IO.Path.GetFileNameWithoutExtension(filePictureDialog.PostedFile.FileName) Try filePictureDialog.PostedFile.SaveAs(imageString) imgPigJaw.ImageUrl = imageString Catch ex As Exception txtAdditionalInformation.Text += ex.ToString End Try End If When I run this I get this message: System.UnauthorizedAccessException: Access to the path "E:\WINDOWS\system32\jigsaw2" is denied. I am lost as to what to do with this. I assume that I can alter my settings to give permissions on my machine that will allow the file to be uploaded. I need to get these images from anyone's machine who is using this ASP.NET page regardless of settings. I wouldn't say my security settings are that high and there is no firewall etc. How do I get round this problem please? Thanks, Dave. :D :D :D Quote
davearia Posted February 14, 2005 Author Posted February 14, 2005 Sorry, I was running this locally on my machine (stupid I know). When I run it on the server I get this message: System.IO.DirectoryNotFoundException: Could not find a part of the path "c:\windows\system32\inetsrv\MasterPigJawSuzzle\WebJigsawVault\The_logo.gif". My root directory htdocs has a folder bin which contains the dll of my ASP.NET program. In htdocs there is also a folder called MasterPigJawSuzzle in that is a folder called WebJigsawVault which is where I want to store the image into. I hope this helps you in order to help me. Thank, Dave. Quote
Administrators PlausiblyDamp Posted February 15, 2005 Administrators Posted February 15, 2005 Does the ASPNET account have access to the folder you are trying to save the images to? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.