Thursday, March 22, 2012

Login page

Hey guys,
i'm about to build an website with a few mates and we'd like to have an login page. We only want that members can access a few pages... i think it's posible in ASP right?

Anyway,
Cud sumone plz recommend us a simple guide on how to do this?

Best

DanielHello, you might have a look at the following links:

1-Using Forms Authentication in ASP.NET - Part 1
2-Using Forms Authentication in ASP.NET - Part 2
3-Forms-Based Authentication

Regards.
I am trying to learn to use forms based authentication.

I checked out the following tutorial yet there is one thing I am not clear on

http://www.15seconds.com/issue/020220.htm

When it says to make the standard forms folder an application inside internet services manager, how do we do that exactly?
Hello, this means that, you need to create a virtual directory or application.
to do so:

start -> settings -> control panel -> Administrative tools -> Internet information Services(double click) -> from the menu on your left, choose the physical folder on your hard disk where you place your files for example, if you have a folder in your root as follows:
c:\inetpub\wwwroot\test,
then in IIS, under computer name, web sites, defaul web site, test, right click on test, then properties, once a window opens, choose "create" in the bottom.
This way you have created a virtual directory that can run aspx files.

Regards.
Why do we need to do this. The example works fine without stopring anything within the newly created directory?
I have another question about the second page sample with the hashed password. In terms of usage, how do we create an xml file with the hashed password. I know that the example password is "test" but if we want more realistic usage of this example wouldn't we need to have a way of seeing the hash codes for our selected password while creating the users.xml file?
Hello, well, aspx runs only if the folder where the aspx files reside is an application or virtual directory. When you have some accesses to the DB, you can't do them without having your files in an application. Not only that, any server-side code to run, should be in that directory.

Regards.
Listen,
the articles usually, aim at just explaining ideas. What you can do is read them, understand them. then, build you our applications.
What I usually do is, store the hased passwords together with the usernames in the database.
When the user want to login, I get his/her password, do the same hash, and then compare it to the one in the DB.

Regards.

0 comments:

Post a Comment