• 0

ASP.NET user authentication with C#


Question

Hi

I am currently putting together a website using ASP.NET with C#, and I am trying to implement a system of user logins. The site will have anonymous users, registered users and admin users, and I need a way to authenticate each type.

I have purchased a book on ASP.NET with C# and looked through their examples on security etc.. and I'll be using Database Forms Authentication (ie, there will be user details in a database table). I've also searched Google etc.. to try and find a way to get this to work properly, but its just not working the way I want.

Here is the problem................

Someone naviagates to my site and is presented with the homepage. Once there they have the option of logging in, or browsing the forums unregistered, a bit like Neowin here, only nowhere near as good. When they login they are taken to a page which requires them to enter their details and when validated they are taken to their account page. They are also given the option to register a new account.

Now, at the moment I am using the examples in the various books and the information found on the web, although they are identical. I have a web.config file, a login.aspx page and a default.aspx page as described in the tutorials, but when I try to browse the forum pages, the web.config file automatically calls the login.aspx page in an attempt to authenticate users. This is not what I want, as I need people to be able to browse the forums anonymously.

So after all this, my query is this....How can I have a setup like Neowin where I can allow users to login when they wish, and browse the forums unregistered, without having the login.aspx page called every time I want to view an "unprotected" page??

Thank you very much for any help in advance, and my apologies for such a long post

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

may be you could have a guest user link that lets the guests navigate the site with limited goodies

for the admins and reg users you could have a normal login procedure using data commands and data connections for retreiving authentication from the database..

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.