asp.net mvc 4内网应用用户

时间:2022-03-05 01:36:36

Im in the process of building a intranet application using windows authentication. The problem im having is that if 2 users use the application at the same time, for some reason the user that last opened the page's details are on both sessions. Im not using a database.

我正在使用Windows身份验证构建Intranet应用程序。我遇到的问题是,如果2个用户同时使用该应用程序,由于某种原因,上次打开该页面详细信息的用户都在两个会话中。我没有使用数据库。

Is there a way to give each user an instance of the application?

有没有办法给每个用户一个应用程序的实例?

1 个解决方案

#1


1  

It looks like you have stored the model in a static property somewhere which might explain the behavior. You mentioned that you are not using a database, so I guess you have invented some persistence in your application.

看起来您已将模型存储在某个静态属性中,这可能会解释该行为。你提到你没有使用数据库,所以我猜你在你的应用程序中发明了一些持久性。

If you don't to persist user specific data you could use Session instead of static properties.

如果您不保留用户特定数据,则可以使用Session而不是静态属性。

#1


1  

It looks like you have stored the model in a static property somewhere which might explain the behavior. You mentioned that you are not using a database, so I guess you have invented some persistence in your application.

看起来您已将模型存储在某个静态属性中,这可能会解释该行为。你提到你没有使用数据库,所以我猜你在你的应用程序中发明了一些持久性。

If you don't to persist user specific data you could use Session instead of static properties.

如果您不保留用户特定数据,则可以使用Session而不是静态属性。