Elmah not logging, elmah.axd page is always null when using SqlErrorLog
Tech-Today

Elmah not logging, elmah.axd page is always null when using SqlErrorLog


First make sure that you're web.config file is setup properly and that you have defined elmah to handle the error in each controller. You can do that easily in c# mvc3 by using nuget and downloading elmah, elmah.corelibrary and elmah.contrib.mvc.

 Also double check that you have the ff in your database:
1.) Table: Elmah_Error
2.) SP: ELMAH_GetErrorsXml, ELMAH_GetErrorXml, ELMAH_LogError

Note that you can download the scripts from elmah website: http://code.google.com/p/elmah/

Then remove errorLog section from:


<elmah>
<security allowRemoteAccess="0" />
<errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="ApplicationServices" /> <!-- remove this section -->
</elmah
Throw and exception in your page and see if the error will show in elmah.axd. If it doesn't you can check the last error thrown by mssql, and in my case it's because of the column Sequence from table Elmah_Error not having Identity specification. Just set identity increment = 1 and identity seed = 1. That should solve the issue.




- How To Signin To Keycloak Using Google
There are 3 set of steps that we must follow in order to come up with a web project that will allow us to login using google's identity provider. Set 1 - Create a google applicationCreate a google application at https://console.developers.google.com...

- How To Setup Seam3-security In Jboss 7
Recently, I've done some research on several Java Security Framework that can perform authentication, authorization and cryptography. I've worked with Apache Shiro, it's really good and complete but I've found several problems like there's...

- Create A Simple Javaee6 Web App With Maven, Glassfish And Postgresql
This tutorial creates a simple javaee6 project using eclipse with maven. The application has 1 xhtml page that has a create button, and as you guest it when press will create an Employee record in the database. We use postgresql as the database and glassfish...

- Dns That You Could Choose From In The Philippines
Below are the DNS I'm using in the Philippines. The last is specifically for Globe network. OpenDNS - fast but restrictive    208.67.222.222    208.67.220.220 Cisco - ok for me    64.102.255.44    128.107.241.185...

- Create Auto Increment Primary Key On Sql Server Compact Database
Just examine this script: CREATE TABLE user ( user_id INT IDENTITY(1, 1) NOT NULL PRIMARY KEY, user_name NVARCHAR(50) ) Regarding IDENTITY(1, 1) and SQLCE Data Type, refer to the following article: http://www.codeproject.com/KB/mobile/DBApplicationsForPocketPC.aspx...



Tech-Today








.