13

Errors were encountered during the configuration of the Search Service Application.

I have encountered the following exception after configuring Domain Controller on my stand alone SharePoint 2013 Azure VM.

The actual exceptions is “Windows NT user or group ‘SDsdakoju’ not found. Check the name again. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.”

Root Cause:
Since I did not start off with a Domain Controller, all my SQL accounts were in “machinenameusername” format, so the SQL server Logins did not get the updated username format “domainnameusername” 

Following is the screen capture of the exception

Windows NT user or group not found

Windows NT user or group not found

Resolution:

I have modified the user accounts to “domainname/username” . I set my domain as ‘SD’. Please see below Before-After screen captures. Everything else is self-explanatory.

Errors were encountered during the configuration of the Search Service Application

Screen capture showing before and after changes to the SQL Logins

Hope this helps to resolve your issue.

0

The SDDL string contains an invalid sid or a sid that cannot be translated

I have encountered this exception while I was trying to create ‘Search Service Application‘ in SharePoint 2013.

Surprisingly many encountered this particular exception  at completely different instances /scenarios.

For instance, some faced while running through SharePoint Configuration Wizard steps and some while creating Service Applications. Based on my understanding this is commonly encountered on STANDALONE instances, primarily set up for development. You might NOT face this issue at an enterprise level SharePoint farm, you would get to know why, by the end of this blog.

Following are two common instances along with resolution.

  1. Running the SharePoint Configuration Wizard[1].

    I have set up my whole SharePoint Farm via PowerShell scripts and did not encounter this. But following solution from Microsoft Technet, worked perfect for many. Hope this resolves your issue.

SharePoint 2013: The SDDL string contains an invalid sid or a sid that cannot be translated

SharePoint 2013: The SDDL string contains an invalid sid or a sid that cannot be translated

 

2. Creating Service Applications

Following is screen capture of the error message

SharePoint 2013: The SDDL string contains an invalid sid or a sid that cannot be translated

Resolution: Set up your Domain Controller

When I spun up SharePoint 2013 on my Azure VM, I did not configure my Domain Controller which appears to be prerequisite for certain functionality to work with in SharePoint 2013.

If you closely look at the portion of the exception in the above screen capture, you will find “Invalid sid or a sid that cannot be translated“.  These issues are encountered when Domain Controller is not configured correctly.

A security identifier (SID) is a unique value of variable length used to identify a trustee. Each account has a unique SID issued by an authority, such as a Windows domain controller, and stored in a security database. Each time a user logs on, the system retrieves the SID for that user from the database and places it in the access token for that user. The system uses the SID in the access token to identify the user in all subsequent interactions with Windows security. [2]

Finally after exhaustive research and understanding, I resolved my issue by creating the domain controller. Please following instructions at Windows Server 2012: Set Up your First Domain Controller (step-by-step) to set up your domain controller.

After this is complete my Central Admin and all my web applications were working fine.

But when I started continuing to create my Search Service Application, I got hit by another minor error. Since I did not start off with Domain Controller, all my accounts were in “MachineNameusername” format, so the SQL server still got the old username, so modified it to “DomainNameusername” and everything worked seamlessly.

Windows NT user or group not found

Windows NT user or group not found

I was so glad to see this working, I was working on this issue stubbornly, sacrificing super bowl 2015. At least it payed off!

References:

[1] SharePoint 2013: The SDDL string contains an invalid sid or a sid that cannot be translated

[2] Security Identifiers

0

Building you first cloud hosted app on Office 365 – Using Napa

I was eavesdropping on one of the so called ‘Technical Elevator Conversations’

I heard “NAPA”.

Did some Googling, sorry some Binging as well and started to assimilate some of the information available on MSDN and other blogs. Fell in love instantly! What’s fascinating about this is, you could develop & deploy  from the scratch a complete ‘Cloud hosted App’ via browser and mere JavaScript. You would be surprised that it took less than ten minutes for the whole thing.

I thought to keep it simple and started of creating a simple temperature conversion tool, which run on simple JavaScript and some lines of  HTML. After all, the whole idea is to use NAPA and create an app. So I quickly borrowed few lines of code from W3C schools and used it in my app.

Note: There are so many blogs and MSDN articles out there explaining Napa in great detail. I just made an attempt to keep it as simple as possible, just to give you a glimpse of what Napa is all about and get some first introduction to it.

Following is what I did

  1. Create or use existing SharePoint 2013 site on Office 365 portal
    Note: If you do not have an Office 365 account you could easily activate one with you MSDN subscription. If you do not have an MSDN subscription, you may sign up for Office 365 for home to start and exploring some of the features.
  2. Once you have your SharePoint 2013 site up and running you would navigate to Site Contents and click ‘add an app’ as highlighted below
    Snap1
  3. Go to SharePoint Store by click the link as highlighted below.Snap2
  4. Search for ‘Napa’ and you should find an app ‘Napa Office 365 Development Tools’. Go ahead and install it.Snap3
  5. Once the install is finished you should find in your ‘Site Contents’. You may click on it to start using ‘Napa’ or by clicking ‘Build an app’ option available on the home screen. Please see below, for both of these options.
    Option 1:
    Snap4 Option 2:Snap5
  6. Kick off the app creating by clicking ‘Add New Project’
    Snap6
  7. You will be prompted with options to create a different kind of app, choose ‘App for SharePoint’ and give your app a name.Snap7
  8. Once you completed the above step, you are now officially on ‘Napa’ and can start coding. As I mentioned in the beginning, I borrowed the following code from W3C schools which helps with temperature conversions from Celsius to Fahrenheit and vice-versa.Snap8
  9. That is you are almost done, click Publish icon as highlighted in the screen capture. This should prepare the package, deploy and launch the app.
    Snap9
  10. This is how the ‘Temperature Converter’ app looks like. Nothing fancy two text boxes and few lines of JavaScript.Snap10
  11. This app should now show up in your Site Contents, please see highlighted.Snap11
  12. Congratulate your self for building the first cloud hosted app and get a brew.
0

Set up the development environment for SharePoint 2013 on Azure

Setting up development environment for SharePoint is easy, if you have right hardware and software and basic understanding of the configuration.

For SharePoint 2007, it was simple, the hardware requirements were basic and I managed to get it working with a laptop with simple configuration. SharePoint 2013 now supports ‘App’ development and other new features that require a lot of additional RAM and a lot more hardware. So I decided NOT TO upgrade my hardware, instead make use of Azure privileges that come with my MSDN subscription.

This blog post will guide you on how to set up your developer instance on Azure and unfortunately, does not cover configuring your developer VM step by step. If you are interested to build your VM from the scratch, please follow SharePoint 2013 Virtual Machine Set up Guide (Version 3.0) from Critical Path Training.

Note: This post assumes that you already have an active subscription with ‘Microsoft Azure’. If you don’t have one, you can sign up for a trial account or if you have an active ‘MSDN Subscription’ you can enjoy a recurring $150 credit per month that ships with your subscription. This is a great way to start and I am using my subscription for all my Azure development. You may visit  Microsoft Azure Free Trial: Try Azure | Azure Free Trial

Note: All the screen captures of Azure portal are valid only during the time of writing this blog post i.e. January 2015.  Microsoft is very aggressive not only adding new features to the portal but enhancing its user experience.

Step 1: Navigate to Windows Azure Management Portal

Step 2: Click the    Azure New Icon    icon at the bottom of the screen.

Step 3: You should see the following screen with an option to add a Virtual Machine from the Gallery

Select VM from Azure Gallery

Select VM from Azure Gallery

Step 4:  Choose the ‘Image’ of your choice, following is what I have chosen in the portal

Snap12

Step 5: Perform the following actions.

  1. Appropriate Virtual Machine Name
  2. Select  ‘TIER’ as ‘Basic’
    1. The Basic tier provides an economical option for dev/test workloads, and other applications that don’t require load-balancing, auto-scaling, or memory-intensive virtual machines. The Standard tier is recommended option for all production workloads.
  3. Choose the ‘SIZE’ as A4
    1. Make sure you choose from Basic
      Snap15
    2. Below high-lighted is the VM configuration I have chosen.
      Azure Virtual Machine Pricing
  4. Provide new Username and Password.

Step 6: Choose appropriate ‘REGION/AFFINITY GROUP’ 

Snap17

Step 7:  Finish the configuration

Snap18

 Step 8: Make sure the VM is up and running

Azure VM is running

Step 9: Download RDP file and connect to the VM
Once the VM status is ‘Running’  you can ‘CONNECT’ using the following highlighted option. Clicking on ‘CONNECT’ will download the ‘RDP’ file, double click and following the screen and log on to the VM. You should be using the same ‘Username’ and ‘Password’ you have used while creating the VM on Azure Portal

Connect to Azure VM

Step 9: Run the PowerShell Scripts 

The VM will be shipped along with few PowerShell Scripts that you need to run, to install and configure SharePoint environment, SQL Server and all the other required software. Trust me! It can’t get simpler than this, running one script spun up the whole SharePoint environment! Neat!

You will find the below highlighted shortcut on the desktop,  where you will find the script ‘ConfigureSharePointFarm.psl’, Run it!

Snap25Once you ran the PowerShell script you will be asked for the ‘localSPFarmAccountName’
and ‘localSPFarmAccountPassword’, enter these and you are all set!

Snap29

Step 10: Finally, you are ready. Remember to smile 🙂

Search for ‘Central’ in the installed apps on the server and you should see the gorgeous Central Admin icon, pin it to the desktop. You are all set, Happy Programming!

Snap30

Note: Remember to turn the VM off, if you are not using it. Remember, you will be charged for every minute for you VM to be available  and running.

0

What debuted in SharePoint 2010 and what happened in 2013?

This post will help you understand new features added to SharePoint 2010 and also its new first-class tools, that help developers speed up their development, debugging and deployment process. Since 2013 is already out and with companies rapidly adopting it, it makes sense at this point to mention about the enhancements to each of them in 2013.

1. Sandbox Solutions and Resource Governors:

Quick Overview:
Sandbox solutions is a new concept for 2010. A sandbox solutions run in a restricted execution environment that allows programs to access only certain resources which would consequently contains/restricts bugs to that Sandboxed environment only with out affecting the rest of the SharePoint farm.

One good examples would be Sandbox solutions cannot utilize certain local or network resources, and  may not have access content outside of the site collection they are located in [1]. To get an overview of when to use Sandbox solutions with 2010 you can read my post- Sandbox Solutions – SharePoint 2010

What changed in 2013?
Things changed in SharePoint 2013, Microsoft do not actively  encourage adopting Sandbox solutions as first design choice. These will be still available for backward compatibility only. Microsoft encourages to use ‘Apps‘ instead and leverage their new ‘Apps Model’.

2.Client Object Model

Quick Overview:
With SharePoint 2007, there were limited options to interact with SharePoint. The SharePoint object model is available only for server side applications only. Which means that your code has to be hosted and running on one of the SharePoint servers. There are very limited options for Client applications to interact with SharePoint data.

The only option available in SP 2007  for client applications is to use the web services API. This always worked great on server side code where the service metadata is downloaded and developers could use them seamlessly. But client-side technologies like JavaScript did not fit well with this set up.

So ‘Client Object Model’ was introduced to help develop client side applications that can leverage REST. Also WPF(Windows Presentation Foundation) or Silverlight  also needed something like this to build faster and bandwidth friendly apps.

Client Object Model comes in two flavors

a. Support for .net based clients like WPF or Silverlight apps.
These applications would typically add reference to the following dlls and  use appropriate classes/ methods/ objects to develop applications.
Microsoft.SharePoint.Client.dll
Microsoft.SharePoint.Client.Runtime.dll
Microsoft.SharPoint.Client.Silverlight.dll
b. Support for Javascript based clients
These application would typically reference
SP.js
SP.Core.js
SP.Ribbon.js
SP.Runtime.js.

All of these files are also have debug versions (SP.Debug.js) available for debugging purposes, but these files are larger in size and should not be used on production.

So effectively use them in development environment, by setting SharePoint deployment to use debug-versions  ‘<deployment retail=”false”>‘ under ‘System.web’ element.

What changed in 2013?
All the Client object api calls in 2010 are made via a WCF entry point which is not directly accessible. Proxies have to be used build via .NET code or JavaScript libraries. There were harder to write, there was no compile time checking and less intellisense support.

These are now lot improved in 2013

– Fully leverage REST based API calls that use basic HTTP for CRUD operations

– Client Object model now supports oData protocol. OData is a mainstream data access api for HTTP based clients  for creating and consuming data APIs. OData builds on core relies on protocols like HTTP and commonly accepted methodologies like REST.

– Extended API to support more server-side functionalities like User Profiles, Search, Taxonomy, Search, Feeds, Publishing, Sharing, Workflow, E-Discovery, IRM, Analytics, Business Data etc.

– CSOM also supports Windows Phone Applications

– **Deprecated ‘ListData.svc’, but still available for backward compatibility for older applications. ‘Client.svc’ is introduced with more endpoints catering for more functionality.

More on the following. Keep Reading 🙂

3. Business Connectivity Services

4. List Enhancements

5. Enhancements to Visual Studio

6. Web Solution Packages

7.  Developer Dashboard

8. SilverLight integration

9. Web 2.0 Protocols and New Standards

10. LINQ Enhancements

11. SharePoint Designer Enhancements

12. Visio, Access and InfoPath Enhancements

References:

1. MSDN: Sandbox Solutions Overview (SharePoint Server 2010)

0

Architectural Enhancements in SharePoint 2013

The evolution of SharePoint 2010 has been revolutionary, there were so many new features, capabilities, development changes and architectural enhancements to 2010 when compared with 2007. So with 2013 released we should not be expecting a completely new architecture as most of its architecture is inherited from 2010. Microsoft has always channeled its efforts in making SharePoint a self-service product, heavily encouraging on no-code solutions, using browser and office applications for business needs. So 2013 has some architectural enhancements to support the above and also making SharePoint a better product. This blog post with summarize major enhancements and the related posts would explain each in detail.

  •  Database improvements – Contributes to faster & efficient data retrieval
    As Microsoft keeps improving SQL Server version by version, adding more features/   functionality, SharePoint can leverage such enhancements and make it more even powerful in terms of data storage, search and retrieval.
    The following can be treated as highlights of the database enhancements
    1. Shredded Storage
    As the name indicates files are shredded and stored in the content database. Once the user requests a file all the bits and pieces are combined and shown as a single file. So when a file has multiple versions, only the changes on that file are saved to the content database instead of the entire file being saved repeatedly. So no more storing of the entire file, version after version, as it has always been in SharePoint 2007/2010. This would be faster, reduces the amount of space occupied in the content database and also saves on network bandwidth.
    2. The database is Microsoft SQL Azure compliant
    If you wish to host SharePoint 2013 on the cloud the SQL Server database is all set for this. This is quite important to those organization which plan to host their sites on cloud as the new features include Updates to throttling behavior, New event table for trouble shooting, Recursive triggers are supported etc.
    3. Cleaned up databases – Both config and content databases
    Redundant and unused tables are removed and this would clearly enhance the database performance when queried.
    4. Better design
    The SQL Server has an improved schema to support ‘Shredded Storage’ which reduces the input and output operations while using document libraries.
  • Request Management
    SharePoint 2013 ships with request management which is designed for ‘Throttling & Routing’, ‘Prioritization’ and ‘Load Balancing’. Please DO NOT consider this as a replacement of ‘Load Balancer’ or ‘Traffic Mangers’ and as a matter of fact your organization MAY NOT require this at all. If you chose to use this make sure you understand the capabilities and if that’s the right choice for the problem.  ‘Request Management’ is just a service instance that run on WFEs (Web Front End server which runs SharePoint Foundation Web Application Service (SPFWA)). This service understands SharePoint and can route requests at the ‘Web Application’ level and this is the key advantage of Request Management. 
  • Workflow enhancements
     SharePoint Server 2013 brings a major advancement to workflow: enterprise features such as fully declarative authoring, REST and Service Bus messaging, elastic scalability, and managed service reliability.SharePoint Server 2013 can use a new workflow service built on the Windows Workflow Foundation components of the .NET Framework 4.5. This new service is called Workflow Manager and it is designed to play a central role in the enterprise. More on this can be found at What’s new in workflow in SharePoint Server 2013>>
  • Cache Service improvements
    The cache service improvements plays an important factor in building high-performance and scalable applications. In SharePoint 2010 each server has its own cache which is used only if the request comes to that server and so when a request come to a different server the whole information has to be recreated. But SharePoint 2013 introduces Distributed Cache Service (DCS) which is based on the Windows Server AppFabric 1.1. AppFabric Caching stores serialized managed objects in a cache cluster which can be used by all the server to serve the request. This pooled memory is presented to cache clients as a single source of caching memory.
  • Minimal Download Strategy
    In SharePoint 2010, when a user requests a page or makes changes to it, the whole page is downloaded. But in SharePoint 2013 only changed portions of the page are downloaded using Ajax Delta control which is added to the head section of the master page.
  • The Theme Engine
    Themes in SharePoint 2013 are HTML5 compatible and the format is not based on Office Open XML format as in SharePoint 2010. So in SharePoint 2010 you can create new themes using office applications which you can no longer do it in 2013,but you would use browser to preview and publish new themes.
  • Mobile Device support in SharePoint 2013
    SharePoint 2013 content is created and delivered based of location aware technique which detects the user-agent and servers the content. So lists are location aware and optimized for mobile delivery. So there are multiple views for enhanced mobile experiences such as Contemporary view (for HTML5 supported browsers), Classic View (for backward compatibility for SharePoint 2010), Full Screen view (for full desktop view on mobile device).
  • Deprecated browser support and more supported browser
    Internet explorer 6 and 7 are still supported for content rendering but cannot be used for content authoring, so WCM authors can use IE 8 & above for full support. Other browsers like Chrome, Mozilla FireFox, Apple Safari offer limited support.
  • New, deprecated  and modified/improved service applications
    This sections provides very brief explanation of the service applications, detailed description is out of scope of this post, but will be covered in later with in SharePoint 2013 blogs
    1. )New service applications
    The following service applications are added to SharePoint 2013
    – Machine Translation
    – Work Management
    – App Management.
    2.) Modified/improved Service Applications
    The following applications are improved in 2013
    – SSA (Search Service Application)
    – MMS (Managed Meta Data Service Application),
    – BCS (Business Connectivity Services),
    – User Profile Service application
    – Microsoft SharePoint Foundation Subscription Settings Service
    – Access Service Application  which is s
    plit into 2 services.
    a.) ‘Access Services 2010
    b.) ‘Access Services‘ for 2013 only.
     3.) Deprecated Service Applications
    The following service application are not totally deprecated but served as a different way such a isolating as a separate product or service on server etc.
    – ‘Office Web Apps’ is no longer a service applications and is packaged as a separate service product.
    – ‘Web Analytics’ is no longer a service application but is part and parcel of SharePoint search engine.
    – ‘Power Point Automation Service’ is no longer a service applications but can be started using ‘Service On Server’ page in SharePoint.
  • Web Application and Site Collection improvements
    Microsoft now recommends using Claims based authentication by default and also use Hosted Named Site Collections. With HNSC each site collections can be accessed using its own top-level URL even though they originate from the same content database. 
  • SharePoint 2013 development changes
    1. ) SharePoint Apps – Any hosting services to run and deploy your app
    This is something new to SharePoint and also its developer community. The concept is old and is similar to how we have apps hosted in Android market, Microsoft or Apple’s app store. They are all apps & everything in there is an app. This is direction the ‘Apps for SharePoint’ is going even faster. Apps are easier to integrate with cloud services,  Office suite and has even better platform for distribution.  In spite of all this complex technical evolution of apps, as always Microsoft provided easier options to create apps as web applications using HTML, JavaScript or using  server side programming languages like C#, VB.NET or PHP. Now the developer
    2.) Extended Client-Object Model
    This would enable custom code can be created by using a similar apps model
    3.) Alternative choice to  Sandbox solution
    Microsoft still continues to support farm solutions, but there are not major enhancements to Sandbox solutions and recommends using App instead of Sandbox solution. Now the choice would be either Farm solution or App instead of Farm solution or a Sandbox solution.Details explanation to each of the enhancements would be covered in other articles under SharePoint 2013 category.

References:

  • TechNet Microsoft
  • Book – Exploring Microsoft SharePoint 2013 by Penelope Coventry
    – This is one of the best technical books I have ever read, the author has outstanding knowledge in the subject. I totally recommend reading this book. I would give total credit, even this blog post for the author