Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...