View Single Post
  #1 (permalink)  
Old January 16th, 2005, 08:08 AM
daliaca daliaca is offline
Registered User
Join Date: Jan 2005
Location: jerusalem, , Israel.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default access denied when uploading file

i have a application which upload a file. i want to save the uploaded file on a remote server on the domain. this is my script:

        Dim plc As Integer
        plc = textbox1.PostedFile.FileName.LastIndexOf("\")
        plc = Len(clientFile.PostedFile.FileName) - plc - 1
        Dim ofile As String = Right(clientFile.PostedFile.FileName, plc)
        Dim filepath As String = "\\serverName\TempLib" & ofile

i got the error:
System.UnauthorizedAccessException: Access to the path "..." is denied.
in the web.config i have <identity impersonate ="true">
the library on the remote server has permission to the user.

thanks for anyone who can help me on this problem.

dalia caspi