7/31/2010
LifeCycle Solutions - Home ( the software development blog )
 

<July 2010>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

Subscribe to this feed:

RSS 2.0 | Atom 1.0 |CDF






Thursday, May 06, 2010

SharePoint 2010 has fairly rich Web Analytics and usage reporting functionality.  You can see plenty of useful stats and charts across your farm.  However, at farm level, it’s missing an important feature – email subscriptions.  In site collection admin, you can subscribe to stats for a given site collection, but in Central Admin (AFAIK), you can’t set up email subscriptions on the overall farm stats, or stats for an entire web app.

Hopefully, this feature will be added in the future, but as a quick fix, I whipped together a wonderful hack that can be used to scrape-and-send just about any of the reports- or other content as well.

$wc = new-object net.webclient
$cred = [System.Net.CredentialCache]::DefaultCredentials;
$wc.Credentials = $cred
 
$reportMarkup = $wc.DownloadString("http://yourcentraladmin/_layouts/WebAnalytics/Report.aspx?t=SummaryReport&l=wa&Id=http%3a%2f%2fyourserver%2f&WebAppName=YourWebApp&DURATION=7&CD=false&SHOWANALYZETAB=1")
$reportStart = $reportMarkup.IndexOf('<table class="ms-listviewtable"')
$reportEnd = $reportMarkup.IndexOf('</table>', $reportStart) + 8
$reportMarkup = $reportMarkup.Substring($reportStart, $reportEnd - $reportStart)
 
Send-MailMessage -To you@yourcompany.com -From sharepoint@yourcompany.com -Subject "Web Analytics" -Body $reportMarkup -BodyAsHtml -SmtpServer smtpiron

This script just downloads the page, scrapes the relevant area, and sends it off as email.  To use, you’ll need to fix up the url, scraping code, and mail addresses as needed, then schedule in scheduled tasks.

With a little more effort, you could even scrape together an ‘admin’ report to give you a quick glance at the most relevant Central Admin content such as health, analytics, and search crawl info.

Posted by Daniel Root

Wednesday, October 31, 2007

We recently ran into an issue concernig an Automatic Security update for Windows 2003 and WSS 3.0.  The customer's SharePoint site became inoperative and displayed a 'Cannot connect to the configuration database' error.  The server Application Log showed a Windows SharePoint Services error of 'Unkown SQL Exception 33002' - 'Access to module dbo.proc_getObjectsByClass is blocked because the signature is not valid.'  Turns out that this was caused by a security update for Windows SharePoint 3.0 reference KB934525.  If this patch is applied you have to run psconfig -cmd upgrade -inplace b2b. This utility can found under Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin .  Please reference KB934525.

 

Ron

Posted by Ron Taylor

Friday, January 26, 2007

Microsoft Office SharePoint Server 2007 utilizes the "master page" concept familiar to ASP.NET 2.0 developers -- a big improvement in the latest SharePoint release.  Developers wishing to create a custom look and feel for a SharePoint site will probably first open SharePoint Designer and begin dissecting, changing and discarding parts of the default master page ("default.master"); however, it doesn't take long to discover that this is not a trivial process and that removing the wrong ContentPlaceHolder tags renders some of the default pages inoperable.  This is due to the fact that pages inherting the "default" master page expect certain ContentPlaceHolder tags to be available in the base page.
Microsoft has published a How-To document with a code sample that provides a minimal master page which contains all the basic pieces need to have a functioning site.  While this code snippet is a good start, it appears that MS left out the following ContentPlaceHolders:

<asp:ContentPlaceHolder ID="PlaceHolderBodyRightMargin" runat="server"/>
<asp:ContentPlaceHolder ID="PlaceHolderTitleRightMargin" runat="server"/>


If you experience error messages with the standard SharePoint pages after using the "minimal" template, try adding these placeholders. 

Posted by Brian Parks

© 2006 LifeCycle Solutions, LLC | All Rights Reserved