Reply to topic
Password protecting folder?
DatabaseDude


Joined: 04 Mar 2005
Posts: 67
Location: Elkins, WV
Reply with quote
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

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
are you using a server-side language? such as coldfusion, php or .net?
can also be done old school with cgi
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
in Apache you can password protect directories with .htaccess
DatabaseDude


Joined: 04 Mar 2005
Posts: 67
Location: Elkins, WV
Reply with quote
loftboy wrote:
are you using a server-side language? such as coldfusion, php or .net?


I can do ASP.NET, ASP, or ColdFusion (preferred in that order).

Old School for me these days is Access 97 Cool

Thanks,
Bryant
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
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 Smile
DatabaseDude


Joined: 04 Mar 2005
Posts: 67
Location: Elkins, WV
Reply with quote
Fair enough Smile There's a folder that will contain pages that are for the use of a single customer right now. Rather than build the table architecture and security in SQL right now, I just want to make sure only they will be able to navigate there to do their updates. This will be temporary, I expect, but I really didn't now where to start.

Thanks in advance,
Bryant
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
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


Joined: 04 Mar 2005
Posts: 67
Location: Elkins, WV
Reply with quote
loftboy wrote:
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?


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

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
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


Joined: 28 Feb 2005
Posts: 12
Reply with quote
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

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
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


Joined: 04 Mar 2005
Posts: 67
Location: Elkins, WV
Reply with quote
loftboy wrote:

Hopefully he's not using frontpage, you should go read the many threads on here about the terribleness of frontpage!!!!!


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

Wink

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 Smile

Thanks,
Bryant
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
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 Smile
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1029
Location: Felton, Delaware
Reply with quote
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 Wink Pretty easy really.
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
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...
Code:

<%
ThisPage = Request.ServerVariables("SCRIPT_NAME")
If Request.Form("pass") <> "" Then
   If Trim(Request.Form("pass")) = "myPa55word" Then Session("level") = "ok"
End If
If Session("level") <> "ok" Then
   Response.Write "<form method=""post"" action=""" & ThisPage & """><input type=""password"" name=""pass"" /><input type=""submit"" value=""Login""/></form>"
   Response.End
End If
%>


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?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 4  

  
  
 Reply to topic