•  Dimi
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
It's not first time when I see that. I create a new forum as Admin, then without logout/login I want to open this new forum and post a new message. When I click "New Topic" the forum goes to the Forum list instead of starting a new Topic. If I logout and then Login it works just fine. I guess the forum intentionally doesn't refresh the forum list until the user logins.

Here is a trick that I impemented in my app a long time ago. There is a special database table having all constants. One constant keeps the latest datetime of any structural changes. Each session starts and grabs this value. If any (Admin) session changes anything, say, menu, or the forum tree like in this case, it changes this datetime. It's actually done in parameter less SQl SP. Each session checks for this value every time during postback. If the value is newer than the one stored in the session it refreshes the required values, in this particular case the forum tree. it's not a big deal to check it, it doesn't slow the whole app down. Our working app has over half-a-terabyte database and a lot of users and it works just fine.

The same or similar approach can be used to shut all the sessions down if the admin decided to block an appropriate IP address. But there is an easier way to do that. We can get access to any session from the admin session and simply call Abandon() to stop it. Once it's done and the IP is blocked the user will be shut down right away with no return back.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved