Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Web.Config

Web.Config

Scheduled Pinned Locked Moved ASP.NET
securityquestioncsharpdatabasewindows-admin
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Wender Oliveira
    wrote on last edited by
    #1

    Hello guys... I know that it's a stupid question but I really don't know how to do... I have my tree folder as follow: wwwroot\Application\ wwwroot\Application\xml\ wwwroot\Application\images\ etc... I have 2 web.config files... one on my main application folder and another on may xml folder. What I want to is just to deny access to my xml folder by using web.config. My main application web.config has this block: (...) <authentication mode="Windows" /> > <authorization> <allow users="*" /> </authorization> (...) and my xml folder web.config are only these lines <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <authorization> <deny users="*" /> </authorization> </system.web> </configuration> So... when I try to access any file on my xml folder the access is granted... If I do this it's enough but if I could force authentication would be great... I don't want authentication by windows, IIS or users on my web.config but authentication from users on my Database... So many questions... thanks a lot! Wender Oliveira .NET Programmer

    J T 2 Replies Last reply
    0
    • W Wender Oliveira

      Hello guys... I know that it's a stupid question but I really don't know how to do... I have my tree folder as follow: wwwroot\Application\ wwwroot\Application\xml\ wwwroot\Application\images\ etc... I have 2 web.config files... one on my main application folder and another on may xml folder. What I want to is just to deny access to my xml folder by using web.config. My main application web.config has this block: (...) <authentication mode="Windows" /> > <authorization> <allow users="*" /> </authorization> (...) and my xml folder web.config are only these lines <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <authorization> <deny users="*" /> </authorization> </system.web> </configuration> So... when I try to access any file on my xml folder the access is granted... If I do this it's enough but if I could force authentication would be great... I don't want authentication by windows, IIS or users on my web.config but authentication from users on my Database... So many questions... thanks a lot! Wender Oliveira .NET Programmer

      J Offline
      J Offline
      Juno EasyDotNet com
      wrote on last edited by
      #2

      Hi, You can use "form" authentication mode in your main web.config. Here is an articl from MS, http://support.microsoft.com/default.aspx?scid=kb;en-us;308157 Juno MCSD.NET, MCDBA, MCSE ---------------------------------------------------------- Support Team of EasyDotNet, INC. http://www.EasyDotNet.com DataForm.NET - The most powerful data entry web server control for ASP.NET

      1 Reply Last reply
      0
      • W Wender Oliveira

        Hello guys... I know that it's a stupid question but I really don't know how to do... I have my tree folder as follow: wwwroot\Application\ wwwroot\Application\xml\ wwwroot\Application\images\ etc... I have 2 web.config files... one on my main application folder and another on may xml folder. What I want to is just to deny access to my xml folder by using web.config. My main application web.config has this block: (...) <authentication mode="Windows" /> > <authorization> <allow users="*" /> </authorization> (...) and my xml folder web.config are only these lines <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <authorization> <deny users="*" /> </authorization> </system.web> </configuration> So... when I try to access any file on my xml folder the access is granted... If I do this it's enough but if I could force authentication would be great... I don't want authentication by windows, IIS or users on my web.config but authentication from users on my Database... So many questions... thanks a lot! Wender Oliveira .NET Programmer

        T Offline
        T Offline
        Tim Featherston
        wrote on last edited by
        #3

        Wouldn't you need to allow users in the XML folder, identify the user at Session_Start set a Session vairable that this user has permissions to view the contents of the XML folder, then modify every page in the XML folder to check the session variable and act accordingly? TF Tim Featherston www.QBSix.com

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups