Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个带有身份验证的 ASP.NET MVC 剃须刀应用程序。我使用了 AuthorizeAttribute 的自定义实现。
当我在本地运行它时,它工作正常,但是当我从网站上传并运行它时,它经常在工作时注销,而不会让网站闲置。
我该如何解决?
如果 asp.net 会话存储在内存中并且您回收应用程序域,您将丢失内存中的所有会话。如果您控制 Web 服务器,您可能会研究任何回收的原因:请参阅. 如果您希望会话在这些事件中持续存在,则需要查看其他会话状态模式