p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET Website Programming Problem-Design-Solution (http://p2p.wrox.com/forumdisplay.php?f=23)
-   -   access denied when uploading file (http://p2p.wrox.com/showthread.php?t=23943)

daliaca January 16th, 2005 08:08 AM

access denied when uploading file
 
i have a asp.net 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
        clientFile.PostedFile.SaveAs(filepath)

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


englere January 16th, 2005 11:08 AM

It sounds like you're impersonating the identitity coming to you from IIS. What are the setttings on IIS - is it passing you the true credentials of a user on your Windows network, or is it passing you it's own identity (normally IUSR_machinename)?

IUSR_machinename is a low priviledge account, similar to ASPNET.

Eric


All times are GMT -4. The time now is 02:49 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.