asp.net-mvc - NHibernate + IIS7.5 抛出 "A session factory has already been configured with the key of nhibernate.current_session"

标签 asp.net-mvc nhibernate iis-7.5 s#arp-architecture

使用S#arp Architecture 2.3 RC,我尝试发布两个主要使用相同代码库的网站。我发布的第一个应用程序运行正常,但是,在部署并尝试运行第二个应用程序时,出现以下异常:

Access to the path 'C:\Windows\TEMP\nhibernate.current_session--851346262.bin' is denied.

当我刷新窗口时,我收到此异常:

A session factory has already been configured with the key of nhibernate.current_session

我什至尝试将它们加载到单独的应用程序池中,但错误仍然存​​在。我不明白为什么我的两个应用程序的 session 在 IIS 上发生冲突,而它们在 Visual Studio 上运行得很好。

仅供引用,我正在尝试在 Windows Server 2008 R2 + IIS 7.5 上运行它们

有什么帮助吗?

最佳答案

我通过将应用程序池的身份更改为具有更多权限的身份来“修复”它,例如本地系统。如果您有权访问源代码,则这不是一个合适的解决方案。

关于asp.net-mvc - NHibernate + IIS7.5 抛出 "A session factory has already been configured with the key of nhibernate.current_session",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7286594/

相关文章:

asp.net-mvc - 将 Visual Studio 项目转换为 ASP.NET MVC

c# - NHibernate firebird 错误 - 索引超出范围

c# - 使用 Nhibernate 获取表锁 (MyIsam)

asp.net-mvc - httpErrors errorMode = "Detailed"仅适用于特定错误代码

asp.net - 是否可以使用 .NET Remoting + TLS 1.2(或 1.1)?

c# - 在 ASP.NET MVC 中实现一个简单的搜索功能

c# - 模型绑定(bind)绑定(bind)我的 json 数组,但不绑定(bind)值

c# - 无法找到请求的.Net Framework 数据提供程序。它可能没有安装。

c# - 无法解析 QueryOver 中的属性

asp.net - Windows 2008 Server x64 上的 IIS 7.5 ASP 32 位应用程序池上为 500.0 0x800700c1