views:

113

answers:

1

Ok, I do not know why Elmah is not logging any errors while deployed on Windows Azure. Another thing is that it used to work before. The environment is the same.

  • using SqlErrorLog on Sql Azure
  • Sql Azure sharing the same database as the main site. I did not use a separate database so I can use the same connection string.
  • building off the source and I've excluded the VistaDB and SQLite dlls.

I've checked my web.config settings and have the handler and module defined under system.webServer. It seems to log messages alright under local development (webdev.exe) and the local sql express schema was exported to an sql azure schema (including the stored procs).

The only difference is that on the main site, the app is running under a main domain with multiple subdomains. Locally this is simulated by modifying the host file. Logs ok locally but not when deployed.

Any ideas on what I should do to find out what's wrong? Last option is using diagnostics to trace/find out what's wrong while it's deployed but that's a pita.

A: 

It turns out that the table Elmah_Error was created with a non-clustered primary key which is not supported by Sql Azure.

It seems that the SSMS 2008 R2 Nov CTP still exports nonclustered PK as nonclustered PKs even when you specify the target as SQL Azure. :(

seanlinmt