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

Wednesday, October 6, 2010

Introduction to Windows 7 and Office 2010 Activation

Background

Activation of Windows 7 has become an increasingly important topic for very large organizations. This blog will not go into the benefits of why you should be moving onto Windows 7 however what I will address is the activation of Windows 7.

First the best resource to get some background on Windows 7 Activation is here - http://technet.microsoft.com/en-us/library/dd979803.aspx. What I will do in this blog is summarize some of the more important key aspects that you should understand right off the bat. I recommend reading this for more detailed information.

Windows 7 has enhanced windows activation technologies for security purposes. The goal of Office activation for Windows 7 is to stop counterfeit software and provide new anti-piracy innovations, counterfeit detection practices and tamper resistance. If counterfeit software is used in an organization:

  • It is very common that counterfeit software have spyware, Trojans, and other malware embedded within them; some research says that is the case 25% of the time.
  • There are increased IT costs associated to sustainability of counterfeit software. There are can be 20% to 30% added support cost.
  • When counterfeit software is used because there will be decreased employee productivity and loss of critical data.
  • Security issues get compounded because updates and support will not be provided by Microsoft.
  • Finally there can be increased costs from system reactivation, employee disruption and financial penalties.

As you can see the intent here is provide to a safer and more secure computing environment for the business. This process is not mechanism for trying to ensure the license agreements are being adhered to. This is solely for the purpose to reduce cyber-terrorism, organized crime and hackers. To achieve this Microsoft has:

  • Invested in education initiatives to raise awareness.
  • Implemented engineering features such as secure packing, Software Protection Platform, product activation and online validation.
  • Support enforcement to take action against counterfeiters using the data it collects.

Basics of Activation and Licensing of Windows 7

There are several models for Windows 7 licensing:

  • Retail – Standard process where a person must activate Windows 7 within the first 30 days with the product key that was purchased.
  • OEM – Windows 7 is activated on the firmware (BIOS) of the computer during manufacturing.
  • Volume Licensing – Customized licensing programs that are for large purchases for an organization. Programs such as Open License, Select License and Enterprise Agreements only cover upgrades to a machine with a valid OS on it. Tools and technologies that are provided to automate the activation process for large organizations.

There are two tools that assist with the activation the Key Management Service (KMS) and Multiple Activation Keys (MAK).

  • The Key Management Service (KMS) is a service that can be hosted internally at an organization to do the activation process.
  • Multiple Activation Keys (MAK) activation is used for one-time activation where the activation services are hosted at Microsoft.

If you are familiar with the activation process, there have been some improvements that have been added for Windows 7:

  • Ability to add customized messages to the windows activation window that may be specific to the organization.
  • Virtual system counting for KMS that will correctly activate virtual systems in the same way physical systems are. This is important for organizations that are rapidly virtualizing their infrastructures.
  • Improved DNS support for KMS to support complex DNS installations at an organization.
  • Token-based Activation for environments that are completely disconnected from the internet or from the phone.
  • Improved manageability of activation service deployment.
  • Expanded WMI properties and methods.
  • A consolidated portal that helps to identify all their keys, key tracking and key organization.
  • MAK limit monitoring which will help avoid going over the agreed limit.
  • Improved efficiency requiring fewer system resources.

Details of KMS

For large organizations KMS will be one of the primary solutions employed. The following are some high-level notes about KMS:

  • KMS Activation Threshold ensures that a minimum amount of machines that must be activated on the network. For Windows Server 2008 it is 5 and Windows 7 it is 25. No computers will be activated until this threshold is exceeded. This includes either physical or virtual. The KMS Activation Count Cache is used to track the activation threshold and track the computers that have requested activation.
  • KMS activation requires standard TCO/IP connectivity and DNS is used to publish and find the KMS service.
  • KMS Activation Renewal is a process where the activated client computer must connect with the KMS service to remain activated. This is done every 180 days. By default, each client will try to renew itself every 7 days. If the 180 days passes without renewal, the client computer will try to connect to KMS every 2 hours. This is actually a good feature to ensure that if company resources have been improperly removed from the organization; the organization will not incur the cost of keeping that license valid as well as disable the client computer OS.
  • The KMS service user SRV resource records in DNS to communicate the locations of the activated client computers. KMS uses dynamic update protocol to publish the SRV resource records. There are other options available if this is not possible. Client computers discover the KMS service by retrieving SRV resource records from the DNS.
  • Note that the payload associated to this communication is very small; only 250 bytes each way. The only data sent is the product key, OS edition, current date, license condition, hardware ID hash, language settings and IP address (used to verify the location of the request).
  • This is a lightweight service that does not require dedicated hosting. It can be co-hosted with other services such as AD domain controllers.
  • KMS can run on either a physical or virtual machines.
  • KMS needs to run on a Windows OS and can support back to Windows Server 2003. One thing to note is that if KMS is installed on a Server 2008 machine it activate any windows operation system however if KMS is running on a Windows 7 machine it can only activate Windows 7 or Vista.
  • A single KMS host server can activate an unlimited amount of machines however it is recommend to have two KMS host servers for failover. In most organizations only two are every needed.
  • There is a KMS key which is used to activate the service. This key can be used up to six machines. This key is not installed on the clients.
  • The user does not need to do anything to connect to the LMS service that is hosted. As well the user does not need to have any administrator privileges for this activation to occur.

Details of MAK

Here is some detailed information:

  • The number of keys activated through the MAK service is based on the licensing agreement that is with Microsoft.
  • Activation can be done by the user where they do it either by internet or phone.
  • A MAK Proxy can be created on the local network which will gather activation information and will send a batch of activations requests to the Microsoft MAK service. This proxy is configured using the Volume Activation Management Toolkit.
  • MAK is recommended for computers that rarely or never connect to the corporate network.
  • MAK activation can be configured to computers that were originally activated by KMS.

Office 2010 Activation

Office 2010 activation uses the same services for activation as Windows 7. The only noticeable difference is the minimum number of licenses that must be active for KMS is only five for Office 2010 versus the 25 needed for Windows 7.

Planning and Usage Scenarios

This article, which is part of this series, really spells it all out - http://technet.microsoft.com/en-us/library/ff793414.aspx. The usage of KMS and MAK really depend upon you knowing how people use their computers in the enterprise. KMS is recommended activation model for computers that will be on the organization network all the time or periodically. MAK is recommended when computers will be offsite with limited connectivity to the corporate network.

  • Corporate Network - It is recommended to use KMS and add more than one KMS service host if this is an enterprise deployment. If there are only 100 machines, a single KMS service is probably all that is needed. If the network will have less than 25 Window 7 machines, you should use MAK.
  • Isolated Network – This is like a brank office, high-security network, or DMZ. If ports can be opened to KMS (TCP port 1688), it is recommended to use KMS. Otherwise stand up a local KMS host service or use the MAK utilizing the same rules stated for Corporate Network.
  • Test or Development Lab – This is a completely isolated network. Standup a KMS host service the threshold will be exceeded, otherwise use MAK.
  • Disconnected Computers – There are several different scenarios. These are computers that have no internet connectivity. In that case a MAK (telephone) is recommended. For offsite machines that periodically connect/VPN in try to use KMS if they will connect within the 180 day window for KMS Activation. Otherwise MAK will have to be used. For machines that have internet access but will never have the ability to remotely connect into the network a MAK with Internet activation should be used.

So it is completely feasible to employee both KMS and MAK at the same organization based on the intended use of the computer.

Network Diagrams

To see some high-level diagrams of how the KMS host service would be placed into your infrastructure architecture please review this - http://technet.microsoft.com/en-us/library/ff793414.aspx. This covers the corporate, isolated and test/development views that I mentioned earlier.