![]() |
| Password protecting folder? |
|
DatabaseDude
|
I've gone to certain sites where a pop-up browser window asks for username/password, and has a checkbox for "remember me." How can this be enabled for a folder?
Thanks, Bryant |
||||||||||||
|
|
|||||||||||||
|
loftboy
Forum Regular
|
are you using a server-side language? such as coldfusion, php or .net?
can also be done old school with cgi |
||||||||||||
|
|
|||||||||||||
|
bobum
Elvis Fanatic
![]()
|
in Apache you can password protect directories with .htaccess
|
||||||||||||
|
|
|||||||||||||
|
DatabaseDude
|
I can do ASP.NET, ASP, or ColdFusion (preferred in that order). Old School for me these days is Access 97 Thanks, Bryant |
||||||||||||||
|
|
|||||||||||||||
|
loftboy
Forum Regular
|
well scott or josh can help u with the ms stuff or I can with the coldfusion way just let us know what exactly ur trying to accomplish and how u wanna get there and we will help
|
||||||||||||
|
|
|||||||||||||
|
DatabaseDude
|
Fair enough
Thanks in advance, Bryant |
||||||||||||
|
|
|||||||||||||
|
loftboy
Forum Regular
|
well to really do that right you need some kinda login security system.
If its really temperary then say in coldfusion you can add a Application.cfm page in the folder and add a small script that would only allow their ip addresses or addresses view the contents. Would be real simple but the pages would need to be cfm pages. what are the pages currently, if they are updating them? |
||||||||||||
|
|
|||||||||||||
|
DatabaseDude
|
The pages they will be working with are ASP.NET. Is there an equivalent way to do it in Web.config? Thanks, Bryant |
||||||||||||||
|
|
|||||||||||||||
|
loftboy
Forum Regular
|
that I don't know, I stay FARRRRRRRRRRRRR away from anything microsoft related.
I'm sure you can even do a java detect ip code or something and slap on the pages |
||||||||||||
|
|
|||||||||||||
|
btburger
|
I can offer a not-very-technical answer since I am a novice at web development.
FrontPage offers a user interface to protect a folder by making it a "subweb". The UI is stunningly contorted and buggy, and Apple's Safari browser seems unable to access these folders. If I haven't yet discouraged you, google should reveal several efforts to drag you through the UI. Alternatively, the fabulous HMS techs can protect a folder for you. The only downside is that each time you want to do this or change the password, you need to contact them. It would be neat if I could administer this myself. But this approach has been working great for me. It seems to work with all browsers. Anyone know if there's a way to apply just a password (no user name) to a folder? |
||||||||||||
|
|
|||||||||||||
|
loftboy
Forum Regular
|
ut oh!! a fp user!
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH Hopefully he's not using frontpage, you should go read the many threads on here about the terribleness of frontpage!!!!! Of course fp won't correctly render in safari or really any non m$ related browser, you don't actually think m$ would let that happen! haha Those folders you reference are ms only frontpage extension that are also MASSIVE security holes (imagine that!), so I wouldn't concider this an option. bt, we need to get you over to dreamweaver my friend! |
||||||||||||
|
|
|||||||||||||
|
DatabaseDude
|
My views on FrontPage? "When I was a child, I spake as a child, I understood as a child, I thought as a child: but when I became a man, I put away childish things." ‑ 1 Corinthians 13:11 Strictly Dreamweaver here, with an occasional flurry of MS VB.NET. If I should go ahead and build security in the traditional way because this would take a bit of time, no prob ... just looking at alternatives Thanks, Bryant |
||||||||||||||
|
|
|||||||||||||||
|
loftboy
Forum Regular
|
i googled "java restrict access by ip" and there is plenty of stuff or even cgi but i would just build a pw protected area, I know in cfm it takes me awhole 5 minutes and that would be what i'd do
|
||||||||||||
|
|
|||||||||||||
|
Josh
Forum Regular
|
You can accomplish this w/ ASP.net...
what you'll first need is a repository of Username/password combinations - either via an Access DB, or SQL, MySQL, or even an XML file - it doesn't really matter as long as there's an easy way to pull the info. Then, you can have a default.aspx page in the requested directory that opens a JS modal dialogue and prompts for username and password. You can also provide the checkbox and associate it with a cookie value - if checked, cookie is saved w/ Username and Password, if not then no |
||||||||||||
|
|
|||||||||||||
|
bobum
Elvis Fanatic
![]()
|
IIRC you can eve store the user names and passwords in the web.config file and go that route if it's a small web and you just need simple protection. If it's larger than that I'd go with a DB or an XML file. You can get really complex with security if you want to. To do it in .Net you will probably want to look at Forms Authentication (Google that)
for my simple protection I use a little 9 line script - looks like this... This is classic ASP...
This doesn't come up in a popup window or ask to set cookies - but it should get you going. If you include this at the top of every page it'll ask for a password and if sucessfull - will store "ok" as a session variable to allow them access to all other protected pages as long as they are int hat session. Google, or check out some of the script repositories like ASPIN.com or hotscripts.com for some places to get you started. |
||||||||||||||
|
|
|||||||||||||||
| Password protecting folder? |
|
||
|



