Reply to topic
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
I think he knows how but didnt want to do the whole login process and was asking for a diff way.
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
well if you have access to the IIS MMC then you can emulate .htaccess from there - but if you don't (as is the case in most hosted instances) you'll have to roll your own in ASP, ASP.NET or CFM

You can use web.config to do a lot of what he is asking to do. You can secure indiviual directories etc and store the usernames & passwords right there if the user base is small enough.
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
i was just saying he want to stay away from doing it through a db
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
the web.config way is what I would look into though - that should be quick & easy enough
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
iknow scott, really wasnt ?'ing that, just were ppl keep going back to the db part, which is what he didnt want but I think he may have already done
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
I'm agreeing with you........
btburger


Joined: 28 Feb 2005
Posts: 12
Reply with quote
It amazes me that you almost have to write code for such a common need. The code may be simple for most of you but it's another thing for amateurs like me to learn. I wish FrontPage had a simple interface to a standard web permissions protocol, but since that's a dream for now, I wish HMS could offer an interface to their permissions feature.
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1047
Location: Felton, Delaware
Reply with quote
Well, web.config isn't very complicated, nor is it very hard. Check this out... http://www.dotnetcoders.com/web/Articles/ShowArticle.aspx?article=186

Goto the bottom of the page... copy and paste one or both examples into a file called "web.config" (without the quotes) and marvel at the beauty of ASP.NET Wink btw, you can't do that with ColdFusion MUAH HA HA!!!
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
It's done this way to give you nearly total control over the security of your website and maximum flexibility. In .NET it's MUCH easier than it was before. It's still easier to do it in Apache with the .htaccess but that's another story altogether and the .htaccess can be just as cryptic.

Here are a couple links to some good articles on configuring directory security using forms authentication in a .NET environment...

http://www.dotnetcoders.com/web/Articles/ShowArticle.aspx?article=186
http://www.wwwcoder.com/main/parentid/258/site/4340/68/default.aspx

The first one seems to nearly emulate the .htaccess approach to directory security - probably about as close as you can get with .NET
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
btw, you can't do that with ColdFusion

umm ok josh, it's actually easier in coldfusion

Application.cfm or now Application.cfc now
jamie
HostMySite Sales Rep
HostMySite Sales Rep

Joined: 19 Mar 2004
Posts: 858
Location: Newark, De
Reply with quote
What's a .cfc?

j/k
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
your fav thing!
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
How would you implement that in your Application.cfm?
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
It amazes me that you almost have to write code for such a common need. The code may be simple for most of you but it's another thing for amateurs like me to learn. I wish FrontPage had a simple interface to a standard web permissions protocol, but since that's a dream for now, I wish HMS could offer an interface to their permissions feature.


well it is fairly easy but first thing is you need to get far far far far far far away from frontpage!!!
I wish frontpage had a lot of things but would take days to describe them all.

You have to write code for it because there are so many ways that you can use it and it's very important, security on a site is no laughing matter, hence why frontpage probably doesn't offer it, frontpage is already so insecure that it's shamefull.

If you are making a site or sites and you are on these forums then you obviously are interested enough in doing this to do it right.
You can search archives here for a ton of frontpage related stuff so you can understand how frontpage will limit you and your website visitors.

Also with the new version of coldfusion and dreamweaver it has a built-in amazing login wizard that is basically what you are asking for.

Bottom line, if I was you I would move to dreamweaver and start to learn a server side language like cfm, .net or php.
But get away from frontpage! And that's not me hatin m$ or fp that's just good advise Smile
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
lots of possible way
see the Application.cfm file is run at each request before any code, so you put things in that file that you would like run and you can have lots of them (just not more than 1 per folder).

So say you have a folder, in this case the folder is the one he wants to protect, just put your Application.cfm file in there .

lets say in this case he doesnt want to do the whole login thing and decides that he wants to limit access to the folder by the users IP address.


Code:
<--- check ip address and if it is the user send them to their home page if not give them an error message --->
<cfif CGI.REMOTE_ADDR NEQ "19.253.2356.23">
  <h1>Sorry you cant access this file</h1>
  <cfabort>
<cfelse>
  <cflocation="index.cfm"
</cfif>



so what that does is everythimg a page from that file is requested it checks the users ip and if its good it lets them go on if not it gives an error message
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 2 of 4  

  
  
 Reply to topic