jamiehumphries / Elmah.SqlServer.EFInitializer

Automatically creates an Elmah database on SQL Server using Entity Framework migrations.
http://jamiehumphries.github.io/Elmah.SqlServer.EFInitializer/
MIT License
4 stars 6 forks source link

Doesn't initialise #2

Open p10tyr opened 9 years ago

p10tyr commented 9 years ago

Sorry to be a bit thick but this doesn't work as you described.

I installed the package, then I use my existing code first connection string.

<add name="MyDbContext" connectionString="Data Source=.\SQLEXPRESS; Initial Catalog=Databse; Integrated Security=True;Connect Timeout=300;Encrypt=false;Trusted_Connection=true;MultipleActiveResultSets=True;" providerName="System.Data.SqlClient" />
  <elmah>
    <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="MyDbContext" />
  </elmah>

and when I go to /elmah

Could not find stored procedure 'ELMAH_GetErrorsXml'.

? Nothing is created in the database.

I delete the database and when I re run it EF creates my models but still the same error.

What am I missing?

p10tyr commented 9 years ago

I changed the connection string to a new Catalog also and it just says now

Cannot open database "DatabaseElmah" requested by the login. The login failed. Login failed for user 'My-PC\MyNamea'.

p10tyr commented 9 years ago

Never mind, I was being thick. I landed on this page

https://www.nuget.org/packages/Elmah.SqlServer.EFInitializer/0.1.0.1

V0.1.01

I unisntalled that and got V1. Works great.