Posted by Scott on December 1, 2008
Microsoft has just released the Web Platform Installer (RC1). What is the Web Platform Installer you ask? From Microsoft:
“The Web Platform Installer (Web PI) is a simple tool that installs Microsoft’s entire Web Platform, including IIS7, Visual Web Developer 2008 Express Edition, SQL Server 2008 Express Edition and the .NET Framework. Using the Web Platform Installer’s user interface, you can choose to install either specific products or the entire Microsoft Web Platform onto your computer. The Web PI also helps keep your products up to date by always offering the latest additions to the Web Platform.”
The Web PI certainly looks promising as a quick ramp-up when setting up a development environment (or even a one-off server environment).
Posted by Scott on November 24, 2008
Typemock have just released their newest product, Isolator for SharePoint. Isolator is required to run the unit tests included in the latest release from the Patterns & Practices group for SharePoint guidance. Oh, and did I mention that you might be able to snag a full license?
Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here. The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here.
Posted by Scott on November 21, 2008
The out-of-the-box method DoesUserHavePermissions() on an SPWeb object does not take indirect membership into account (i.e. the current user is a member of a domain group that has access the the SPWeb being checked). To get around this, I use the following method (DoesUserHavePermssionsToWeb(SPUser, SPWeb)):
(more…)
Posted by Scott on November 13, 2008
The following snippet allows for locating all of the web parts on a given web part page (the sample is targeted at web parts of the type Microsoft.SharePoint.WebPartPages.ListViewWebPart)
string webUrl = SPContext.Current.Web.Url;
using (SPSite site = new SPSite(webUrl))
{
using (SPWeb web = site.OpenWeb())
{
SPLimitedWebPartManager manager = web.GetLimitedWebPartManager(this.Parent.Page.Request.Url.ToString(), System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);
SPLimitedWebPartCollection webPartColl = manager.WebParts;
for (int i = 0; i < webPartColl.Count; i++)
{
if (webPartColl[i].GetType() == typeof(Microsoft.SharePoint.WebPartPages.ListViewWebPart))
{
// do stuff
}
}
}
}