使用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/