Open
Description
Consider the following initialization code I used for evaluating NEventStore:
Wireup
.Init()
.UsingSqlPersistence("Core NEventStore")
.WithDialect(new MsSqlDialect())
.UsingJsonSerialization()
.Build();
It all ran fine in a standalone console applicaiton. However, when I tried to use it in the initialization routines of an ASP.NET web application. The root cause of the error is, of course, missing CREATE TABLE permissions on the IIS user within my database.
It took me some good four hours to detect this, because the initialization method of the SqlPersistenceEngine
actively suppresses exceptions. I used a custom ILog
with breakpoints in each method to jump through all log messages. It seems that the following things happen:
- attempting to CREATE TABLE
- fails due to insufficient permissions, but the exception is suppressed
- transaction gets completed
- attempting to CREATE TABLE again
- fails due to transaction being already completed
In the end I was confronted with an exception that had really nothing much to do with the actual root cause of the error.
Metadata
Metadata
Assignees
Labels
No labels