Friday, October 29, 2010

An unhandled exception occurred in the Silverlight Application

I was getting "An unhandled exception occurred in the Silverlight Application" when I tried to create a new site in my new SharePoint 2010 farm. I was unable to create even the most basic blank site.

Thanks to Simon Carpentier at SharePoint Overflow, I was able to resolve this issue.



To resolve the issue, you need to go to Central Administration/Application management/(Select the web application)/General Settings/Set Web page Security Validation to "On"

Thursday, October 21, 2010

$Resources:DataSourceContentTypeName Error

After upgrading my SharePoint 2007 farm to 2010, when attempting to create  new site using a custom site template I received the error: "The content type name '$Resources:DataSourceContentTypeName;' cannot contain: " as shown below.


After many hours spent attempting to decipher log file entries, Googling, and researching, I zeroed in on the fact that I had a Reporting Services content type that seemed to have been corrupted in the upgrade process.

In 2010, the content type displayed as:


In 2007, the content type displayed correctly:


What was happening is that when I attempted to create the new site with the custom template, it was attempting to activate the corrupt content type. The solution to this issue is to simply delete and recreate the corrupt content type; but this is easier said than done.

Here is the process I used to resolve the issue.

Before a Content Type can be deleted, you must first remove it from every place it is being used. I found the easiest way to identify content type usage is to use the excellent tool SharePoint 2010 manager. This is a truly excellent tool. I was able to identify every place the offending content type was used quickly and easily, and remove it.

Once the content type was no longer being used, I was still unable to delete the content type. I would receive an error stating that the content type was "part of a feature" and could not be deleted.

The next step was to uninstall the feature, which I determined to be the "ReportServer" feature. Here's where it gets tricky. You must do things in the correct order to resolve the issue. The steps, and the order to perform them are:

  • stsadm.exe -o deactivatefeature 
  • stsadm.exe -o uninstallfeature -force 
  • stsadm.exe -o execadmsvcjobs 
  • stsadm.exe -o installfeature
  • stsadm.exe -o activatefeature
This will properly deactivate, uninstall, reinstall and activate the feature. Once this process is complete, your content types should display correctly, and not as $Resources:........

At this point you've cleaned up the corrupt content type. However, you still cannot create a new site with your custom template because the previously created template still references the old corrupt content types. You need to now create a new site template. The new template will be clean, and there will be no trace of the corrupt content types.

You can now create a site with the template.

Friday, October 1, 2010

Configuring The Unattended Service Account in SP 2010

In the process of configuring Excel Services on my test farm, I ran into an issue with enabling data refresh on Excel spreadsheets. I could get the spreadsheet to display in SharePoint, but I couldn't refresh the data.

I traced the issue to the fact that the unattended service account wasn't working properly. Further digging led me to the fact that my Target Application in the Secure Store Service application wasn't configured correctly.

Here are the steps I took to create a properly configured Target Application, and use that to configure the Unattended Service Account in Excel Services.

The first step is to create a valid Target Application in the Secure Store Service application:

Go to Cenral Administration > Manage Service Applications > Secure Store Service.

Provision the Target Application by giving it a Target Application ID, Display name, etc as shown below. It is important to select "Group" as the target application type, not individual which is the default.


Click Next and accept the defaults on the second screen. Click Next and specify the Target Application administror(s) and desired. The next box is very important. The only way I was able to get data refresh to work was to set the SharePoint Farm Account as the members. Simply enter the name of the farm admin account in the members box and validate it.

Click OK and create the Target Application. Once it's been created, you need to set the credentials for the account, so it can be encryped into the Secure Store database.

To set the credentials, select the dropdown on target Applicaton you just created and choose "Set Credentials". Enter the name of the farm account you entered as 'members', and enter the password.


At this point you've successfully created and provisioned the Target Application. The final step is to set the unattended execution account in Excel Services.

To do this, go to Central Administration > Manage Service Applications > Excel Services > Global Settings.

Scroll to the bottom of the settings page a type in the Target Application ID of the Target Application we just created. Click OK.

Once I completed these steps, I was finally able to get my Excel spreadsheets to properly refresh in Excel Services.