Fixing DNN Errors that are Related to Search Scheduler 

I have noticed a number of posts recently on the DotNetNuke.com forums regarding numerous errors being reported in the event log relating to portal id of -1 and typically with a InnerException of "Value cannot be null. Parameter name: type". This issue can become very annoying and can have an actual effect on your sites performance as when the size of the event log grows you will start to notice performance slow downs. This article will discuss the root cause of the issue and a solution.

Cause

The root cause of this issue appears to be traced to an issue with the DNN Installer included in version 4.5.3. When the installer loads a new module to a DNN site it checks for the supporting of the 3 optional interfaces (IPortable, ISearchable, and IUpgradable), it then populates a database value to indicate the supported feature. The bug is that if the installer cannot determine the support is is placing a -1 value in this field rather than a 0. I personally think this is also a bug in the search indexer as if -1 is not valid it should not be checking them, but regardless this is what is causing the problem.

The Fix

As explained above the problem is quite simple, luckily the resolution is just the same. You can simply run the blow query to update the DesktopModules table to fix any incorrect entries.

UPDATE DesktopModules
SET SupportedFeatures 0
WHERE SupportedFeatures -1

This is a very simple update query where we are simply changing the value to 0 where it is currently -1. You will need to modify this query to append any object qualifier that you might have listed for your specific database. After performing this change you should notice that the errors will go away!

Posted by Mitchel on Wednesday, July 18, 2007
 

Comments

That was driving me crazy! Thanks for the great, simple, mental health saving solution.
Tom

By Tom Harris on Wednesday, July 18, 2007 at 7:30 AM

GREAT !!!! It was bothering me for months !! Thanks so much.

Déclic Vidéo FX

By Déclic Vidéo FX on Wednesday, July 18, 2007 at 10:50 AM

Hello Mitchel,

I am very happy, but it would be fantastic if the "second error" is also removed. For me, an error is still there (it was appearing at the same time that the other one - probably also linked to the scheduler ??)

AssemblyVersion: -1
PortalID: -1
PortalName:
UserID: -1
UserName:
ActiveTabID: -1
ActiveTabName:
RawURL:
AbsoluteURL:
AbsoluteURLReferrer:
UserAgent:
DefaultDataProvider:
ExceptionGUID:
InnerException: Unhandled Error:
FileName:
FileLineNumber: -1
FileColumnNumber: -1
Method:
StackTrace:
Message: System.Exception: Unhandled Error: ---> System.Web.HttpException: Request timed out.--- End of inner exception stack trace ---
Source:

By Déclic Vidéo FX on Thursday, July 19, 2007 at 7:24 AM

I have a feeling that the error is also linked to the scheduler, however, it is a timeout issue and those are not necessarily easy to track down.

By mitchel.sellers@gmail.com on Thursday, July 19, 2007 at 8:58 AM

Ok, I have submitted it to the DNN team....
http://www.dotnetnuke.com/Community/Forums/tabid/795/mid/2108/threadid/154132/scope/posts/Default.aspx

DV

By Déclic Vidéo FX on Friday, July 20, 2007 at 9:11 AM

Great fix Mitchell! Worked perfectly!!

By leemedic on Sunday, July 22, 2007 at 9:08 AM

Thanks Mitchel... your solution worked well for me.

By Frank on Thursday, July 26, 2007 at 4:29 AM

Hey guys, I really don't want to sound like an idiot but I need to know. How exactly does one go about doing this fix? Like, if someone would? Step by step for people like me..

Thanks,

David


By David on Friday, August 03, 2007 at 6:28 AM

You can run the script from the Host -> SQL menu when logged in as host.

By mitchel.sellers@gmail.com on Friday, August 03, 2007 at 6:41 AM

Mitchel,

This is just to let you know that this has been fixed for dnn 4.6.0. See this Gemini issue: http://support.dotnetnuke.com/issue/ViewIssue.aspx?id=5970

Thanks for this find

By erik van ballegoij on Tuesday, August 14, 2007 at 2:44 PM

Erik,

Thanks for the notification!!

By host on Tuesday, August 14, 2007 at 3:36 PM

Hi Mitchel,

I appreciate this fix...

Thank you!

Bill

By Bill on Sunday, August 19, 2007 at 9:30 AM

found numerous other annoyances to get rid of this one... finally it's "fixed". Thanks for posting it!

By Paul Fijma on Tuesday, August 28, 2007 at 8:47 AM

Thanks Mitchel. Saved me a bunch of headaches.

By Richard Edwards on Tuesday, August 28, 2007 at 10:22 AM

I ran the query from Host > SQL .. now what concerns me is that I haven't had any log entries since ... it's been over an hour .. even login entries are not shown. Please advise.

By M. Lee on Thursday, August 30, 2007 at 2:22 PM

THis script ONLY will affect entries for the scheduler errors, it will NOT have any affect on other logging items.

By mitchel.sellers@gmail.com on Thursday, August 30, 2007 at 2:43 PM

David made the following comment:
Hey guys, I really don't want to sound like an idiot but I need to know. How exactly does one go about doing this fix? Like, if someone would? Step by step for people like me..

Can I hope for more of the same. I curt and pasted the above script into host SQL and recieved "There is an error in your script"
I note the Mitchel comments that 'you will need to append any object qualifers" I have DNN_ as an object qualifier. how do I appen this?
Do I run this as script or simple execute?

Thanks,

Paul

By Paul on Friday, September 07, 2007 at 11:31 PM

Paul,

If you have DNN_ as your object qualifier, use the following when running the script from the SQL Page.

UPDATE DNN_DesktopModules
SET SupportedFeatures = 0
WHERE SupportedFeatures = -1

By mitchel.sellers@gmail.com on Saturday, September 08, 2007 at 8:46 AM

thanks Mitchel.
Sometimes the obvious takes longer to see.
The log file has reduced dramtically.
Paul

By Paul on Sunday, September 09, 2007 at 2:22 PM

Can you help me now
Event Log : Error

DotNetNuke.Services.Exceptions.ModuleLoadException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Services.Log.EventLog.DBLoggingProvider.Data.SqlDataProvider.PurgeLog() at DotNetNuke.Services.Log.EventLog.DBLoggingProvider.DBLoggingProvider.PurgeLogBuffer() at DotNetNuke.Services.Log.EventLog.LogController.PurgeLogBuffer() at DotNetNuke.Modules.Admin.Log.LogViewer.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---

Chinh - VietNam

By Chinh Ho on Saturday, September 29, 2007 at 1:33 AM

This appears to be a timeout issue with the event log.

You could try clearing the table manually using "TRUNCATE TABLE eventLog" (Without the quotes)

By mitchel.sellers@gmail.com on Saturday, September 29, 2007 at 5:02 AM

Worked perfectly for me...keep coming back to this one, so I need to write it down in my notes.

Any idea whether all this has worked itself out in 4.7? ...thinking of making the switch, but usually like to wait until the x.x.2 version. :)

By Terp on Friday, November 09, 2007 at 3:52 AM

Terp,

This was actually fixed in I believe 4.6.0. They added code in the SqlDataProvider file to fix the current errors, and then with their overhaul to the module installation process fixed the underlying error.

I would have to dig through the data providers to find the exact version but I am quite sure it was 4.6.0

By mitchel.sellers@gmail.com on Friday, November 09, 2007 at 9:53 AM

Thank you very much for the help.

We´ve been trying to resolve this issue for a long time.

By Fabio on Saturday, November 24, 2007 at 4:42 AM

This was driving me nuts. Thanks for posting the fix.

By Erik Wilkinson on Wednesday, January 02, 2008 at 6:25 PM

Thanks a MILLION! This was really haunting me for few weeks!

By Jarmo on Tuesday, January 22, 2008 at 6:58 AM

Thanks! I've been having this issue in too many versions of DNN that I can remember. This stopped the error. BTW, we had already upgraded to 4.6.2 and still had the problem. So it wasn't fixed.

After we ran the SQL, we didn't get the error, but we didn't get any results either. On several DNN installations.

Come to find out that the Search Results module had a cache setting of 1200. After each search, you had to wait 20 minutes b4 the results would change. Set it to 0 and all is well with the world!!!

By rstordeur on Saturday, February 16, 2008 at 7:23 AM

Will any object qualifier with a -1 value give the same error? Because I have User ID, ModuleDefId, ModuleId,
AssemblyVersion, PortalID, all returning a -1 value in the Event Viewer error messages at different times. Runinng 4.5.5

By jason@grubbsgreenery.com on Friday, June 20, 2008 at 2:39 AM

Itmes in the event log with a -1 indicate that they were not done via a specific portal. That is not an issue.

By mitchel.sellers@gmail.com on Friday, June 20, 2008 at 6:52 AM

I have been using DNN 4.8.0 and I integrated the UsersOnLine module to my web site and done the required configurations according to the DNN web site as well.but still it doesn't work properly.
when I log in as admin and then log out in a moment,schedular does not delete that entry from the dbo.UserOnLine table and hence when I again log in as a different user I still can see that admin is still logged in due to the fact that it is recorded in UsersOnLine table.Can anyone help me with this issue and how to fix this?

By SumithMoratuwa on Monday, January 12, 2009 at 7:32 PM

There is not an easy way to fix that issue.

By mitchel.sellers@gmail.com on Monday, January 12, 2009 at 7:36 PM

So can you give some kind of a hint at least so that I can fix it?

By sumithmoratuwa on Monday, January 12, 2009 at 7:54 PM

please move the conversation to the forum for general assistance.

By mitchel.sellers@gmail.com on Monday, January 12, 2009 at 8:01 PM

Hi Mitchel,
I am having a problem since last 6 months and trying to resolve it. I searched the net for the same but all in vain.
I have upgraded my website to DNN4.9.4. Everything is working fine on local machine. But after hosting the site on production server I get an object reference not set to an instance of an object. Heres the log details from eventlog table

AssemblyVersion:04.09.04
PortalID:0
PortalName:MetaSys Website
UserID:-1
UserName
ActiveTabID:93
ActiveTabName:MetaSys-Contact Us
RawURL/Default.aspx?tabid=93&error=Object+reference+not+set+to+an+instance+of+an+object.&content=0
AbsoluteURL:/Default.aspx
AbsoluteURLReferrer
UserAgent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID:584de5e6-8aa9-48bb-b1b6-0467ca923805
InnerException:Unhandled error loading page.
FileName
FileLineNumber:0
FileColumnNumber:0
Method:System.Web.UI.Util.CheckVirtualFileExists
StackTrace
MessageDotNetNuke.Services.Exceptions.PageLoadException: Unhandled error loading page. ---> System.Web.HttpParseException: The file '/Admin/Skins/Language.ascx' does not exist. ---> System.Web.HttpParseException: The file '/Admin/Skins/Language.ascx' does not exist. ---> System.Web.HttpException: The file '/Admin/Skins/Language.ascx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.BaseTemplateParser.GetReferencedType(VirtualPath virtualPath, Boolean allowNoCompile) at System.Web.UI.BaseTemplateParser.GetUserControlType(VirtualPath virtualPath) at System.Web.UI.MainTagNameToTypeMapper.ProcessUserControlRegistration(UserControlRegisterEntry ucRegisterEntry) at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseReader(StreamReader reader, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.UI.TemplateParser.Parse(ICollection referencedAssemblies, VirtualPath virtualPath) at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.Framework.DefaultPage.LoadSkin(String SkinPath) in D:\websites\cgsinfotech\metasyssoftware\test.metasyssoftware.com\www\Default.aspx.vb:line 224 --- End of inner exception stack trace ---
Source

All the files are there on the server still it gives this error.

PLEASE reply back to me ASAP and help me in solving the issue. My site cannot go live jsut for this one issue from last 6 months.

By Deeps on Tuesday, July 07, 2009 at 2:06 AM

Hi,

I am getting an error and it is similar like this issue I ran the script but i am getting other error.

AssemblyVersion: 04.09.02
PortalID: 0
PortalName: Entrada Group de Mexico
UserID: 39
UserName: mrodriguez
ActiveTabID: 96
ActiveTabName: Case Manager
RawURL: /IT/CaseManager/tabid/96/ctl/ticket_list/mid/456/Default.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://portal.entradagroup.com/IT/CaseManager/tabid/96/ctl/ticket_list/mid/456/Default.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.4; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: c29a89f3-8773-41c8-9a72-b31c20e66d5c
InnerException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Data.SqlClient.SqlConnection.OnError
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(SqlConnection connection, SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters, SqlConnectionOwnership connectionOwnership) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) at OldTurtle_BizSuite_EasyHelp2.Business.Tickets_Controller.Search_Operator_Advanced(Int32 ID_Portal, Int32 ID_Operator, String _problem, String _id_contact, String _id_priority_customer, String _id_priority_operator, String _id_category_1, String _id_category_2, String _id_category_3, String _id_status, String _id_operator_Assigned, DateTime _date_from, DateTime _date_to, Boolean _Return_Unassigned, String ID_Team, String ID_Company, String _orderby, String _orderway, Boolean _ShowAllNotClosed) at OldTurtle_BizSuite_EasyHelp2.Pages.Tickets_List.Load_Tickets_Datagrid(Boolean _OnlyNeedArrayListAndNoBind) at OldTurtle_BizSuite_EasyHelp2.Pages.Tickets_List.d(Object A_0, EventArgs A_1) at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:
Nombre del Servidor: SWS004

By America Marin on Wednesday, February 24, 2010 at 10:22 AM
Click here to post a comment

Disclaimer