Session state is a funny thing. It works really well. But if users don’t stay active, they’ll lose their session. That can make for some really strange problems if session isn’t used immediately. Of course session can be checked for, but that’s a hassle. It would be easier to simply log users out before their session expires. Read more
I’m working on a project right now that requires certain behavior when in case the system starts spinning out of control. Specifically, if the CPU the system is on hits 90% for more than 5 minutes in a row or if we run out of RAM for 5 minutes, we need to take certain actions.
The question I’m addressing in this post is not how to detect CPU utilization or Memory usage in C#… it’s how to load up your system so you can actually hit 100% CPU or use up all the RAM.
You could write a program that does it, but it turns out there’s already a tool for it. The CONSUME command in Windows will allow you to load your system the way you want.
Using the command, you can spool up your CPU utilization so you can test your program. It’s really slick.
Do you need to decrypt an app.config file? There are lots of directions explaining the process if you’re dealing with a web application, but if you’re dealing with a windows app or a service of some sort, you don’t have a web.config… all you have is an app.config. The process isn’t all that different.
Here’s what an encrypted app.config “appSettings” section might look like. Read more
Recently, I’ve been working on a project that relies on a backend business object layer. The business object (BO) layer, requires authentication in order to be used. For most of the systems, this is okay, but my project is to be used by end users. We don’t need to authenticate the users… we need to authenticate the system.
This is easy enough using the CustomPrincipal object in Rocky Lhotka’s CSLA framework (which is also being used). We simply create the CustomPrincipal and add that to the ApplicationContext. Read more