40FINGERS DNN Nederlands40FINGERS DNN English

Our Blog

Menu: Blog

DNN5 500 error without any logging

By: Timo Breumelhof

On a specific DNN 5.6.8 portal we had a strange issue.
With one language it caused a 500 error on the other one it did not.
Setting CustomErrors to "off" did not show more info.
I tracked the error down in both IIS loggings and windows asp.net logging, but I could not find any details.

ASP.NET logging showed this:

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 5/22/2015 12:02:57 AM
Event time (UTC): 5/21/2015 10:02:57 PM
Event ID: b74f4d296d564fdcab01af8c0627fa2c
Event sequence: 2
Event occurrence: 1
Event detail code: 0

Still very vague.

After some research I found that for this portal there were 2 records for the nl-NL language in the PortalLocalization table (which is wrong)

You can check for this issue by running this query on your Database.

SELECT [PortalID], [CultureCode], count([CultureCode]) as Rows
        FROM [PortalLocalization]
        Group By PortalID, [CultureCode]
        Having count([CultureCode]) > 1

After I removed one of the rows, I had to set the HomepageId to a value of an existing page (or you could set it to NULL).
Then after I saved the web.config for an application-restart, the 500 errors where gone.

I hope this post will help someone with the same issue. :-)