Friday, 28 January 2011
Microsoft.SharePoint.ApplicationPages
Problem
I was looking for the Microsoft.SharePoint.ApplicationPages assembly, but I couldn't reference it from the assembly cache. Apparently it isn't begin installed in the assembly bin, but in the _app_bin of your web application.
Solution
You can create a (web app undependent) reference to the dll from the following location:
SharePoint 2007: 12-hive\CONFIG\BIN
SharePoint 2010: 14-hive\CONFIG\BIN
Monday, 24 January 2011
Programmatically Set Master Page of Publishing Sites
SharePoint Standard has a nice feature that allows configurating the Master Page on a Site Collection Level. This feature presents itself when you enabled the ‘SharePoint Server Publishing Infrastructure’-feature, found in the Site Collection Features.
Now you can use the ‘Site Master Page Settings’ (/_Layouts/ChangeSiteMasterPage.aspx) to set the Site Master Page and System Master Page.
Problem
But what does a Site and System Master Page mean? And how do you set these properties programmatically?
Solution
Site Master Page
This is the master page that is being used by publishing pages. This means that you use an other masterpage for views, etc.
System Master Page
This is the master page that is being used by system pages like settings.aspx, Forms and view pages like the view of document library pages.
The code
[Guid("00000000-0000-0000-0000-000000000000")] // Add Guid here
public class
StylingEventReceiver : SPFeatureReceiver
{
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
if (properties != null
&& properties.Feature != null
&& properties.Feature.Parent != null
&& properties.Feature.Parent.GetType() == typeof(SPSite))
{
SPSite site = (SPSite)properties.Feature.Parent;
using (SPWeb rootWeb = site.RootWeb)
{
rootWeb.AllowUnsafeUpdates = true;
rootWeb.MasterUrl = "/_catalogs/masterpage/v4.customer.master";
rootWeb.CustomMasterUrl = "/_catalogs/masterpage/V4.customer.master";
rootWeb.Update();
rootWeb.AllowUnsafeUpdates = false;
}
}
}
public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
{
if (properties != null
&& properties.Feature != null
&& properties.Feature.Parent != null
&& properties.Feature.Parent.GetType() == typeof(SPSite))
{
SPSite site = (SPSite)properties.Feature.Parent;
using (SPWeb rootWeb = site.RootWeb)
{
rootWeb.AllowUnsafeUpdates = true;
rootWeb.MasterUrl = "/_catalogs/masterpage/v4.master";
rootWeb.CustomMasterUrl = "/_catalogs/masterpage/v4.master";
rootWeb.Update();
rootWeb.AllowUnsafeUpdates = false;
}
}
}
}
Thursday, 10 June 2010
Explorer and test Webservices
I needed to explorer and test a corporate webservice. I needed to know which functionalities the webservice delivers, what kind of parameters the webservice expected and with what kind of responses the webservice replies.
Problem
The webservice wasn't documented and before a wanted to try to make a custom application I looked for a more dynamic solution. I didn't have the time to write a good testing program...
Solution
I learned that the awnser was pretty easy. Just use this handy tool: http://www.codeplex.com/WebserviceStudio
It allows you to explorer webservices easily!
Tuesday, 11 May 2010
Converting Reporting Services (SSRS) rdl from 2005 into 2000
I receive a error when uploading my report.
Error number: 0x80048298Problem
Information:
[CrmException: Exception of
type Microsoft.Crm.CrmException was thrown.]
Microsoft.Crm.Application.Platform.Report. InternalCreate(String xml) +721
Microsoft.Crm.Application.Platform.Entity.Create() +109
Microsoft.Crm.Application.Forms.AppForm. RaiseDataEvent(FormEventId eventId)
+408 Microsoft.Crm.Application.Forms.EndUserForm. Initialize(Entity entity) +57
Microsoft.Crm.Application.Forms.EndUserForm. Execute(Entity entity) +13
Microsoft.Crm.Web.Tools.ReportProperty. ReportPropertyPage.ConfigureForm() +202
Microsoft.Crm.Application.Controls.AppPage. OnPreRender(EventArgs e) +30
System.Web.UI.Control.PreRenderRecursiveInternal() +62
System.Web.UI.Page.ProcessRequestMain() +1499
I made a mistake and created a report in VS2005 instead of VS2003. How could I change this?
Gary Cowan gave a real good tip on : http://sqlservertipsandtricks.blogspot.com/2008/06/converting-reporting-services-ssrs-rdl.html
but it wasn’t really complete for my case. In the end it turned out I had to change the document as following.
Solution
If you want to convert a SSRS rdl from 2005 to 2000, you can try the following
1) Open the .RDL file in a text editor and change the XML.
2) Change the first node to look like this:
Report
xmlns=”http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition”
xmlns:rd=”http://schemas.microsoft.com/SQLServer/reporting/reportdesigner”
3) Do a search for “Interactive” You should find 2 nodes InteractiveWidth and InteractiveHeight. You need to delete these nodes.
4) The XML in the RDL file is different between 2005 and 2000 when you want to pass parameters to a SQL procedure.
In 2000 they pass parameters this way in the RDL file. I used
< Query>
< CommandType> StoredProcedure< /CommandType>
< CommandText> =”procGetInvMovement”< /CommandText>
< QueryParameters>
< QueryParameter Name=”@BegDate”>
< Value> =Parameters!pBegDate.Value< /Value>
< /QueryParameter>
< QueryParameter Name=”@EndDate”>
< Value> =Parameters!pEndDate.Value< /Value>
< /QueryParameter>
< /QueryParameters>
< DataSourceName> JLG SQL< /DataSourceName>
< /Query>
and in 2005 they do it this way:
< Query>
< rd:UseGenericDesigner> true< /rd:UseGenericDesigner>
< CommandText> =”Execute procGetInvMovement ‘” & Parameters!pBegDate.Value & “‘, ‘” & Parameters!pEndDate.Value & “‘”< /CommandText>
< QueryParameters>
< QueryParameter Name=”pBegDate”>
< Value> =Parameters!pBegDate.Value< /Value>
< /QueryParameter>
< QueryParameter Name=”pEndDate”>
< Value> =Parameters!pEndDate.Value< /Value>
< /QueryParameter>
< /QueryParameters>
< DataSourceName> JLG SQL< /DataSourceName>
< /Query>
Notice how they don’t include the parameters in the commandtext tag in 2000
5) Delete the CommandType-tag if you want to use a query
6) In to the 2000 version of the .RDL file. You will need to add this line:
StoredProcedure after the first tag.
7) In the ReportParameters don’t use the tag Hidden
THIS IS NOT SUPPORTED SO I WOULD BACKUP YOUR REPORTS BEFORE ATTEMPTING THIS AND USE THIS ADVICE AT YOUR OWN RISK.
Tuesday, 13 April 2010
Support SharePoint 2007 without SP2 ends on July 13th, 2010
*** update April 12th, 2010 ***
Microsoft announced that the official retirement date for SP1 is 13th of July!
***
Source: http://blogs.technet.com/stefan_gossner/archive/2010/03/23/updated-retirement-date-for-wss-3-0-and-moss-2007-sp1.aspx
I've quoted the blog post of Stefan Goßner about the support of MOSS 2007
installation without SP2.
Please consider this information, if you're
not already planning to upgrade your systems!"Based on the above listed information support for SharePointMore
servers without SP2 will end on April 28th, 2010"
information: http://blogs.technet.com/stefan_gossner/archive/2010/01/07/is-your-sharepoint-2007-farm-already-on-service-pack-2-if-not-read-this.aspx
Monday, 12 April 2010
Content Deployment - 'Bible' - The complete Guide
This time I want to introduce the blog of Stefan Goßner. This man works as a 'Escalation Engineer' for SharePoint. This month Stefan Goßner wrote a beautifull ode about the Content Deployment funtionality of SharePoint 2007:
| Read the 'Bible': The Basics The Basics continued Configuration Communication Quick Deployment Logging Job and Timer job coming soon... coming soon... |
Source: Stefan Goßner
Thursday, 1 April 2010
QNH @ DevDays 2010

On the 30th and 31th of March 2010 I have visited the following presentations:
Day 1
- What's new in office 2010 for developers by John R Durant.
He made a video of us during lunch: (view the post) We had a nice chat about culturial differences. - More follows soon!
Geek Night
- Keynote
- More follows soon!
Day 2
- More follows soon!
Thursday, 11 March 2010
Launch date for Office 2010 and SharePoint 2010
Thursday, 14 January 2010
The resource object with key 'NamexxxField' was not found
I recieved the following message
Exception Type: System.Web.HttpException Exception Message: The resource object with key 'NamexxxField' was not found.I needed to execute the following command to fix the problem:
"C:\Program Files\Common Files\Microsoft Shared\web serverAfter that SharePoint had copied the files and my solution worked correctly, but my wsp needed futher investigation.
extensions\12\BIN\STSADM.exe" -o copyappbincontent
Source: http://software.sharepointsolutions.com/Community/t/75.aspx
Friday, 8 January 2010
Remove lost/broken Webparts
In this case, the only thing you have to do is to remove the webpart. Removing the webpart in the webpart gallery doesn't solve this.Error
An error occurred during the processing of . Could not load file or assembly 'Solution.WebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a7985c93d0151889' or one of its dependencies. The system cannot find the file specified.
Solution:
Append ?Contents=1 to the webpart page's URL to display the Webpart Maintenance Page. On that page you can delete the malefactor.
Example: http://moss/default.aspx?contents=1