Music – Action Beat Sequence
This is a simple beat sequence created using the Native Instrument’s Action Strikes.
Bits & Pieces – A blog by Kannan Balasubramanian
This is a simple beat sequence created using the Native Instrument’s Action Strikes.
When I was trying to register Workflow Service with SharePoint 2013 Server, I was getting error “The root of the certificate chain is not a trusted root authority”.
The reason for this error is while registering the service we point to workflow site with https as shown below, this site has a certificate which the SharePoint server doesn’t trust.
Register-SPWorkflowService –SPSite “http://spapp/sites/dev/” –WorkflowHostUri “https://wfserver:12290/” –AllowOAuthHttp
There are 2 things to check.
1. Use FQD. Hence instead of using machine name for WorkflowHostUri, use full domain name, like https://wfserver.domain.com:12290/
2. Make sure the SharePoint Server trusts the certificate of Workflow site. For that do the following
Source:
Microsoft MSDN Forum, EPM Partners
The following table lists SharePoint 2013 Service Applications which can help in deciding which edition of SharePoint 2013 can be purchased based on the solution design and scenario.
| SharePoint 2013 Service Application | Foundation | Standard | Enterprise | Office 365 |
|---|---|---|---|---|
| Access Services | ![]() | ![]() | ![]() | ![]() |
| Access Services 2010 | ![]() | ![]() | ![]() | ![]() |
| App Management Service | ![]() | ![]() | ![]() | ![]() |
| Business Data Connectivity Service | ![]() | ![]() | ![]() | ![]() |
| Excel Services Application | ![]() | ![]() | ![]() | ![]() |
| Machine Translation Service | ![]() | ![]() | ![]() | ![]() |
| PerformancePoint Service Application | ![]() | ![]() | ![]() | ![]() |
| PowerPoint Automation Services | ![]() | ![]() | ![]() | ![]() |
| Managed Metadata Service Application | ![]() | ![]() | ![]() | ![]() |
| Search Service Application | ![]() | ![]() | ![]() | ![]() |
| Secure Store Service | ![]() | ![]() | ![]() | ![]() |
| Site Subscription Settings Service | ![]() | ![]() | ![]() | ![]() |
| State Service | ![]() | ![]() | ![]() | ![]() |
| User and Health Data Collection Service | ![]() | ![]() | ![]() | ![]() |
| User Profile Service Application | ![]() | ![]() | ![]() | ![]() |
| Visio Graphics Service | ![]() | ![]() | ![]() | ![]() |
| Word Automation Services | ![]() | ![]() | ![]() | ![]() |
| Work Management Service Application | ![]() | ![]() | ![]() | ![]() |
| Workflow Service Application | ![]() | ![]() | ![]() | ![]() |
The following is the table which has list of SharePoint object models with components and their respective namespaces based on the object model.
This is applicable for both SharePoint 2010 & SharePoint 2013 Foundation & Enterprise editions respectively.
Following is the list of new features & changes in SharePoint 2013 which I have gathered based on the glances through various sites and books.
Shredded Storage
SQL Improvements
Request Management
Workflow
Caching
UI
Service Applications
Office Web Apps
Business Connectivity Service
Access Service
Authentication
Web Applications
Development
Cloning of Virtual Machine using Hyper-V is not a one step process, but still nevertheless it’s easy as the following numbered list. But why this is required is something which is not explained in all the sites.
Fortunately, I found an article series which explains the process as well as what goes behind the scenes. Even though the articles is targeted towards Windows Server 2003 and 2008, I found the article to be 100% relevant for Windows Server 2012 R2 as well.
The article is a 4 part article which you can check below.
Cloning Hyper-V Virtual Machines the Right Way (Part 1)
Cloning Hyper-V Virtual Machines the Right Way (Part 2)
Cloning Hyper-V Virtual Machines the Right Way (Part 3)
Cloning Hyper-V Virtual Machines the Right Way (Part 4)
Thanks to Brien M. Posey for writing this article.Thanks
With the following Windows PowerShell Command, a managed account can be provided access to a content database.
$w = Get-SPWebApplication -identity http://<WebApplication>
$w.GrantAccessToProcessIdentity("<Domain>\<Username>")
Note: Before running this command, the account should be registered as managed account
To register a managed account
Recently I came across a photo at 500px.com where a mama elephant walks along with her baby elephant. It’s a beautiful photo by Glyn Dewis
When I was going through the comments, came across a comment by Henry von Huch who mentions he saw the tutorial.
So with little bit of searching I came across the YouTube tutorial which is linked below.
It’s a fast and easy technique !
Watch the video below or click here to watch in new window.
You can view Glyn Dewis profile here
WCF Service with SOAP, REST JSON & REST XML – 3 in 1 !

WCF has evolved a lot in the past few years. Currently expectations from end user are that, they should be able to use applications across multiple devices, be it Windows, Mac, mobile devices or web.
Service Oriented Architecture (SOA) is the right architecture when we have to deal with such a scenario. SOA helps multiple type of applications to consume and process data without the need to implement the back-end data access or business logics. Be it a Windows/OS-X desktops application or iOS/Android/Windows mobile applications.
In the case of Windows/ASP.NET web applications, web-service can expose SOAP based service which can be consumed and implemented easily using existing .NET frameworks.
For Mac applications REST as well SOAP can be consumed. Though SOAP consumption requires non traditional methods. With development tools like Xamarin it’s even easier.
For Mobile applications be it iOS based or Android based or Windows Mobile based or even Java based, they can consume REST based service in JSON/XML format and can be implemented easily.
Finally for web based applications we have Jquery which has direct support for JSON.
This post will explain how to enable all the three SOAP, REST JSON & REST XML in WCF Service along with a sample source code.
Let’s start by creating a WCF Service Application using Visual Studio and .NET Framework 4.5. You can use even Framework 4.0 or 3.5
Interface
Let’s modify interface so that operation contracts support REST Get and POST operations
[OperationContract]
[WebGet(UriTemplate = "/GetData/?value={value}")]//1. Added "WebGet" Attributes
string GetData(int value);[OperationContract] [WebInvoke(Method = "POST", UriTemplate = "/GetDataUsingDataContract/", BodyStyle = WebMessageBodyStyle.Bare)]//2. Added "WebInvoke" Attribute with Method, UriTemplate & BodyStyle as Bare CompositeType GetDataUsingDataContract(CompositeType composite);
Setting BodyStyle as Bare will allow the service to expect and respond with data type (json/xml) based on the “content-type: application/json or content-type: application/xml” which should be set as part of incoming request’s header.
Final Interface Code (Look into the highlighted lines)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
namespace MixedWebService
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
[ServiceContract]
public interface ITestService
{
[OperationContract]
[WebGet(UriTemplate = "/GetData/?value={value}")]//1. Added "WebGet" Attributes
string GetData(int value);
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "/GetDataUsingDataContract/", BodyStyle = WebMessageBodyStyle.Bare)]//2. Added "WebInvoke" Attribute with Method, UriTemplate & BodyStyle as Bare
CompositeType GetDataUsingDataContract(CompositeType composite);
// TODO: Add your service operations here
}
// Use a data contract as illustrated in the sample below to add composite types to service operations.
[DataContract]
public class CompositeType
{
bool boolValue = true;
string stringValue = "Hello ";
[DataMember]
public bool BoolValue
{
get { return boolValue; }
set { boolValue = value; }
}
[DataMember]
public string StringValue
{
get { return stringValue; }
set { stringValue = value; }
}
}
}Web.Config
Let’s modify the web.config so that it can support both SOAP as well as REST and allow the service to auto select the REST request and response formats.
For SOAP, add service behavior with name “DefaultServiceBehavior“. This should be under <system.servicemodel><behaviors><serviceBehaviors>
<behavior name="DefaultServiceBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior>
For REST, add endpoint behavior with name “RESTEndPointBehavior“. This should be under <system.servicemodel><behaviors><endpointBehaviors>
Make sure automaticFormatSelectionEnabled is set to true in webHttp tag. This will allow the service to expect and respond with data type (json/xml) based on the “content-type: application/json or content-type: application/xml” which should be set as part of incoming request’s header.
<behavior name="RESTEndPointBehavior"> <webHttp helpEnabled="true" automaticFormatSelectionEnabled="true"/> </behavior>
Finally add service under <system.servicemodel><services>
<service name="MixedWebService.TestService" behaviorConfiguration="DefaultServiceBehavior"><!--Added Service with DefaultServiceBehavior as behaviorConfiguration--> <endpoint address="SoapService" binding="basicHttpBinding" contract="MixedWebService.ITestService"/><!--Added basicHttpBinding as SoapService--> <endpoint address="RestService" binding="webHttpBinding" behaviorConfiguration="RESTEndPointBehavior" contract="MixedWebService.ITestService"/><!--Added webHttpBinding as RestService with RESTEndPointBehavior as behaviorConfiguration--> </service>
The endpoint SoapService uses basicHttpBinding where as endpoint RestService uses webHttpBinding.
The RESTEndPointBehavior behavior configuration will make sure the service uses automatic format selection.
Hence when the incoming request’s header has “content-type: application/json”, the service will expect a json based request data and respond with json data. If it has “content-type: application/xml”, the service will expect a xml based request data and respond with xml data.
Final Web.config code (Look into the highlighted lines)
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5"/>
</system.web>
<system.serviceModel>
<services>
<service name="MixedWebService.TestService" behaviorConfiguration="DefaultServiceBehavior"><!--Added Service with DefaultServiceBehavior as behaviorConfiguration-->
<endpoint address="SoapService" binding="basicHttpBinding" contract="MixedWebService.ITestService"/><!--Added basicHttpBinding as SoapService-->
<endpoint address="RestService" binding="webHttpBinding" behaviorConfiguration="RESTEndPointBehavior" contract="MixedWebService.ITestService"/><!--Added webHttpBinding as RestService with RESTEndPointBehavior as behaviorConfiguration-->
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="DefaultServiceBehavior"><!--Added DefaultServiceBehavior referenced at service tag above-->
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="RESTEndPointBehavior"><!--Added RESTEndPointBehavior referenced at service tag above-->
<webHttp helpEnabled="true" automaticFormatSelectionEnabled="true"/><!--automaticFormatSelectionEnabled when set to true expects input and provides output based on the "content-type: application/json or content-type: application/xml" as part of incoming request's header. -->
</behavior>
</endpointBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>Now let’s look into the part where the hosted service can be consumed and see if it works fine.
SOAP:
Launch the WCF Test Client using Visual Studio Command Prompt
Add the service and call each methods with appropriate inputs. You should be able to see a result similar to below.
For REST we will use Fiddler to compose and analyze the request and response.
Launch the fiddler, use the screenshots below to compose a request. Make a note that content-type header decides the message format.
Also the URL should end with “RestService” then operation
e.g http://localhost:5469/TestService.svc/RestService/GetData/?value=1
REST GET using XML:
REST POST using XML:
REST GET using JSON:
REST POST using JSON:
Note: In all the above scenarios, the input and output use the same data format.

SharePoint & Windows
A post describing SharePoint’s high resource usage and how Windows 8’s Boot to VHD will help to run SharePoint host with more dedicated resource.
For people like me who has to depend on resource hungry SharePoint servers, life is difficult as a developer and IT designer.
Most of the time we have to run the server inside a virtual environment and most of the time it would be a standalone server.
The problem….
Initially with SharePoint 2010 you could get away with at-least 6GB RAM allocated to a guest OS. But with SharePoint 2013 you require at least 12GB for a better experience and most of the machines come with 8GB or 16 GB RAM.
The problem is, your host OS will take at least 2GB RAM which for SharePoint can make life and death kind of experience even though Windows is perfectly capable of keeping SharePoint alive with paging (Virtual RAM) and have the storage drive on a never ending marathon run !
For virtual environment, the following are the options we generally have.
Out of these, VirtualPC and Hyper-V natively use VHD container format for guest OS. Others too have these (Thanks to Microsoft’s Open Specification Promise) but mostly they use proprietary format.
When Windows 7 was rolled out, the Enterprise & Ultimate editions had the native Boot-to-VHD support.
What is Boot To VHD ?
Refers to the ability of a physical computer to mount and boot from an operating system contained within a VHD – (PS: Shamelessly copied the text from wikipedia)
Again to the problem….
Consider a scenario where you own a VM host system with 8GB RAM and run a VM guest with 6GB RAM for SharePoint 2010. This worked mostly fine. Then comes the SharePoint 2013 which requires even more ram, at-least 2GB in addition. Now you are in soup, you can wait forever to see the guest OS, aka Windows Server 2008 R2 or Windows Server 2012’s desktop to show up!
Solution….
Gain as much RAM as possible from host or upgrade the system to have more RAM. You will be in luck for desktop systems. Laptops, you are mostly in trouble.
Windows 7…..
Luckily with Windows 7(Enterprise/Ultimate) you could boot physical computer to a VHD and utilize all the resources. That’s good news, now you have all the RAM available for the SharePoint. The bad news is Enterprise is available for volume licensing only and Ultimate prohibitively costly.
Windows 8…..(forget Windows 8 RT, that thing can’t even run a standalone app!, but still a good OS for daily basic usage, so Microsoft is forgiven!)
Then comes Windows 8 with even more simpler editions. A regular version, professional version & an enterprise version. Compared to Windows 7, Windows 8 Pro is affordable and can be bought by an individual.
The best news is, Windows 8 Pro comes with Client Hyper-V and supports Boot To VHD.
So now as an indie SharePoint developer, you have a host OS which can be bought, has a virtualization capability and supports Boot To VHD.
Assuming you bought the host OS, i.e. Windows 8 Pro, its time to utilize it for better SharePoint development experience.
PS: I am going to explain only Boot-to-VHD part. Enabling Hyper-V in Window 8 Pro or installing SharePoint are out of scope for this post. Get help from trusted friend Google’s Search or Microsoft’s Bing.
After a long story…Main Picture…..
Enabling boot-to-VHD…..
bcdedit /export C:\bcdcurrentbackup
bcdboot D:\Windows
You can use bcdedit command to rename the description of the Windows in multi boot screen.
Removing boot-to-VHD…
bcdedit
bcdedit /delete {4ff0aa40-b17f-11e3-beaa-bc5ff4cf029e}