Results 1 to 10 of 10

Thread: permissoin question-iis

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    permissoin question-iis

    I have a txt file in one of my site's directories. I want my ASP program to be able to read that file but I don't want the users to be able to read it if they type the URL.... what should I do?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Deny anonymous access to the directory.

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by Lethal
    Deny anonymous access to the directory.
    well! my asp.net pages are in the same directory I want people to be able to see my aspx pages so I dont wanna mess with the directory permissions

    as for the file permissions, I denied anonymous access to it, but the problem was that asp.net couldnt access it that way
    so I guess it's not possible... I wanted asp.net to be able to access the TXT file but I didnt want the users to be able to access it
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    Junior Member
    Join Date
    Feb 2003
    Posts
    16
    You should be able to accomplish this using the web.config settings. Do a search for using a "location" setting. Basically it involves setting specific permissions to a path.

  5. #5
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Or simply use the .config extension for the file, because IIS will not serve these types of files for client requests.

  6. #6
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    I dont remember too well but I read an article that said that the web.config fileo only protects aspx pages, so I dont think web.config would protect a txt file. Do what Lethal said and deny anonymous access but give the asp.net process access to it.

  7. #7
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Originally posted by DevGrp
    I dont remember too well but I read an article that said that the web.config fileo only protects aspx pages, so I dont think web.config would protect a txt file.
    Yeah, I think I read something along those lines as well. Just do what lethal said...

  8. #8
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    I have never done it, but can't you just add the text file to its own folder, and add a web.config file in that folder denying access?

  9. #9
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Originally posted by hellswraith
    I have never done it, but can't you just add the text file to its own folder, and add a web.config file in that folder denying access?
    That is what DevGrp is referring 2. He thinks it only works for aspx pages (i think i read this somewhere also)

  10. #10
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    put the text in another directory and dont give it any kind of user access?
    \m/\m/

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