如何跟踪和消除会话滥用?

时间:2022-12-25 19:55:20

I'm pretty sure that there have been developers in the past that have severely abused our poor friend ASP.NET session state. Session would love to help track things between requests, but can only do so much! Please help me ease its pain so that it can work with us happily ever after.

我敢肯定,过去有开发人员严重滥用我们可怜的朋友ASP。净会话状态。Session很乐意帮助跟踪请求之间的事情,但是只能做这么多!请帮我减轻它的痛苦,这样它就可以永远和我们一起愉快地工作了。

Does anyone know of a tool that can monitor session sizes across multiple in memory sessions? We currently have IP affinity turned on at the load ballancer because the sessions are so big people want to keep them in memory. I want to be able to monitor both average session size as well as individual sessions, which applications have been accessing them, and what is being stored in the session.

有人知道一种工具可以在内存会话中跨多个会话监视会话大小吗?目前,我们在负载均衡器上打开了IP关联,因为会话太大了,所以人们希望将它们保存在内存中。我希望能够监视平均会话大小和各个会话(应用程序一直在访问它们)以及会话中存储的内容。

This heartess, inconsiderate abuse of session state must stop now. Together, we can find an answer.

这种对会话状态的无情、不体谅的虐待现在必须停止。我们可以一起找到答案。

2 个解决方案

#1


2  

I guess you could implement something like this custom session provider and add some monitoring instead of zipping. That would of course make the session object bigger and slower but it could give you the monitoring you want.

我猜您可以实现类似这个自定义会话提供程序的东西,并添加一些监视而不是压缩。这当然会使会话对象变得越来越大,越来越慢,但是它可以提供您想要的监视。

If you use SQL as session provider you should be able to monitor it in sqlserver, but of course sql server makes session handling slower..

如果您使用SQL作为会话提供程序,您应该能够在sqlserver中监视它,但是SQL server当然会使会话处理速度变慢。

#2


0  

I agree that Sessions are being abused. I am not currently aware of a tool to monitor Session sizes, but I do recommend code walk-through's before releasing your application to the masses.

我同意会话被滥用。我目前还没有意识到一个监视会话大小的工具,但是我建议在向大众发布应用程序之前,先进行代码演练。

By doing a code walk-through, you can easily identify what type of information is being stored in a session, how it is being used, and get an idea of it's size. (For example, stored an entire dataset as a Session variable)

通过执行代码遍历,您可以很容易地确定会话中存储的信息类型、如何使用这些信息,并了解它们的大小。(例如,将整个数据集存储为会话变量)

#1


2  

I guess you could implement something like this custom session provider and add some monitoring instead of zipping. That would of course make the session object bigger and slower but it could give you the monitoring you want.

我猜您可以实现类似这个自定义会话提供程序的东西,并添加一些监视而不是压缩。这当然会使会话对象变得越来越大,越来越慢,但是它可以提供您想要的监视。

If you use SQL as session provider you should be able to monitor it in sqlserver, but of course sql server makes session handling slower..

如果您使用SQL作为会话提供程序,您应该能够在sqlserver中监视它,但是SQL server当然会使会话处理速度变慢。

#2


0  

I agree that Sessions are being abused. I am not currently aware of a tool to monitor Session sizes, but I do recommend code walk-through's before releasing your application to the masses.

我同意会话被滥用。我目前还没有意识到一个监视会话大小的工具,但是我建议在向大众发布应用程序之前,先进行代码演练。

By doing a code walk-through, you can easily identify what type of information is being stored in a session, how it is being used, and get an idea of it's size. (For example, stored an entire dataset as a Session variable)

通过执行代码遍历,您可以很容易地确定会话中存储的信息类型、如何使用这些信息,并了解它们的大小。(例如,将整个数据集存储为会话变量)