Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7024827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:53:36+00:00 2026-05-27T23:53:36+00:00

I am designing an online time tracking software to be used internally. I am

  • 0

I am designing an online time tracking software to be used internally. I am fairly new to c# and .NET though I have extensive PHP experience.

I am using Windows Forms Authentication, and once the user logs in using that, I create a Timesheet object (my own custom class).

As part of this class, I have a constructor that checks the SQL DB for information (recent entries by this user, user preferences, etc.)

Should I be storing this information in a session? And then checking the session object in the constructor first? That seems the obvious approach, but most examples I’ve looked at don’t make much use of sessions. Is there something I don’t know that others do (specifically related to .NET sessions of course)?

EDIT:
I forgot to mention two things.
1. My SQL DB is on another server (though I believe they are both on the same network, so not much of an issue)
2. There are certain constants that the user will not be able to change (only the admin can modify them) such as project tasks. These are used on every page, but loaded the first time from the DB. Should I be storing these in a session? If not, where else?
The only other way I can think of is a local flat file that updates each time the table of projects is updated, but that seems like a hack solution. Am I trying too hard to minimize calls to the DB?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:53:37+00:00Added an answer on May 27, 2026 at 11:53 pm

    There is a good overview on ASP.NET Session here: ASP.NET Session State.

    If you don’t have thousands of clients, but need “some state” stored server-side, this is very easy to use and works well. It can also be stored in the database in multi server scenarios, without changing a line in your code, just by configuration.

    My advise would be not to store “big”, or full object hierarchies in there, as storing in a session (if the session is shared among servers in a web farm in a database for example) can be somewhat costy. If you plan to have only one server, this is not really a problem, but you have to know that you won’t be able to easily move to a multiple server mode easily.

    The worst thing to do is follow the guys who just say “session is bad, whooooo!”, don’t use it, and eventually rewrite your own system. If you need it, use it 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am designing an online accounting system as a college project. I have got
I'm new to PHP (and web development in general) and have come across something
Well, I'm designing an online service that needs subscription in order to be used
I am designing a online website (PHP, HTML and MySQL) with one of the
We are designing an online application (college admission form) which mandates the user to
When designing a C API for configuring a library/utility, I have a co-worker who
While designing a new WPF application I noticed exceptions not being thrown during data
When designing a form I have the option of putting a close button at
While designing applications it is a very good practice to have all the business
I am designing a simple database of online exam system. But I can not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.