A storage mechanism has already been configured for this application
Asked Answered
A

3

7

I am getting this error whenever my S#arp Architecture attempts to start and this is an problem with SQL Server (for example: SQL Server is not runing), after I start SQL Server and hit refresh, I get this error:

A storage mechanism has already been configured for this application

Alumna answered 31/5, 2010 at 18:59 Comment(0)
U
-1

Try to add this line before calling NHibernateSession.Init() to clear any previous initiation.

try{ NHibernateSession.Reset(); } catch { }

Ushijima answered 1/6, 2010 at 14:58 Comment(2)
-1 for swallowing exceptions and recommending initializating multiple times.Guntar
s/initializating/initializingGuntar
G
9

NHibernateSession.Init() or InitStorage() is being called more than once. You're probably calling it every request, it's supposed to be called only once at startup.

Guntar answered 31/5, 2010 at 19:29 Comment(0)
L
0

In an old application I have to maintain, this happened when the application start had issues. So I just had to recycle the application pool in IIS.

Literalism answered 13/3, 2019 at 15:13 Comment(0)
U
-1

Try to add this line before calling NHibernateSession.Init() to clear any previous initiation.

try{ NHibernateSession.Reset(); } catch { }

Ushijima answered 1/6, 2010 at 14:58 Comment(2)
-1 for swallowing exceptions and recommending initializating multiple times.Guntar
s/initializating/initializingGuntar

© 2022 - 2024 — McMap. All rights reserved.