Using SPWebConfigModification#

Today I ran into a blog post from Tony Bierman, talking about one of the new surprises of WSS3: SPWebConfigModification object. This object is an interface for changeing the web.config file(s) on all SharePoint servers in the server farm. So, in case you have missed it:

"At some point in your career as a SharePoint developer you may find it necessary to push out a change to a SharePoint web application's web.config file for all servers in the farm.  In the simplest of scenarios, it may be realistic to make the change to web.config manually, but if you are creating a packaged application for redistribution or there are many servers in the SharePoint farm, a better approach might be to make the web.config modifications programmatically.  The WSS v3 API contains the SPWebConfigModification object which allows you to do just that."

 

using System;
using System.Globalization;
using Microsoft.SharePoint.Administration;

public class Program
{
static void Main(string[] args)
{
AddAjaxHandlerToWebConfig("Default Web Site");
}

/// <summary>
/// Adds the Ajax HttpHandler to a web application's web.config for all servers in the farm
/// </summary>
/// <param name="webAppName">Name of web application</param>
private static void AddAjaxHandlerToWebConfig(string webAppName)
{
string assmDetails =
string.Format(CultureInfo.InvariantCulture,
"Microsoft.Web.Handlers.ScriptResourceHandler, Microsoft.Web.Extensions,
Version={0}, Culture=neutral, PublicKeyToken={1}",
new object[] { "1.0.61025.0", "31bf3856ad364e35" });

SPWebConfigModification modification =
new SPWebConfigModification("add[@name='AjaxHttpHandler']", "configuration/system.web/httpHandlers");
modification.Owner = "Ajax";
modification.Sequence = 0;
modification.Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode;
modification.Value =
string.Format(CultureInfo.InvariantCulture,
"<add verb=\"{0}\" path=\"{1}\" type=\"{2}\" validate=\"{3}\"/>",
new object[] { "GET", "ScriptResource.axd", assmDetails, "false" });

SPWebApplication webApp = SPWebService.ContentService.WebApplications[webAppName];

if (webApp != null)
{
webApp.WebConfigModifications.Add(modification);
SPFarm.Local.Services.GetValue<SPWebService>().ApplyWebConfigModifications();
}
}
}

Read the complete article

Wednesday, December 27, 2006 7:18:14 AM UTC #    Comments [1]  | 

 

GotDotNet User Sample: MOSS Query Tool#

This is the next version of the SharePoint Query Tool, designed for MOSS (SharePoint 2007). It has a similar feature set to the SharePoint Query Tool - it allows you to use a point and click interface to gather information such as search scopes and properties, type in search terms, and click a button to create both the search SQL syntax as well as the Xml document that is needed to run a query against MOSS. You can see results in plain text, structured Xml and now a dataset view. It supports FREETEXT and CONTAINS as well as wildcard searching. A very valuable tool for those trying to write custom SharePoint queries.

Download here

Wednesday, December 20, 2006 7:16:01 AM UTC #    Comments [0]  | 

 

Bringing Web 2.0 to the Enterprise with the 2007 Office System#

Via Jopx

This white paper explores how the 2007 Microsoft Office system allows enterprises to adopt Web 2.0 ideas and technologies to create high-value, user-driven applications for the Internet and intranet.

Download here

Tuesday, December 19, 2006 7:12:19 AM UTC #    Comments [0]  | 

 

WSS 3.0 Management Pack for MOM 2005#

The Microsoft Windows SharePoint Services 3.0 Management Pack monitors events placed in the application event log. This Management Pack highlights events that might indicate possible service outages or configuration problems, so you can quickly take corrective or preventive actions. This Management Pack also provides the knowledge and expertise you need to leverage Microsoft Operations Manger (MOM) 2005 and get an immediate return on your investment.


Feature Summary:
• Monitors whether the application pool account has insufficient permission to add or read users from the Active Directory
• Monitors for issues arising from improper configuration of the authentication provider
• Monitors backup failures and recycle bin quotas
• Monitors for connectivity problems with computers running SQL server
• Monitors for issues arising from the deployment and topology of Windows SharePoint Services 3.0
• Monitors events related to the health of the tracing infrastructure
• Monitors connectivity with the SMTP server
• Monitors whether the application pool account has problems writing to disk or a registry key
• Monitors connectivity with Windows Rights Management Services servers
• Monitors performance counters
• Monitors events that are critical to the sound operation of the search service
• Monitors Windows service availability
• Monitors events associated with the Timer service
• Monitors events associated with failures to load event handlers and safe control assembly paths

Download here

Monday, December 11, 2006 7:44:48 AM UTC #    Comments [0]  | 

 

Office PerformancePoint Server 2007 CTP December available#

Slated for general availability in mid-2007, Office PerformancePoint Server 2007 is a highly integrated performance management application, driven by the SQL Server platform and familiar Microsoft Office front end, allowing corporations to monitor, analyze, plan and make critical business decisions based on reliable data from all aspects of the company. Partners, customers and end-users are encouraged to visit the Web site to download the application to begin building plans in a real-world environment and testing the overall power of the product for themselves.

Read the complete article here

Friday, December 08, 2006 6:44:52 AM UTC #    Comments [0]  | 

 

The Return of SmartPart#

Via Jan:

Finally the latest version of the SmartPart is here: the Return of the SmartPart, also know as SmartPart v3, also know as SmartPart for SharePoint 2007. For those of you who are new to the SmartPart: the SmartPart is an open source web part that can host any ASP.NET Web User Control. What is the advantage of creating web parts by making use of the SmartPart? Well if you are familiar with the "traditional" web part development technique you probably know that you have to write lots of code, there is no designer support in Visual Studio. The SmartPart allows you to create a Web User Control (ASCX) in Visual Studio by making use of the designer, and deploy it to a SharePoint site. This release of the SmartPart is targetted for SharePoint 2007, both Windows SharePoint Services v3 (WSSv3) and Microsoft Office SharePoint Server 2007 (MOSS). Since the initial release almost 40.000 SharePoint developers have downloaded the SmartPart, get your copy today (for free of course) from the GotDotNet Workspace (in the releases section)! For those of you who have attended my session about web part development on TechEd: Developers in Barcelona, this is the version that I showed over there.

For more information about the deployment of the Return of the Smartpart, check out this post which also has a link to a small screencast. Keep an eye on my blog or www.smartpart.info for more information, examples and screencast about creating web parts the smart way!

Full article

Monday, December 04, 2006 7:47:47 AM UTC #    Comments [2]  | 

 

All content © 2010, Mart Muller
On this page
This site
Calendar
<July 2010>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567
Archives
Sitemap
Disclaimer

Powered by: newtelligence dasBlog 1.9.7174.0

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail

Theme design by Jelle Druyts