Author Archives: Tejinder Rai

SharePoint Server 2010: Service Application Error

I recently came across an issue where I was unable to manage the SharePoint Service Applications within Central Administration. The error I received was as follows:

“The specified user or domain group was not found”

This symptom was caused by a user account which was removed from Active Directory, that was assigned to a Managed Metadata Service Application. The account in question was assigned administrator rights in the service application. I worked woth Microsoft to remedy the issue in my case after performing some initial steps to determine which service application was causing the problem.

To determine the problem, I first had to find out which service application was causing the message to appear. I followed these steps:

1 – Opened IIS Manager

2 – Navigated to Sites -> SharePoint Web Services

3 – Each Service application has a guid and in the basic properties, you can review the path of the web service to identify the service.

4 – The SharePoint diagnostic logs should correlate to the application ID with the error in question, and so should the application event logs.

5 – When you determine which service application is causing the issue, you can run the following SQL statement against your SharePoint configuration database (I used %Metadata%, as I was aware it was the Metadata Service application):

SELECT [Name], [Version], CAST([Properties] as xml)

From [SharePoint_Config].[dbo].[Objects] with (nolock)

Where [Name] LIKE ‘%Metadata%’

6) Click the properties column XML result and review the following sections:

<sFld type=”Stringname=m_SerializedAcl>

7 – There should be some identities associated with the service application.

8 – Check each Identity Name in Active Directory to determine which one was removed.

8 – In some cases you should be able to re-create the account in Active Directory, since the service application is looking for a principle name, and not a SID. Ensure you synchronize your Active Directory Domain.

9) You should now be able to navigate to the service applications (providing the particular service application is looking for a principle name in Active Directory), and then remove the account from the service application permissions.

10) If the above solution does not work, you can create a new account, with a different name, and try the following stsadm command:

stsadm -o migrateuser -oldlogin {the domain\old users login name that was removed} -newlogin {the domain\new AD account} -ignoresidhistory

e.g. stsadm -o migrateuser -oldlogin corp\deleteduser -newlogin corp\newuser -ignoresidhistory

You can also use the SharePoint Management Shell if you prefer and use the Move-SPUser command.

Should the above remedy not work in your situation, I highly recommend logging your particular case with Microsoft Premier Support to resolve your issue.

I also highly recommend not to make any direct changes to the SharePoint configuration database via custom code or SQL statements, in order to keep a  supported SharePoint environment.

Creating and deploying your first Windows Azure Project

I’ve created a video which demonstrates how to create your first Microsoft Windows Azure project in Visual Studio 2010. The demonstration covers the folowing training content.

A walk through creating a Microsoft Windows Azure project in Microsoft Visual Studio 2010. A review of the Web Role settings is demonstrated, with some changes to the page markup for the project home page. The final part of this demo walks you through creating a Hosted Service through the Windows Azure Management Portal, creating  and finally uploading your Windows Azure package.

Visual Studio 2010 Training – Creating your first Visual WebPart

I’ve created a video to demonstrate how to create a SharePoint 2010 solution with a Visual WebPart in Visual Studio 2010.

The video covers the following training:

1) Creating a SharePoint 2010 Project
2) Creating a Visual Web Part
3) Adding WebPart Controls
4) Adding the WebPart to a Page
5) Enabling some Basic Ajax Extensions in the Web Part

I welcome your feedback, and if you would like to see additional training videos on SharePoint Development I’ll do my best to accommodate your requirements.

SharePoint 2010 Training – Creating a Custom Content Type

I have recently created a training video which I would like to share, on how to create a custom content type in Microsoft SharePoint Server 2010. The video covers the following training:

1) Creating a SharePoint Site
2) Creating a Car Manufacturers List
3) Creating a Car List
4) Creating a Content Type
5) Assigning the Content type to the Car List

I welcome your feedback and I will start to add more training videos to this blog in the future.

SharePoint 2010: Writing User Profile Properties Programatically

Recently I’ve been working on an application which writes custom properties to the User Profile Manager. If you try write profile properties, you may get an error stating that you must allow unsafe updates. The main issue here is the HttpContext needs to be null, but we must store the HttpContext for the session, prior to updating the changes to the user profile manager, and then set the HttpContext back to the original context.

The C# code below enables you to write a user profile property without recieving the error:

currentUser = SPContext.Current.Web.CurrentUser.ToString().Substring(SPContext.Current.Web.CurrentUser.ToString().IndexOf(“\\”) + 1);

SPSite spSite = SPContext.Current.Site;

SPSecurity.RunWithElevatedPrivileges(delegate()

{

System.Web.

HttpContext currentContext = System.Web.HttpContext.Current;System.Web.

HttpContext.Current = null;

try

{

// Set the context of the site to the SPSite site

SPServiceContext context = SPServiceContext.GetContext(spSite);

//Create and instance of the UserProfileManager

UserProfileManager profileManager = newUserProfileManager(context);

UserProfile userProfile = profileManager.GetUserProfile(userName);

UserProfile[propertyName].Value = propertyValue;

userProfile.Commit();

}

catch (SPException ex)

{

}

finally

{

System.Web.HttpContext.Current = currentContext;

}

});

Cloud Migration Considerations

For most companies wanting to migrate their applications or benefit from Cloud Computing models, it can be a no-brainer for specific types of applications which have enough maturity and confidence within the computing industry. In recent years Cloud Computing has become one of the hot topics for CIO’s, who clearly see the benefit and value of making strategic decisions to expand services with a on-demand infrastructure or set of services.

If you choose SaaS or PaaS, the multi-tenant model provided by Cloud vendors is already a proven and a solid platform where they can securely host information for your business. For applications such as email, web site hosting, CRM, online meetings, time management, storage and application virtualization instances, this can make clear sense as a viable processing platform for businesses.

So what are the obstacles or issues that might hinder such projects?

Whilst the obstacles may likely vary from organization to organization, there are a few common ones all companies have to deal with. Ensure you consider, or at least include the following list as part of your design/requirements planning process.

1 – How to integrate the internal authentication systems and domain
infrastructure (e.g. Microsoft Active Directory) with the Cloud infrastructure? There are some listed options here:

2 – User account provisioning and decommissioning:  Ideally companies should be setting up Single Sign-On to control access to internal and Cloud services to manage a simple and seamless process of user account provisioning. Employees that leave your company shouldn’t still have an account to logon to your systems, or any Cloud applications that were provisioned during their service with your company.

3 – Internet Connectivity: Ensuring you have reliable, redundant internet connections and bandwidth management in place on premise. Unfortunately we cannot have QoS over the internet at this moment, but there might be optimizations that can be managed on the internal network down to the desktop.

4 – Integration: Integrating the internal systems data and information with the Cloud application.  The possibility here might be Cloudstreaming the information securely.

5 – Legal: Are there any legal issues related to having your company data and information on a server hosted in a different country, or on a multi-tenant system. For example, there might be an issue with local laws prohibiting specific types of information being stored across certain borders, or local laws of where you data is held may well be an issue too. Security awareness with the privacy of data is a major concern here.

6 -Web Services: Connectivity might well be an issue for some applications, depending on the type of integration requirements. Secure web services should help in this area, but for large quantities of data it’s important to optimize and test  such requirements.

7 – Governance:  How is the information managed, what restrictive roles can be implemented on the Cloud platform, and are these enough to suit your business requirements. Are there any specific audit standards which need to be followed and are these available as part of the service.

8 – Backups and recovery vs risks: How important is the information to your company, do you require a local streamed backup of the data. Are you content with the options the Cloud vendor offers as part of the service. Should additional provisions be made to protect the data before the event of a disaster.

9 – Large files and large queries: During a pilot, it’s not enough to test a Cloud system and determine the performance capabilities with a subset of your data. The last thing you want to happen is to go live and realize that the sub set data  performance test was lightning fast, but the full data set resulted in performance issues.

10 – Service Level Agreements (SLA’s): It’s important to understand the SLA’s behind the service and what compensation is offered by the Cloud Vendor. If your company is reliant on the service being available 24×7, then receiving credits in service hours may not be enough coverage for your business, especially if you will lose a significant amount of revenue from a service outage.

11 – Service decommissioning:  Some Cloud vendors state that it is the responsibility of the customer to remove their data from the service prior to the service being decommissioned. For whatever reason, its important to understand what potential issues could arise from decommissioning your information from a service, and what the rules are around the contracts.

12 – Data Migration: If you decide to bring a service to an end, what will be the migration strategy from Cloud-to-Cloud or Cloud-back-to-On-Premise.

13 – e-Discovery: Under certain regulations, companies are required to provide various accounting and transactional information to a third-party. If this is a concern, ensure that the Cloud vendor can provide e-Discovery facilities which work in a timely manner. Whilst the Cloud architecture is completely multi-tenant orientated, it is important to understand, it may be difficult to perform forensic inspections, should any situations of this nature arise.

14 – Data ownership: Companies must ensure they protect themselves over the information they store in the Cloud. Most importantly, intellectual property rights and trade secrets is the concern here. Unlawful information leakage could cause some issues related to this subject.

15 – Training: Whilst most people are use to using major desktop applications, there is a distinct shift in the training required to facilitate a Cloud migration. Ensure that your staff have sufficient knowledge of the new system and changes in terminology prior to initiating the new service.

I’ve touched on a number of different areas for consideration. Every Cloud vendor has a different architecture, a different set of rules and different options available as part of their services. Making a decision to move an application to the Cloud should involve the following teams in your organization:

  • Senior Executives
  • IT and Information Security
  • Infrastructure Teams
  • Application Specialists
  • Helpdesk/Service Desk
  • Training Departments
  • Legal Team
  • Human Resources
  • Business Application Process Owners

Windows 8: New Hyper-V 3.0 Features

Microsoft recently announced at the WorldWide Partner Conference (WPC 2011), a number of new exciting features in Windows 8. Windows 8 will be packed with over 100 new features. Some of key Hyper-V 3.0 features will include the following enhancements:

Memory

Network

  • Router Guard
  • DHCP Guard

 Storage

  • New VHDX format
  • Support for more than 2TB VHD’s – up to 16TB !
  • Virtual Fibre Channel Adapter
  • Storage Resource Pools

Processor

  • Support for more than 4 Virtual CPU’s

Hyper-V Replica

  • Ability to replicate Hyper-V Virtual Machines asynchronously within the same site or over to another physical site over the wire. The options are endless, and the possibility to create replicas in the Cloud.
  • Hyper-V Replica works with any hardware vendor, storage vendor and any nework vendor.
  • Microsoft’s next steps may include Hyper-V Replica options with the Windows Azure Platform

Windows 8 Client

  • There are rumours that Hyper-V 3.0 may also be built into the Windows 8 client. If this is the case, this is will be an ideal integrator for software development environments.