Skip Ribbon Commands
Skip to main content
Retrieving Data
Home
Welcome - Michael J. Hamilton, Sr.
August 30
The application-specific permission settings do not grant Local Activation for the COM Server application with CLSID - IIS WAMREG admin service issues - Windows Server 2008 R2

The application-specific permission settings do not grant Local Activation for the COM Server application with CLSID - IIS WAMREG admin service issues - Windows Server 2008 R2

I blogged about this a few years ago - it surfaced immediately when configuring SharePoint 2007/WSSv3 environments.

This blog however, focuses on this issue on Windows Server 2008 R2 - and attempting to resolve the issue by configuring Component Services - and finding you do not have permission to do so - in Windows Server 2008 R2.

Let's get started....

PROBLEM CASE:

You see event log entries that give you the error above.

The answer really is pretty straight forward, and something I include in every document I develop regarding the build out of a SharePoint Farm. You must configure Component Services to allow the SharePoint Timer Job Service account to have activation/launch/activate permissions to the IIS WAMREG admin service, in Component services.

See the error below:

IISWAMREG_InitialError.png

 

To resolve this you must open Component Services, expand all the tress into My Computer-->DCOM and locate the IIS WAM REG Admin service.

  

You right-click on it --> Properties - and then select the Security Tab.
  
Alas - what if you're running Windows Server 2008 R2? You'll notice that EVERYTHING in here is grayed out. You're admin on the host, and you should be able to do everything, correct? In Windows Server 2008 R2 they changed a few things, and the only account that has full privileges here is the TrustedInstaller account.

  

So - we must edit our registry to allow the Administrators Group on the local computer, more than read-only permissions in DCOM.

 
Launch REGEDIT again - and locate: HKCR\AppID\{61738644-F196-11D0-9953-00C04FD919C1} - this is the IIS WAMREG Admin ClassID
 
You should have a view like the following:
IISWAMREG_CLSID.png

 
Right click on this key (the Key is the <guid> in the left side of the upper screen that is currently highlighted) and select Permissions
 
IISWAMREG_KeyPerms.png

 
Once in the Permission for <guid> dialog, select Trusted Installer - and notice it has full control

 

IISWAMREG_PermsTI.png
 

Now, if you select Administrators group - see the difference?

 

So far - I've only seen this in 2008 R2 OS
 
We need to tick off Full Control for Administrators and save this.
 
IISWAMREG_PermsAdmin.png
 
Once this is ticked off, OK back out of the permissions and close REGEDIT


Once I did this - I saw the following:

IISWAMREG_Perms_NoChg.png

Almost immediately - I knew what the problem was.

I have to have Ownership of this Registry key - job just change the permissions of it - which I obviously cannot do- I just own it@@@

Not triial - but not unusual at a.

If you have ever foold around in NTFS - taking ownership of a folder - then you're comfortable here. If not - well, follow through:

 

To get around this - and again, I've only seen this in 2008 R2 server, we must take ownership of the Key in this case - and make the Administrator the owner.
 
Right-click on the key - Permissions:
 
IISWAMREG_ChgOwner_Adv.png
 
Here we'll click the Advanced button in the lower-right area of the dialog:

 

IISWAMREG_ChgOwnDiag.png

 

Once on the Advanced - notice the tab - Owner - click that…

IISWAMREG_TkOwner.png
 

Notice we've selected the machineName\Administrators group - click OK to force taking ownership as the Administrator's Group

Now - repeat the steps to set the Administrator to Full Control - right-click on the Key - Permissions:
 
IISWAMREG_PermsAdmin.png
 
Now click OK and you should not receive the error:
 
Close the Registry Editor and launch the Component Services again (Start-->Administrative Tools-->Component Services
 
IISWAMREG_OpnCompSvc.png

 
Now click OK and you should not receive the error:
 
Close the Registry Editor and launch the Component Services again (Start-->Administrative Tools-->Component Services

IISWAMREG_DCOM_Props.png
 
In the IIS WAMREG admin service Properties dialog - click the Security tab - notice they're not grayed out any longer?

IISWAMREG_DCOM_Props2.png

Now, we want to add our SharePoint Farm Service account for the SharePoint Admin/Timer Job Service - to the Launch and Activation Permissions, and Access Permissions

 
Click Edit in the upper area of Launch and Activation Permissions, then Add, type in your service account, then OK back to the Service Properties dialog.

 

IISWAMREG_DCOM_Perms_LA.png

 

Now we'll set the Access Permissions. Click OK to close this once you've set the permissions on the correct service account.

 

First, notice the middle section - Access Permissions - is set to Use Default - click Customize for the Edit button to become enabled, then click Edit

IISWAMREG_Access_Perms2.png

As we have done - click Add - add your service account, OK and then OK to close the Access Permissions dialog.

 

Click OK and back your way out of Component Services now.
 
  1. This resolves the IIS WAMREG Admin Service DCOM issue, and
  2. Showed you how to get around some of the new security in Windows Server 2008 R2.
  3. Now - go back into the registry and set  the Administrator to have Read-only on this key again, and you'll be set.
 
NOTES: When you make registry changes, ALWAYS go back and reset them, if applicable - as in this case.

August 26
SharePoint 2010 Multi-Tenancy / Multi Tenancy Server Setup / Architecture - Multi-Tenant SharePoint

SharePoint 2010 Multi-Tenancy / Multi Tenancy Server Setup / Architecture - Multi-Tenant SharePoint

Okay... We have a great deal of ground to cover here. I am going to bullet point specifics that we're going to look to accomplish, and because of just time - which I get very little of - I'm going to break these posts up so that you can work through each one and eventually have the end result.

Objectively - after each phase - you'll have a solid multi tenant server setup.

ASSUMPTIONS:

Before we begin - some major assumptions here

  1. You have a installation of SharePoint Foundation or Server already in place
  2. You have 'service' accounts - or Managed Accounts already configured, and you know what these are.
  3. You will be logged in as a local Administrator on the SharePoint host, and the account you are logged in as - is in the Farm Administrator's Group in SharePoint

If you have SharePoint installed and configured, it does not really matter what your configuration is - I'm going to help you:

  • Create a Managed Account and a User Principal Credential Account in PowerShell (this will be necessary, as you'll see throughout our blog postings)
  • Create a Subscription Settings Service Application and Service Application Proxy
  • Create a Tenant Administration Account
  • Create a Tenant Site - managed by the Tenant Admin Account.

This first walk through is light-weight, yes, but it will give you key pieces that you'll need.

We'll start this as SharePoint Server Multi-Tenancy Entry-Level - Phase 'x' - and each phase will be a number.

The Entry-Level will be as simple as what I described above.

Next, we'll work through Multi-Tenancy - Service Applications and Tenants

Finally, I'm going to work you through how to do what the documentation claims you cannot do: Specifically, we're going to create the top-level web application as, say - a Service Offering - GoldServices, then a root-level site collection, then host-header based site collections which are tenants under that GoldServices web application. What is not trivial here? We're going to be able to do everything on port 80 - and use standard IIS host headers to resolve all sites - including the top-level web application - again, someting they say you cannot do.

Well, we can do it all.

Okay - first things first - our Entry-Level Tenancy Setup. Let's get started.​

August 22
SharePoint 2010 - Multi-Tenancy/Multitenancy - Creating Multi-Tenancy Hosting in SharePoint 2010

I just wanted to take a few minutes and let you know that I am about to dump a ton of postings on you that have to do with being able to setup Multi-Tenancy In SharePoint 2010 - Foundation and Server.

I have read a half dozen blogs on this - none of them - and I mean NONE of them - actually walked through the 'how do I do this?' so we're going to be doing that for you here.

There are critical steps in getting multi-tenancy done correctly. We'll start off where we need to, and I want to emphasize here - this might seem light-weight to you initially, or it may be something 'you' are already familiar with - but remember - we're building out a Multi-Tenancy SharePoint 2010 Server Architecture, and that's the bottom line. Building a server architecture that supports both, tradditional path-based, web application/site collection, SharePoint sites, as well as host-header-based site collections in a tenancy architecture.

Please forgive me if I jump forward, or back - and miss something - I'll try not to. You let me know if you believe I omitted anything, or if you believe there is an easier way to accomplish an approach I present.

Thanks... the first postings will begin this evening. I will try to commit enough time each evening this week to take you from zero to hero when it comes to doing multi-tenancy sites in SharePoint 2010.​

July 28
Anonymous Access in SharePoint and SharePoint Server

Do not read the following:

http://www.bposrocks.com/2010/01/sharepoint-online-2010-anonymous-access.html

Why? Because you're going to be frustrated.

Sorry - BPOS does not ROCK - and never will. Well, okay, maybe in 2010 it might roll, but well, okay - enough said.

SharePoint Anonymous Access - see my previous post tonight. This is not hard at all. I hope this helps...​

July 28
SharePoint Anonymous Access - Allowing Anonymous Access in SharePoint Server...

I just wanted to run this down briefly... I've read a ton of posts out there regarding anonymous access to your SharePoint site - and I learned something early on with the Microsoft SharePoint Product Team in 2006 - regarding anon access in 2007. It's very straight-forward, if you do it right from the outset. What do I mean???

Okay...

Create a web application... Notice something during that process? A little something about allowing anon access?

SPS WA AnonSettings.png

Notice the Allow Anonymous? This is not trivial - from the beginning - you need to tick this off.

NOTE: YOU CANNOT GO BACK... Or - if you think you can??? Good luck. I've only been doing this a little while, and I've learned quickly - TICK THIS OFF FIRST.

Okay - what next?

Create the web application.

Next - create your site collection. IMMEDIATELY AFTER creating the site collection - and I mean right away - go into the Site Actions --> Site Permissions - and enable Anonymous Access - see below:

SPS SitePerms.png

NOTE: We're working in SharePoint 2010 here - but it's not much different - it may look a little different - but the core objective and steps are the same between 2007 and 2010.

Once in the Site Permission - locate Anonymous Access:

SPS SitePermOptions.png

Click on Anonymous Access:

SPS SItePermsAnon.png

Notice we ticked off Entire web site.

Why? Well, it's very simple.

SharePoint will now set the default parent permissions to include anonymous access throughout everything you do.

Why is that great?

Because it's very simple to edit permissions on ANYTHING SharePoint - and break the parent permissions.

Why is that great?

Because YOU CANNOT GO BACK AND EASILY TELL SHAREPOINT TO ALLOW ANONYMOUS - without a fair amount of BS (sorry, that's plain English for bullshit and pain in the ass Googling to figure it out)

Sorry for the non-fluff listing here... I hope this helps.

Just remember... The entire web site is now very easily setup for anonymous access. When you set/place/publish content that you do NOT want to be open/anonymously available - simply Edit Permissions on whatever that content is, select Edit Parent Permissions - and break the inheritance, and VOILA! - you're free to lock it down.

This is 1050% easier than trying to go backwards and opening up your web site.

HTH's...​

July 07
.Net Directory Services Programming - C# - Part 2 - DirectoryEntry Binding and AD Properties

.Net Directory Services Programming – C# - Part 2

Topics Covered

Binding – How to connect to directory services and the flexibility of the bind process.

Properties – Review of the most commonly used AD properties, and a look at a few others.

 

Binding

You will remember in Part 1 that we provided a very simple code example of binding to AD and retrieving the object reference for the user object CN=Mike Hamilton. Here I want to review a little more in detail the binding process.

Binding The Default Server

Often called serverless binding, or binding to your root context, the following shows the simplest of binding calls:

            DirectoryEntry newEntry = new DirectoryEntry();

 

There is one major assumption here: You must be logged into the directory service (or the application you are executing must be) – otherwise the call will fail. This call will return the default server, or default root context – the server that validated your logging onto this network. I will review this in more detail shortly.

Passing The Directory (or ADsPath – we’ll review this in a later Part).

Here we pass the specific server and context that we want to bind to. Borrowing from Part 1 – you’ll remember how we bound to the specific user object.

DirectoryEntry userEntry = new DirectoryEntry(“LDAP://developer.hamilton.com/CN=Mike Hamilton,DC=developer,DC=Hamilton,DC=com”);

 

Here we specify the context of the bind. Note, this can be any server within our domain or even another domain within our directory forest.

Passing The Path and Credentials to Bind

Here we want to bind to a specific path, and provide credentials that validate we have the permission to do so. This is important as you delve into security in later Parts.

 

DirectoryEntry userEntry = new DirectoryEntry(“LDAP://developer.hamilton.com/CN=Mike Hamilton,DC=developer,DC=Hamilton,DC=com”, “<adminAccountName>”,”<adminPassword”);

Here you would replace adminAccountName and adminPassword with the actual credentials you want to user. Those can be the administrator account or any account that actually has permissions to perform the binding.

Passing The Path, Credentials, and Authentication Type

Not only can we bind with specific credentials, but we can also specify the authentication type we wish the directory service to use. For example:

 

DirectoryEntry userEntry = new DirectoryEntry(“LDAP://developer.hamilton.com/CN=Mike Hamilton,DC=developer,DC=Hamilton,DC=com”, “<adminAccountName>”,”<adminPassword”, AuthenticationTypes.Secure);

 

We will review the AuthenticationTypes when we review AuthenticationTypeEnum in our security review.

Passing a Native ADSI Object Reference

You will get more into this type of binding when you get into security. For now, I am presenting this for an example/reference for future reviews.

 

DirectoryEntry iAdsEntry = new DirectoryEntry(IADSObject);

As we move through the different presentations on this topic, we will touch on each of the bindings methods presented, offering examples / benefits of that method.

Properties in AD

I clarify here – AD (Active Directory). I should note that LDAP is LDAP across most directory providers. I emphasize AD here because some of the examples I will use are specific to AD insofar as the default behavior of a property or binding context. I will explain those when applicable, and will make a notation in the example conveying that it is an AD specific property or context.

 

As mentioned previously, AD (and most directory providers) has a hoard of properties that are available to the developer. Here I want to present some of the most common. What is important to note is the syntax to use when referencing a specific property. (You will remember from Part 1 that property names are spelled out using Camel-Case and single names are in lower-case only.)

 

When a user is initially created, that First Name, Last Name, Account Login Name – ever wondered what these were in AD? There are some givens when interacting with these properties – and I want to point those out first.

 

The Account Login Name is written to a few AD properties that cannot be modified via code. There are some things you can do with an AD user object, but one of the most frustrating is renaming or copying to another directory. You can move an object, and of course, delete one – but let’s move forward.

 

When the account is first created, the following properties are assigned the names you provide when creating the account (and this is assuming you created the account with a management tool / snap-in that facilitates user management – like AD Users & Computers (dsa.msc)):

 

  • First Name = givenName
  • Last Name = sn
  • Login Account Name = sAMAccountName, name, dn

If you wanted to retrieve these values using LDAP, and following our example in Part 1, we would do something like the following:

using System;

using System.DirectoryServices;

namespace DirectoryUtility

public class Main()

{

 

DirectoryEntry userEntry = new DirectoryEntry(“LDAP://developer.hamilton.com/CN=Mike Hamilton,OU=Developers,OU=Accounts,DC=developer,DC=hamilton,DC=com”);

 

string loginID = userEntry.Properties[“sAMAccountName”].Value.ToString();

 

string firstName = userEntry.Properties[“givenName”].Value.ToString();

 

string lastName = userEntry.Properties[“sn”].Value.ToString();

 

MessageBox.Show(“Login ID: “+loginID.ToString()+”\r\n Full Name: “+firstName.ToString()+” “+lastName.ToString(),”Results”);

}

Yes, this is a rough example, and it does not allow for exception handling. The objective was to show you how to reference just these fields.

Here I’ll list a few (I say a few lightly – there are dozens) properties that you will commonly use or need to use:

 

  • sAMAccountName – user ID of the account created (Note, when programmatically creating/adding users – you have control over this field – but not after the object has been added).
  • name – same value as the sAMAccountName property.
  • givenName – First Name of the user.
  • sn – or Sur Name – Last Name of the User
  • displayName – typically, the same as the name, and sAMAccountName
  • userPrincipalName – the same as name, sAMAccountName
  • co – Country
  • mail – single email address value (I’ll demonstrate how we can maintain multiple emails in another Part).
  • telephoneNumber – User’s phone number
  • description – A description of this account
  • userAccountControl – The enumerated property that we’ll use to manage the user’s account – access, password change, locked, and others.
  • wWWHomePage – User’s default homepage –optional.
  • parent – Parent owner object. For example, the name of the OU the user account is in.
  • cn – Cononical – or Common Name – usually the combination of givenName + sn (NOTE: If you have migrated from another system, like NT4 to AD 2000 – this value is the same as the name, sAMAccountName, and displayName – by default, and it cannot be changed)

 

How to list and view all properties available with LDAP?

The following code snippet shows how to step through the properties associated with a DirectoryEntry object. (NOTE: This code assumes there is a listbox named propertiesListBox on a form that we can add the properties to.)

 

private void PopulateProperties(DirectoryEntry userEntry)

{

 

if (userEntry!=null)

 

{

 

propertiesListBox.Clear();

 

foreach (string propertyName in userEntry.Properties.PropertyNames)

 

            propertiesListBox.Items.Add(propertyName);

}}

SUMMARY

I realize that a lot of this is not meat and potatoes yet, but those Parts are coming. I wanted to take the time to introduce some fundamentals because I realize there are a lot of developers out there that have not been introduced to DirectoryServices, and there is a lot to learn!

 

In our next couple of Parts we are going to look at the DirectorySearcher, the other major class in the DirectoryServices namespace, and then we’re going to look at a few basic examples of user / object management. We will start our own solution that will end up in a complete application that will allow you to connect to a directory service, list accounts and objects in that service, add accounts, add groups, and add other specific objects.

July 05
July 4th, 2010 - New York City - my 72 hour day...

Okay - as I scramble to blow out one of the largest SharePoint 2010 Mutli-Tenant Farms - I just realized - it's way past dinner time (So I'm sitting in the Canal Bar on 3rd Ave. in Brooklyn) and I'm not just starving - I'm seeing spots and need a break.

Fourth of July in NYC - well... I'll be honest with you - at 100 degrees, and slated to be 1,000 fee high - so notwithstanding it was on the West side of Manhattan - it would be seen all around the southern tip of Manhattan - right? Well, wrong!

So - I did not see anything spectacular... I am about 24 hours away from finishing my project work; but I'm about 72 hours into this day alone -and I'm looking forward to a break.

So - 72 hours in Europe... Home and working for 4 days; then 72 hours of camping, then home and working for 4 days - then - finally - back to the big City - NYC.

Reflections of my 72 hour day... And how the next 72 hour days look.

Have a fantastic week everyone... As a verteran of many engagements - I appreciate this one day of the year - and I'm thankful I had 72 hours to enjoy it. :)​

July 02
Crossing the Divide - SharePoint Server - 2003, 2007, 2010

I was not a savvy SharePoint 2003 Portal architect; no, not at all. I was a Solution Architect in the enterprise space - focusing on integrating enterprise legacy systems - with today's technology.

Building the Digital Divide

If you have ever spent 2 or 3 weeks writing SNA-level code for a System 390 from IBM - trying to tie this back to a Paradox 4.x relational database that you blew out based on the ISAM file structure from the 390 and your understanding of a real relational model from James Miller; and you ended up writing all of the SNA protocal components so the communication from the 390 came down to your i286 PC-LAN - then you have a feeling for where I started.

Late Nights - Bright Lights...

As many of you have - I too, spent my decades in a week - writing those impossible interfaces that made us think we were gods. Hell, we brought the ISAM flat-file piece of crap - albeit super powerful - data solutions - down to the PC-LAN.

I loved Paradox 3/4; I craved Turbo Pascal 5.x and OOP development. MAN - those were the days!!!

Enter - today...

Nothing new under the Sun...

As I design a fairly complex and not a little time-consuming - solution architecture for a basic Enterprise Portal solution - I am mindful of a few lessons in life.

There is nothing new under the sun. I remember this from a very young age - and as I ponder the fantastic time I'm having with SharePoint 2010 - I am ever mindful - this isn't new. Or is it?

No - it's not - but it's sure as hell a great facelift to the old. :)

I am not a little humbled by this opportunity to introduce you to SharePoint - 2010-style. This is so fantastic, so complex, so simple, so comprehensive - so capable - that nothing is going to come close to Microsoft. Yes, it'll take a couple more years - but trust me - SharePoint is going to take out all of you 2.5 to 7.5 million dollar players. It's going to slaughter you - and it's going to be a blast to watch this happen.

Get into SharePoint; buy a book; learn the vernacular; brave the new waters for document management / record's management solutions.

When you're beat down - exhausted, but champing at the bit to take this further... Please ping me - I cannot wait to share more. This stuff absolutely ROCKS.

Have a great evening...​

July 01
WOW - Welcome to Blogging in a fantastic way!!! SharePoint 2010!!!

I have blogged for 9 years now on many topics. Critical to me was to find a blog engine for ASP.Net - I did not like - AT ALL - the PHP Joomla! solution; I basically hated anything that was not .Net.

Sub-Text/.TEXT - Stepping Away...

As thousands of you know - I maintained a blog on the http://www.geekswithblogs.com/mhamilton site for many years; I stood up a complete .TEXT and later SubText blog for multiple clients of Sclera Hosting - and I continued my own blog on this URL, trying to carry SubText into the IIS 7 stack, and even dabbling in the BlogEngine.NET space.

Stepping Up - Stepping Out...

Today, after 4 solid years as a Software Architect, Solutions Architect, and SharePoint Server Enterprise Architect - I find SharePoint Server 2010 - whether Foundation, Standard or Enterprise - trust me - I find this the absolute most fantastic Flagship Product that Microsoft has produced in almost 3 decades.

This is not fancy - it's not a blog engine that I can brag about like .TEXT or SubText - what it is - is SharePoint. My single most, solitary focus - in the past 4 years - and SharePoint is kicking ass and taking names... And then some!!!!

 

 

m.j. hamilton, sr....  m.j. hamilton, sr....

 
 Michael J. Hamilton, Srl - Another Geek in Need...

Thank you for visiting... If you want to see a topic not yet covered, please let me know.

My focus is SharePoint, BizTalk, Commerce Server, ASP.Net Development - and then - SharePoint. Sorry - I'm a bit partial to SharePoint :)