動作しているS#arp Architecture MVCアプリケーションを、ネットワークサービスIDを持つアプリプールからドメインユーザーIDを持つアプリプールに切り替えようとしています。Webサーバーのユーザーに対してaspnet_regiisを実行し、データベースにアクセスするためのアクセス許可をユーザーに付与しました(データベースのシステム管理者にしようとした場合でも)。ただし、NHibernateセッションを取得できないようです。
Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.
Request information:
Request URL: http://<redacted>
Request path: /<redacted>
User host address: 10.10.10.10
User: <webuser>
Is authenticated: True
Authentication Type: Forms
Thread account name: <MYDOMAIN\MYUSER>
Thread information:
Thread ID: 1
Thread account name: <MYDOMAIN\MYUSER>
Is impersonating: False
Stack trace: at SharpArch.Data.NHibernate.NHibernateSession.get_Current() in C:\MyStuff\Dev\Projects\SharpArchitecture\src\SharpArch\SharpArch.Data\NHibernate\NHibernateSession.cs:line 88
at UserAccount.Persistence.UserRepository.GetByPropertiesPartialMatching(IDictionary`2 exactMatchPropertyValuePairs, IDictionary`2 partialMatchPropertyValuePairs, MatchMode matchMode) in c:\Persistence\UserRepository.cs:line 66
...
SharpArchNHibernateSession.cs内でNull参照例外を与える実際の行は次のとおりです。
ISession session = Storage.Session;