61738644-F196-11D0-9953-00C04FD919C1 Launch Permissions – Event 10016 on Windows Server 2008 R2 (SharePoint 2007 & SharePoint 2010)

If you are running Windows Server 2003 or a pre Windows Server 2008 R2 build then please refer to this article: http://www.sharepointassist.com/2009/01/27/61738644-f196-11d0-9953-00c04fd919c1-launch-permissions/ . However, if you are running Windows Server 2008 R2 or higher follow the steps below to correct the Event 10016 DCOM error 61738644-F196-11D0-9953-00C04FD919C1 related to the IIS-WAMREG Admin Service.

Always test these changes in your development and staging environment!!!

The DCOM Errors will appear in the System event log as Event 10016clip_image001

Normally, to correct this problem  you would simply open component services and fix the problem http://www.sharepointassist.com/2009/01/27/61738644-f196-11d0-9953-00c04fd919c1-launch-permissions/

clip_image002

You don’t have rights with R2 because only the trusted installer has rights to change the security on this component.

clip_image003

Launch regedit

clip_image004

Accept the UAC warning

clip_image005

Type F3 and search for the following string: 61738644-F196-11D0-9953-00C04FD919C1 related to the IIS-WAMREG Admin Service.

clip_image006

Right mouse key on the key in the left hand pane then select permissions (do NOT change anything yet) and press the Advanced button

clip_image007

On the advanced security settings screen

  1. Select the Owner Tab
  2. Select a user in the “Change owner to:” box
  3. Check the “Replace owner on subcontainers and objects”
  4. Press apply

clip_image008

Now on the properties tab you may grant “Full Control” to the Administrators or another appropriate group

clip_image009

Now launch component services and locate the IIS WAMREG Admin Service

clip_image010

On the properties screen for the service

  1. Choose the Security tab
  2. Press Edit on the Security tab
  3. Press Add on the Launch and Activation Permissions window
  4. Choose the appropriate user which is most likely your Application Pool account

clip_image011

Grant the user Local Launch permissions and press OK

clip_image012

That’s it, you should no longer see the errors in your System Event log

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 1% [?]

SharePoint 2010 Installation Part 1 – Server Build

A lot of clients and colleagues ask me how I build out SharePoint in my lab so I decided to author a simple "how I did it" article on SharePoint 2010 installation. My environment is an 8GB Vista 64 Bit Ultimate running VMWare workstation 7.0. The host operating system typically only supports my Subversion repository and runs nothing else, all development, testing, and configuration happens on my development (guest) OS which, in this case is a 64 Bit Windows Server 2008 R2 *** It must be 64 bit ***.

Warnings and Gotchas

  • SharePoint Server must be 64 Bit
  • If you install the server as a domain controller it should have a fixed/static IP address
  • No matter how well you configure your server the SharePoint installer will still want to install additional roles and services from the internet therefore the server must have a network connection
  • SQL Server requires version 10.0.2714 or so which is quite difficult to configure as it requires several hot fixes to get to the necessary patch level

This server is a full SQL Server, Domain Controller, SharePoint Application Server, and Development Server so it’s more than just "all-in-one". For that reason, I have included some screenshots showing how I configured everything on this server.

Here’s the requisite software

  • Windows Server 2008 R2 (64 Bit)
  • SQL Server 2008 – You will have to every service pack imaginable so please please please get the most recent media you can find
  • VMWare or HyperV Virtual Environment
  • SharePoint 2007
  • Visual Studio 2010
  • SharePoint Designer 2010

 

Download the Windows Server 2008 R2 ISO

http://www.microsoft.com/windowsserver2008/en/us/trial-software.aspx

clip_image001

Install Windows Server 2008 R2 on VMWare or in your HyperV environment – The steps to follow can easily be ported to a HyperV installation so don’t worry, just continue on.  If you’re building a physical box, no problem, simply continue on past the VMWare portion.

clip_image002

clip_image003

clip_image004

Note that I’m naming this server something generic so that I can clone it before installing SharePoint 2010, that way if I make a mistake I can roll back.

clip_image005

Don’t be stingy on the space, you’ll regret it later if you are

clip_image006

clip_image007

clip_image008

After installation completes you should see a screen similar to the one shown below

clip_image009

Before you do anything (if this server is going to be a Domain Controller), you need to give it a hard IP

clip_image010

Add the Active Directory Domain Services role

clip_image011

clip_image012

clip_image013

clip_image014

clip_image015

clip_image016

clip_image017

clip_image018

Set the password in computer management (since we’re not part of a domain yet do not use active directory users and computers ‘ADUC’)

clip_image019

clip_image020

clip_image021

Leave the "DNS Server" checkbox checked, this will allow you to easily test Alternate Access Mappings in SharePoint

clip_image022

clip_image023

clip_image024

clip_image025

clip_image026

clip_image027

The server will reboot and log you back in automatically, if you are not logged back in remember to use the administrator account as the accounts you previously had on the server may no longer be valid depending on the password complexity that you originally chose.

Add the following roles if you haven’t done so already

  • Application Server
  • Remote Desktop Services
  • Web Server (IIS)
    • IIS 6 Management Compatibility

clip_image028

clip_image029

clip_image030

clip_image031

Leave the default services selected for the IIS Web Server (IIS) Role

clip_image032

Add IIS 6 Management Compatibility (required by SharePoint 2010)

clip_image033

clip_image034

clip_image035

After reboot, under administrative tools open Active Directory Users and Computers. Create an organizational unit called "Service Accounts" and create the following users.

  • SharePoint Application Pool
  • SharePoint Search Service
  • SharePoint Search Content Access
  • SQL Service

clip_image036

clip_image037

clip_image038

Also create a SharePoint Administration account that you might use instead of your personal login. Hint, this is useful when you want to take screenshots and not have your name on every single item (Unless you’ve got a nerdy name like Ulysses and you want to see it everywhere).

clip_image039

Run windows update

clip_image040

Now shut down the server and take a snapshot

clip_image041

Take a snapshot!

clip_image042

The next part of this series will cover the SQL 2008 installation and configuration.

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 1% [?]

Querying SharePoint Profile Data from an InfoPath Form

    Problem

    Day after day I have users asking me how to get additional information about the selected user from the contact selector/people picker per my example at http://sharepointassist.com/2009/02/27/adding-a-contact-selectorpeople-picker-to-an-infopath-form/.

    Unfortunately, there is no easy way to do this, the only way to do this is to wire in a simple web service query that pulls the necessary information when a user chooses a name in the people picker. Upon selection, the web service call is made, returning data to the GetUserProfileByName data connection, the resulting data in the GetUserProfileByName data connection can be diligently filtered and used to set the values of fields in the main data connection.

    Solution

    Locate the asmx file for the user profile service of your server MOSS 2007 Server: it should appear similar to this URL: http://sharepoint/_vti_bin/UserProfileService.asmx?WSDL

    Open InfoPath and select Tools >> Data Connections

    clip_image001

    Create a new data connection

    clip_image002

    Choose Web Service

    clip_image003

    Enter the URL to the UserProfileService.asmx web service (hint, test this in a browser, if it doesn’t work there it certainly will not work in InfoPath)

    clip_image004

    Choose the GetUserProfileByName operation

    clip_image005

    Note the parameter, you will not need to enter a default value

    ** Hint: If you run the GetUserProfileByName without specifying a name, SharePoint will return the profile data for the currently logged in user.

    clip_image006

    Do not store a copy of the data in the form template

    clip_image007

    You can rename the operation here but I recommend leaving it exactly as is

    clip_image008

    Now note the data connection in the data source view

    clip_image009

    Now we are going to try creating a data connection from infopath that queries this web service, some of your users might see the warning below when testing with their personal accounts.

    clip_image010

    To grant users rights to query the profile database open “Central Administration” and select your shared services provider (take care not to accidentally expose profile data that you would not normally like to share)

    clip_image011

    Under User Profiles and My Sites select “Personal Services Permissions” and grant your users, such as domain\domain users, rights to read user profiles

    clip_image012

    Now in your people picker (see article http://sharepointassist.com/2009/02/27/adding-a-contact-selectorpeople-picker-to-an-infopath-form/) add a rule to the AccountId group that runs only when the AccountId is not blank.

    ** If the rule does not trigger for the AccountId field try adding it to the Person group

    We are going to set the value of the queryfield in the secondary data source called GetUserProfileByName to the value of the AccountId field in our people picker’s data structure. After that we will query the GetUserProfileByName then set the Employee’s Department equal to the Value returned (note that we need to filter the PropertyData, more on that later)

    clip_image013

    Create a rule on the AccountID field called GetEmployeeProfile

    clip_image014

    Set the value of the secondary data source GetUserProfileByName to the AccountID

    ** Hint, the AccountId can be any field that contains the user’s username

    clip_image015

    The next action in the rule should query the GetUserProfileByName data connection

    clip_image016

    Filter the ValueData where the “Name” field equals the user profile property name such as Department (note that you could do this for Title, WorkPhone, Manager, etc. as long as that field is a property in your profile database)

    clip_image017

    Our filter condition will appear as follows

    clip_image018

    After selecting OK our filter data now appears under existing filters

    clip_image019

    Click ok again and you can see that we are asking the profile datasource for the ValueData.Value where the PropertyData.Name equals “Department”

    clip_image020

    After all that you can see that we are setting a field in the main data source to a value we located in a secondary data source called GetUserProfileByName

    clip_image021

    The resulting rule will appear as follows

    clip_image022

    Note that the query does not work across domains!!!

    Hint: If you run the GetUserProfileByName without specifying a name, SharePoint will return the profile data for the currently logged in user… this is useful for pre-populating the form on open.

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 3% [?]

Configure a SQL Server Alias for Sharepoint (SQL Server 2008)

A SQL Server alias is a tidy way to protect yourself from configuration changes in a SharePoint farm. Anybody who works with SharePoint on a regular basis knows that it is very difficult to move SharePoint to a different SQL Server. When disaster strikes wouldn’t it be nice if you could simply change SQL Server that SharePoint references? To do so, install the SQL client access tools on each server and create a SQL Alias in SQL Server Configuration Manager, from there your SharePoint Server can be re-homed with little effort.

Open SQL Server Configuration Manager

clip_image001

Enable TIP/IP if you haven’t done so already

clip_image002

Under the 32 bit Client 10.0 Configuration (32 Bit)

** yes, one would think you need to do it under the 64 bit but it looks like enterprise manager thunks down to 32 bit

clip_image003

Repeat the steps above for SQL Native Client 10.0 Configuration

** SharePoint uses the 64 Bit Native Client

clip_image004

Test your connection using enterprise manager

clip_image005

In the event of a SQL failure, or if you simply want to migrate to a different SQL Server, all you have to do is update the SQL Server Alias in each client machine to reference the new SQL Server. The example below shows how to connect using a named instance on a new server

clip_image006

Or just connect to another server’s default instance

clip_image007

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 1% [?]

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered

Problem

When you run powershell on your server you get the following error:

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.

clip_image001

 

Solution

Make sure the logged in user has rights to the SharePoint_Configuration database

    • SharePoint_Shell_Access
    • DB_owner (try reducing the privileges after you get it working in order to support “least privileges”

clip_image002

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 2% [?]

Installing Identity Lifecycle Manager (ILM) on Windows Server 2008

Below are the screenshots that demonstrate the steps I followed when installing Identity Lifecycle Manager in my lab.

Cloned 2008 Server 32 Bit for ILM (Note that I cloned my SharePoint dev server)

clip_image001

DCPromo and activate AD role

Create ILMService Account

clip_image002

Add to domain admins

clip_image003

Installed new database server

clip_image004

Install ILM

clip_image005

clip_image006

clip_image007

Now install metadata services and user provisioning

clip_image008

clip_image009

clip_image010

clip_image011

clip_image012

clip_image013

clip_image014

clip_image015

clip_image016

clip_image017

clip_image018

============================================================================================

Install the Microsoft Identity Integration Server 2003 Resource Tool Kit

clip_image019

clip_image020

clip_image021

clip_image022

clip_image023

clip_image024

===================================================================================

Let’s run ILM

clip_image025

Success!

clip_image026

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 8% [?]

Excel Services Dashboard Screenshots

I often have clients ask for examples of Excel Services dashboards.  Below are two screenshots of demo dashboards I developed back in 2008.  The  data is pulled from the Microsoft Dynamics Two Inc. sample database using SQL queries that I authored specifically for these demos.

Vendor Dashboard with KPI’s (Click to view full size)

Vendor

Customer Dashboard (Click to view full size)

Customer

VN:F [1.8.1_1037]
Rating: 10.0/10 (1 vote cast)
VN:F [1.8.1_1037]
Rating: +1 (from 1 vote)

Popularity: 12% [?]

OWSTimer Pegging CPU and Filling Logs

This is the second posting I’ve put together regarding OWSTimer.  In a previous post I had a client who simply pegged the timer by running a batch update against thousands of list items subsequently kicking off thousands of workflows.  In a more recent encounter, one of my clients called me with the OWSTimer again going mad, but for a completely different reason. 

Problem

OWSTimer.exe taking 100% CPU and/or creating Gigabyte sized log files.

Solution

Below  are the steps I used to troubleshoot the client’s environment with the actual screenshots.  In the end I believe that a simple stsadm –o execadmnsvcjobs did the trick.

 

Step 1- Check the logfiles, they are too big to open.

clip_image001

 

Step 2 – Are we out of drive space?

clip_image002

Step 3 – With permission from the client, stop "Windows SharePoint Services Timer”

clip_image003

Step 3 – Also stop the “Windows SharePoint Services Tracing” services

clip_image004

Step 4 – Review the log.  We clearly have timer job issues

clip_image005

 

Step 5 – Review the event log.  Hmm, note how the time changed?  Client confirmed that they had a time issue with the server a few weeks back.  Looks like we had daylight savings time kick in unexpectedly this morning.

clip_image006

Step 6 – Review the timer jobs.  Nothing significant to see

clip_image008

Step 7 – Let’s execute any pending jobs

clip_image007

Step 8 – Before we restart let’s turn off tracing so that we don’t keep filling up the log files (note that we do turn tracing back on later).

clip_image009

Step 9 – Restart the "Windows SharePoint Services Timer” and “Windows SharePoint Services Tracing” services

clip_image010

Step 10 – Re-run stsadm –o execadmsvcjobs

clip_image011

Step 11 – Check the timer service, CPU looks good!

clip_image012

Step 12 – Re-enable tracing

clip_image013

 

Explanation/Theory

Time change caused timer job to trigger because it thought it was the predecessor of a timer job already in the stack. Of course 2 timer jobs most likely tried to communicate or attach to the same object causing the server to spin into a loop. Large logfiles was simply a side effect (and the logs were behaving properly).

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 15% [?]

How to change the name of a Complex InfoPath Data Source

Sometimes InfoPath doesn’t allow you to rename your main data source so you are stuck with a name that doesn’t necessarily match with the function of the form.  This is very common for those of us that like to use Microsoft’s InfoPath templates as a head start.  For example, a form designed based upon an InfoPath sample may include the "expenseReport" name. This is quite annoying especially when you need to compile the datasource with the "xsd /c" command and the output classname is less than helpful.

 

Below is the example of a form data source that was created using Microsoft’s “Expense Report” example form. 

clip_image001

 

How to rename the your data source

  • If this field is disabled when you open the properties window you will need to follow the steps shown below to rename the datasource
  • Open your form
  • Select file >> Save as Source Files
    clip_image002
  • Accept the signing message
    clip_image003
  • *** Close the form *** don’t skip this step
  • Open the schema.xsd file from the location where you saved the source (if you don’t see the schema.xsd then your datasource is not complex so you can still rename it using the right mouse key >> properties)
    clip_image004
  • Locate the element as shown below and rename it (sorry but you shouldn’t rename any of the target namespaces or xsns)
    clip_image005
  • (update the <xs:element to match the name you would like without spaces
    clip_image006
  • Save the shema.xsd
  • Open the original form and select Tools >> Convert Main Data Source
    clip_image007
  • Select the schema.xsd file you modified previously
    clip_image008
  • Choose No if InfoPath asks you "Do you want to add another XML Schema or XML document to the main data source?"
    clip_image009
  • Voila, your main Data Source’s top level element is renamed
    clip_image010
VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 7% [?]

Serialization Issue with Windows Workflow Foundation and Sharepoint Workflow

Problem

You are receiving the error similar to the one below when attempting to execute a SharePoint WWF workflow. 

======================================================================================

11/19/2009 10:52:19.18     w3wp.exe (0×17FC)                          0×157C    Windows SharePoint Services      Workflow Infrastructure          88xr    Unexpected    WinWF Internal Error, terminating workflow Id# 86a35560-7bc3-4841-8a81-d8180d9b6f5c   

11/19/2009 10:52:19.18     w3wp.exe (0×17FC)                          0×157C    Windows SharePoint Services      Workflow Infrastructure          98d4    Unexpected    System.Workflow.Runtime.Hosting.PersistenceException: Type ‘Microsoft.SharePoint.SPWeb’ in Assembly ‘Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ is not marked as serializable. —> System.Runtime.Serialization.SerializationException: Type ‘Microsoft.SharePoint.SPWeb’ in Assembly ‘Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ is not marked as serializable.    at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)    at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)    at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()    at System.Runtime.Serialization.Formatters.B…   

11/19/2009 10:52:19.18*    w3wp.exe (0×17FC)                          0×157C    Windows SharePoint Services      Workflow Infrastructure          98d4    Unexpected    …inary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)    at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)    at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)    at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)    at System.Runtime.Serializati…   

11/19/2009 10:52:19.18*    w3wp.exe (0×17FC)                          0×157C    Windows SharePoint Services      Workflow Infrastructure          98d4    Unexpected    …on.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)    at System.Workflow.ComponentModel.Activity.Save(Stream stream, IFormatter formatter)    at System.Workflow.ComponentModel.Activity.Save(Stream stream)    at System.Workflow.Runtime.Hosting.WorkflowPersistenceService.GetDefaultSerializedForm(Activity activity)    at Microsoft.SharePoint.Workflow.SPWinOePersistenceService.SaveWorkflowInstanceState(Activity instanceState, Boolean unlock)    at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation)    — End of inner exception stack trace —    at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation)    at System.Workf…   

Explanation

This error occurs when you have complex member objects in your C# or VB code that SharePoint can’t serialize.  These objects, typically something like SPWeb or SPUser can’t be serialized so SharePoint throws this error, typically after first workflow task.

Solution

Do not create member (top level) variables in your workflow classes. For example, do not declare something like “SPWeb web = spWorkflowProperties.web”.  Instead retrieve this information within each method. 

In another example, I had attempted to create my own approvals class in one of my workflows that was a simple class that I had created with three properties.  SharePoint didn’t let the workflow run past the first task until I had marked the approvals class as Serializable.

 

[Serializable]
public class Approvals{

}

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 10% [?]