Thursday, October 28, 2010

SharePoint 2010 Development on Windows 7

Microsoft recently announced a new solution that will allow developers to set up SharePoint 2010 development environments on their local Windows 7, 64 bit machine. Basically this PowerShell script that will ensure all the required software is installed and then will run the install of SharePoint 2010. All you need to do is modify a configuration file.

This is huge because it:

  • Reduces the barriers of entry for SharePoint 2010 development.
  • You do not need a VM or have to run Windows Server 2008 R2 on your laptop.
  • Helps ensure that SharePoint solutions are re-deployable and not being created directly on a production server.

Please read Chris Johnson’s blog for more information - http://blogs.msdn.com/b/cjohnson/archive/2010/10/28/announcing-sharepoint-easy-setup-for-developers.aspx

Access ULS Log Data in BCS

I found this really awesome solution that a developer or administrator should know about for SharePoint 2010. Many of us has had challenges in the past with accessing, scanning, drilling and flat wasting tons of time digging through tons of ULS logs in SharePoint 2007. Now with SharePoint 2010 there is an easy way to solve this problem many of the out of the box components and services.

The solution is to:

  • Use the new SharePoint 2010 feature to store logs in SQL Server database instead of digging through ULS log files on the server.
  • Use SharePoint Designer 2010 to build an External Content Type that points to the table.
  • Add a BCS web part to allow users to filter through logs – for instance search for a Correlation ID.
  • Use ECT list to display all data if you want.

This solution was written by Scott Hillier and can be accessed here - http://www.shillier.com/archive/2010/08/05/Using-Business-Connectivity-Services-to-Display-SharePoint-2010-ULS-Logs.aspx

Monday, October 25, 2010

Excel Services 2010 Unattended Service Account Error

Issue

I recently was trying to spin up a new SharePoint 2010 development VM with Excel services and I ran into a rather interesting issue. I had published out an Excel 2010 workbook to my SharePoint 2010 server, I would go an open the spreadsheet, and it would render with default data but whenever I changed a value on the slicer or refreshed the data connections I was getting the following error:

The data connection uses None as the external data authentication method and Unattended Service Account has not been configured. The following connections failed to refresh

The thing about this error was that I really believed that I had the Unattended Service Account for my data connection set up properly. I had done the following:

  • I set up Excel Services 2010 in Central Admin to trust both the document and data connection libraries.
  • I had set up the Data Connection Authentication Settings to None and saved that into the data connection library.
  • I had created a target application in the Secure Store Service which had the target application None.
  • I had subsequently credentials on the Target Application to an account that has access to the database.

I would get this error even when I was logged in with the administrator account.

Resolution

The issue actually had to do with the way I had configured the Target Application in the Secure Store Service for my unattended service account. For the Target Application I had set the Target Application Type to Group. However on the third step of the configuration wizard for the Target Application, I had set the Members to just a domain account. The solution was to set it to a group. Once I changed it to xxx\Domain Users everything started working perfectly.

Here is a reference that gave me the clue on what I had done wrong - http://howardmorgenstern.wordpress.com/2010/02/17/configure-excel-services-2010-for-data-refresh/

Cannot Save or Publish File to SharePoint

Just a little tip, if you have built a brand new Server 2008 environment for you to do your local SharePoint development on, make sure you turn on the Desktop Experience Features. The problem I was having is I was trying to publish some Excel 2010 spreadsheets I had create to Excel Services and I could not save directly to the SharePoint 2010 library. I was getting a message that said:

Path does not exist. Check Path and try again.

Once I turned on this feature and rebooted the VM, I could then save to SharePoint from Office.

Tuesday, October 12, 2010

SharePoint 2010 Social Computing Features

I was recently asked to provide some information around the new SharePoint 2010 Social Computing Features. Here is some public domain information that should provide more than enough information on how to get started.

Sunday, October 10, 2010

Set Up Record and Non Record Retention Policy in Managed Metadata Hub

Background

I working through Records Center for SharePoint 2010 and I found something interesting. I had:

  • Created a hub from where I wanted to publish out my content types to other site collections.
  • I was able to centrally create term sets and terms and then use managed metadata columns on my content types that will be pushed out. I was able to add policies to my content type and re-publish with no problem.
  • I created a records center with folders and rules which I was able to send documents to from any of my site collections.
  • I was able to turn on In Place Records management for different site collections and re-use my central content types with them.

One little thing I ran into was there is a new feature of Records Management for SharePoint 2010 that allows me to create retention policies for when a piece of content is a record versus a non-record. This is really powerful because it allows you to create rules such as:

  • After a piece of content has not been updated for 1 year, delete the document.
  • However if the same piece of content is a record, and has not been modified for a year (i.e. because it has been locked down) move it to the Record Center.

This may not be the most realistic scenario however you get the point that I can create different policies and treat it differently based whether it is a record or not.

Issues

Now the issue was, when I went to the content type definition on my Hub, I was not seeing the ability to create policies as I just described. However I was able to create local site collections content types in some places and see this.

Solution

The solution is on the Hub, go to Site Settings >> Site Collection Features >> Activate In Place Records Management. Even though I may not be doing In Place Records Management on the site collection where I am centrally managing content types, I must turn this on so I can create the retention policies like I just described.

Error Creating Records Center

I was recently getting a rather unexpected error when trying to create a Records Center in one my SharePoint 2010 development environments. I went through the ULS logs and I found some entries. I was not able to find anything that really described the solution exactly.

When reading the errors, at least they point me in the direction of something being wrong with my email configuration. Sure enough, I had fat fingered my in-coming email configuration in Central Administration. One thing I learned is that there is a strong tie to email configuration with running of the Records Center template for SharePoint 2010.

-------------------

Document Management Server Information Policy Management wyxj Unexpected Email Routing: Failed to activate email routing feature. Exception: Microsoft.SharePoint.SPException: Error in the application. at Microsoft.SharePoint.SPList.UpdateDirectoryManagementService(String oldAlias, String newAlias) at Microsoft.SharePoint.SPList.Update(Boolean bFromMigration) at Microsoft.Office.RecordsManagement.RecordsRepository.EmailRecordsHandler.EnsureSetupSubmittedRecordsList(SPWeb web) at Microsoft.Office.Server.Utilities.CultureUtility.RunWithCultureScope(CodeToRunWithCultureScope code) at Microsoft.Office.RecordsManagement.Internal.EmailRoutingFeatureReceiver.FeatureActivated(SPFeatureReceiverProperties properties) 4607e09b-6a0d-4549-b408-3d9c738b02e1

-------------------

SharePoint Foundation Topology c97b Unexpected Exception attempting to ApplyWebTemplate to SPSite http://japergis1/sites/rc: Microsoft.SharePoint.SPException: Error in the application. at Microsoft.SharePoint.SPList.UpdateDirectoryManagementService(String oldAlias, String newAlias) at Microsoft.SharePoint.SPList.Update(Boolean bFromMigration) at Microsoft.Office.RecordsManagement.RecordsRepository.EmailRecordsHandler.EnsureSetupSubmittedRecordsList(SPWeb web) at Microsoft.Office.Server.Utilities.CultureUtility.RunWithCultureScope(CodeToRunWithCultureScope code) at Microsoft.Office.RecordsManagement.Internal.EmailRoutingFeatureReceiver.FeatureActivated(SPFeatureReceiverProperties properties) at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce) at Microsoft.SharePoint.SPFeat... eb51ce5b-d984-4488-8fa2-c6c91da1b21e

SharePoint Foundation Topology c97b Unexpected ...ure.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce) at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly) at Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, String featureName, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope) at Microsoft.SharePoint.SPFeatureManager.EnsureFeaturesActivatedCore(SPSite site, SPWeb web, String sFeatures, Boolean fMarkOnly) at Microsoft.SharePoint.SPFeatureManager.<>c__DisplayClass7.<EnsureFeaturesActivatedAtWeb>b__6() at Microsoft.SharePoint.SPSecurity.RunAsUser(SP... eb51ce5b-d984-4488-8fa2-c6c91da1b21e

SharePoint Foundation Topology c97b Unexpected ...UserToken userToken, Boolean bResetContext, WaitCallback code, Object param) at Microsoft.SharePoint.SPFeatureManager.EnsureFeaturesActivatedAtWeb(Byte[]& userToken, Guid& tranLockerId, Int32 nZone, Guid databaseid, Guid siteid, Guid webid, String sFeatures) at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId) at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId) at Microsoft.SharePoint.SPWeb.Ap... eb51ce5b-d984-4488-8fa2-c6c91da1b21e

SharePoint Foundation Topology c97b Unexpected ...plyWebTemplate(String strWebTemplate) at Microsoft.SharePoint.ApplicationPages.TemplatePickerUtil.ApplyWebTemplateAndRedirect(SPSiteAdministration siteAdministration, String strWebTemplate, String strRedirect, Boolean bCreateDefaultGroups, Page page, Boolean bDeleteOnError) Attempting to delete the site collection. eb51ce5b-d984-4488-8fa2-c6c91da1b21e

-------------------

SharePoint Foundation Runtime tkau Unexpected Microsoft.SharePoint.SPException: Error in the application. at Microsoft.SharePoint.SPList.UpdateDirectoryManagementService(String oldAlias, String newAlias) at Microsoft.SharePoint.SPList.Update(Boolean bFromMigration) at Microsoft.Office.RecordsManagement.RecordsRepository.EmailRecordsHandler.EnsureSetupSubmittedRecordsList(SPWeb web) at Microsoft.Office.Server.Utilities.CultureUtility.RunWithCultureScope(CodeToRunWithCultureScope code) at Microsoft.Office.RecordsManagement.Internal.EmailRoutingFeatureReceiver.FeatureActivated(SPFeatureReceiverProperties properties) at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce) at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection pr... eb51ce5b-d984-4488-8fa2-c6c91da1b21e

SharePoint Foundation Runtime tkau Unexpected ...ops, Boolean fForce) at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly) at Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, String featureName, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope) at Microsoft.SharePoint.SPFeatureManager.EnsureFeaturesActivatedCore(SPSite site, SPWeb web, String sFeatures, Boolean fMarkOnly) at Microsoft.SharePoint.SPFeatureManager.<>c__DisplayClass7.<EnsureFeaturesActivatedAtWeb>b__6() at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param) ... eb51ce5b-d984-4488-8fa2-c6c91da1b21e

SharePoint Foundation Runtime tkau Unexpected ... at Microsoft.SharePoint.SPFeatureManager.EnsureFeaturesActivatedAtWeb(Byte[]& userToken, Guid& tranLockerId, Int32 nZone, Guid databaseid, Guid siteid, Guid webid, String sFeatures) at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId) at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId) at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate) at Microsoft.SharePoint.ApplicationPa... eb51ce5b-d984-4488-8fa2-c6c91da1b21e

SharePoint Foundation Runtime tkau Unexpected ...ges.TemplatePickerUtil.ApplyWebTemplateAndRedirect(SPSiteAdministration siteAdministration, String strWebTemplate, String strRedirect, Boolean bCreateDefaultGroups, Page page, Boolean bDeleteOnError) at Microsoft.SharePoint.ApplicationPages.CreateSitePage.BtnCreateSite_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) eb51ce5b-d984-4488-8fa2-c6c91da1b21e