Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

ASP Chat Forum

Options
  • 25-01-2009 6:00pm
    #1
    Registered Users Posts: 33


    Hi,

    I'm trying to develop a chat forum for a website in ASP, and I'm not sure of the steps to go through to create one properly. I know I have to setup a global.asa file, but not sure where, and what should be in it. I don't want the forum to be too complicated. Basically, on the site, I want users to be able to log in (or create a user account) and then be able to add items to the chat forum, and have a timeout, and if the user logs in in 1 machine, logs in again a few minutes later, that it will end the first session that they logged into.

    If anyone can help me, please pass on your views.

    Thanks in advance.

    Ed


Comments

  • Users Awaiting Email Confirmation Posts: 351 ✭✭ron_darrell


    Not sure about the global.asa file - not sure if you'd really need it though I'm sure many will disagree with me on this. What you will need is some sort of database to store your forum posts and users, and I'd be suggesting getting to grips with sessions to aid in how many users are online at a time and who can post and where.

    Your first step is the database. You'll need a table to store posts, (possibly) a table for the different types of forii and a table for the users information (username, password, email address etc.). If this is a simple classroom project I'd suggest MS-Access as it's easy to set up and plenty of code snippets exist for connecting to an Access database using ASP. If it's for a site that you hope to go live with I'd suggest something a bit more robust, MS SQL Server if you can afford it, MySQL if you're looking for something free.

    Next you need to write the pages to connect to the database tables. For this you'll need to learn some basic ASP commands and get a handle on the SQL (Standard Query Language I think it's called). For tutorials on either go to [link]www.w3schools.com[/link]

    I've given only a bare bones here because your problem description is the same. If you need more help, come back with more specific problems.

    Regards,
    RD

    PS

    As regards the session problem, add a logout page to aid the more helpful users that destroys the session. To get the less helpful ones, add an onunload event to the pages to redirect them to this page if they attempt to leave without logging out. Reduce the session length and add a timeout event to the pages to check if they're still on the page periodically and refresh the page if they are. Obviously then if they're not on the page (i.e. logged off or elsewhere) then the page can't refresh and the session dies. Finally, you could have a database table keeping track of logged on and in time users. If they log on again, the previous session could be destroyed or reused.


  • Registered Users Posts: 33 eamokeno


    Hi Ron,

    Thanks for getting back to me. To update you, I know how to form tables in databases, and contruct the SQL commands to update the tables in the databases. I'm just not sure as to how the sessions would work. I had read that that's why I'd need the global.asa file to determine settings for users sessions. What I really need help with is, determining how sessions should be set up for users logging on to the forum, and how I should set it up to have these users able to carry their sessions throughout the entire site without the session being disconnected.

    Thanks.


Advertisement