Activation dependency and User Permissions issues


1) Add activation dependency to the features that are activated automatically by the SPCurrentUser Setup feature.
  FeatureId="5e92e6ec-83e2-415c-934d-d1a89e4104ad" />
This will prevent someone from messing up.
2) This application does not work for the following user types:
a. Anonymous users can not access the site when this is installed.
b. Users with read only privileges to the site can not access the site anymore when this is installed because the delegate control will create an access denied error when trying to write to the User Information List.
3) Performance issues: Support for individual pages session timeouts is probably an unnecessary feature and causes severe performance issues especially if your web site has a lot of pages on it. It would be more efficient to just use a single session time out and query only once for the total count of users who have accessed the site within the session time out rather than having to query repeatedly and calculate individually for each page.
4) The features are at the web level, but the lists they use are at the site collection level. Consider making the features at the site collection level. If your site has a lot of sub webs and you want to track them, its a pain trying to activate the feature on all the subwebs.

file attachments


chungw74 wrote Sep 8, 2016 at 7:23 PM

I just uploaded the source code for a patched version of SPCurrentUsers in the SourceCode section. You can look at the source code, modify as needed, and build your own copy of the wsp.

For those of you looking for a quick fix, here's the patched SPCurrentUsers with SP2007 and SP2010 deployment batch file. The batch file will retract, delete, add, and update the solution. You can comment out the retract and delete lines in the batch file if deploying for the first time. If you run without commenting out those lines, you will get an error message for the retract and delete attempt.

The deployment script in the source code I uploaded comments out everything but the update solution which assumes the SPCurrentUsers is already installed and you are making an update to the solution.

NOTE: The code gives you a general idea of how many people are using your site. As the original author states in his discussion of the project, getting an exact number of who is logged into your site is trickier than it would seem so it isn't going to be 100% accurate because of the nature of the http protocol.

chungw74 wrote Sep 9, 2016 at 1:11 AM

For the SP2007 and SP2010 deployment script, if deploying to SP2010, you will have to specify the correct location of stsadm.

In the line where it says:
@SET BINFOLDER="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN"

You would change it to:
@SET BINFOLDER="C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN"

wrote Sep 9, 2016 at 1:13 AM

chungw74 wrote Sep 9, 2016 at 1:13 AM

Also, provided the SP2013 .wsp and powershell deployment script.