Results 1 to 3 of 3

Thread: [RESOLVED] need help with upload feature...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    150

    [RESOLVED] need help with upload feature...

    Hey guys
    I am trying to provide an upload facility for my web application (asp.net with vb code) and am gettign the following error...

    'Access to the path "c:\inetpub\wwwroot\datagridtest\uploadfiles\displaypic.PNG" is denied.'



    my current code is :-

    objCmd.CommandText = "prc_InsertAttachment1"
    objCmd.CommandType = CommandType.StoredProcedure
    objCmd.Parameters.Clear()
    objCmd.Parameters.Add("@FileName", SqlDbType.VarChar, 100).Value = ""
    sFile = fil1.PostedFile.FileName
    If sFile.Length > 0 Then
    Dim sSplit1() As String
    sSplit1 = Split(sFile, "\")
    sFile = sSplit1(UBound(sSplit1))
    fil1.PostedFile.SaveAs(Server.MapPath("/") & "\datagridtest\uploadfiles\" & sFile)
    objCmd.Parameters(1).Value = sFile
    objCmd.ExecuteNonQuery()
    End If


    problem is that it brings up an error about permissions
    does anyone know the exact steps of how I am supposed to set the permission of the 'uploadfiles' folder to allow a file to be able to be written to the folder?
    Last edited by eakin; Sep 29th, 2005 at 07:03 AM.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    150

    Re: need help with upload feature...

    I beleive I should set access permission on the folder to ASPNET
    I could do this on windows 2000 server but my version of windows only provies the following tabs under properties


    general sharing web sharing customise

    any idea??
    Last edited by eakin; Sep 29th, 2005 at 06:20 AM.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    150

    Re: need help with upload feature...

    ok problem was I had no security tab because it was disabled

    for anyone with the same problem


    Open up Windows Explorer, open the Tools menu, choose Folder Options, and go to the View tab. The last item in the list is called "Use simple file sharing." Uncheck this box, click Apply and OK
    Last edited by eakin; Sep 29th, 2005 at 12:32 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width