DNNSpired.com wrote
...Sorry we could not help further. We will continue our quest to find an answer.
Well, we finally found the bug causing the DNN UsersOnline module to not update as expected. WhooHoo!! This bug does not occur for everyone, which made it more difficult to find.
But we have Good News and some not so Good News.
First the good news: We have corrected the problem caused by the DotNetNuke.HttpModules.dll that updates the UsersOnline table.
Not so Good News: Yep, I said the DotNetNuke.HttpModules.dll, which is a core dll. However, it is not as bad as it sounds. This problem is fixable with Host account access to install our FREE New UsersOnline module with our New dll and by making a small change to your web.config file to use our dll. We have submitted the corrected code to the Core Team. The additional Good News is you get a FREE New UsersOnline module with added features.
In short, the problem lies in the DotNetNuke.HttpModules.dll where the UsersOnline part of that dll does not account for a userid = 0 when attempting to update the UsersOnline table. Any time the userid = 0 it caused an foreign key constraint error which is not being caught in an error handler and ultimately caused the UsersOnline update routine to complete improperly.
So enough with the techie stuff, if you are experiencing an Users Online updating problem then here is how you can fix it.
- Download our FREE Users Online With Roles module here: FREE! Download Repository. We made a post today in Announce It forum announcing the release of our New UsersOnline module which will give more info about the new features our module offers: http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/112/threadid/205959/scope/posts/Default.aspx
Note: There are 2 different versions available. One version is for DNN 322 & lower which shows Username. The other version is for DNN 323 & higher which shows the DisplayName.
- Install our module with your Host account on your portal, friendly name is DS_User Online With Roles
- Change the highlighted line in your web.config as shown below
In the web.config the highlighted line needs to be changed.
ORIGINAL:
<system.web>
<httpModules>
<!-- add name="Authentication" type="DotNetNuke.HttpModules.AuthenticationModule, DotNetNuke.HttpModules.Authentication" / -->
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="Compression" type="DotNetNuke.HttpModules.Compression.CompressionModule, DotNetNuke.HttpModules" />
<add name="RequestFilter" type="DotNetNuke.HttpModules.RequestFilter.RequestFilterModule, DotNetNuke.HttpModules" />
<add name="UrlRewrite" type="DotNetNuke.HttpModules.UrlRewriteModule, DotNetNuke.HttpModules" />
<add name="Exception" type="DotNetNuke.HttpModules.Exceptions.ExceptionModule, DotNetNuke.HttpModules" />
<add name="UsersOnline" type="DotNetNuke.HttpModules.UsersOnline.UsersOnlineModule, DotNetNuke.HttpModules" />
<add name="DNNMembership" type="DotNetNuke.HttpModules.Membership.MembershipModule, DotNetNuke.HttpModules" />
<add name="Personalization" type="DotNetNuke.HttpModules.Personalization.PersonalizationModule, DotNetNuke.HttpModules" />
</httpModules>
NEW:
<system.web>
<httpModules>
<!-- add name="Authentication" type="DotNetNuke.HttpModules.AuthenticationModule, DotNetNuke.HttpModules.Authentication" / -->
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="Compression" type="DotNetNuke.HttpModules.Compression.CompressionModule, DotNetNuke.HttpModules" />
<add name="RequestFilter" type="DotNetNuke.HttpModules.RequestFilter.RequestFilterModule, DotNetNuke.HttpModules" />
<add name="UrlRewrite" type="DotNetNuke.HttpModules.UrlRewriteModule, DotNetNuke.HttpModules" />
<add name="Exception" type="DotNetNuke.HttpModules.Exceptions.ExceptionModule, DotNetNuke.HttpModules" />
<add name="UsersOnline" type=" DNNSpired.Entities.Users.DSUserOnlineModule, DNNSpired.DNN.Modules.UsersOnlineWithRoles " />
<add name="DNNMembership" type="DotNetNuke.HttpModules.Membership.MembershipModule, DotNetNuke.HttpModules" />
<add name="Personalization" type="DotNetNuke.HttpModules.Personalization.PersonalizationModule, DotNetNuke.HttpModules" />
</httpModules>
- Load the DS_UsersOnline With Roles module on your page and away you go.
Very glad we could help out.