I was facing this error when i was writing a plugin that was using CrmService.
After searching on internet i found out this
The problem was because Friendly name and Organization name were different.
The solution for it was
1. Launch Deployment Manager on the Web server
2. Select the Organization, Right Click -> Disable
3. RightClick Again and Click Edit Organization
4. Change the Organization Name and FriendlyName to be the same
5. Click Next and Finish.