The "RPC_E_SERVERFAULT" error results when an application that uses the OTA instantiates many of the same objects by a single user or by multiple users. This may be multiple TDConnection objects or many Command objects.
This can occur in any application written in a language which supports COM such as any of the languages offered in Visual Studio.
The "RPC_E_SERVERFAULT" error most commonly occurs when the QC/ALM OTA API is used in a Web Application or Web Service because many users access these application where multiple objects are instantiated by different users accessing the Web Service or Web Application.
The error "RPC_E_SERVERFAULT", in respect to the OTA API, is caused by too many objects being instantiated from the same OTAClient.dll reference. It is an overload of the API.
More information is available here: http://forums.asp.net/t/1308404.aspx/1
The error is also common in applications which make liberal use of the "Command" object. Use of the "Command" object is highly discouraged as the QC/ALM Client does not use the "Command" object. It is suggested that standard OTA objects be used instead. Use of the "Command" object is provided only for situations where regular OTA objects can’t accomplish the task. That said, multiple instances of the same object, not just the "Command" object, can result in the "RPC_E_SERVERFAULT" error.
It is important to mention that the QC/ALM OTA API uses the WinINet API. The Microsoft Windows Internet (WinINet) application programming interface (API) enables single user applications to access standard Internet protocols, such as FTP and HTTP. WinINet does not support server implementations. Because the OTA API uses WinINet it should not be used in Web Service or Web Application solutions. For server implementations or services Microsoft recommends use of WinHTTP.
Although WinHTTP API is effective when using APIs in a Web Service or Web Application is is a completely different framework than WinInet. For more information see ‘WinInet vs WinHTTP’: http://msdn.microsoft.com/en-us/library/windows/desktop/hh227298%28v=vs.85%29.aspx
There are no plans to implement WinHTTP with the QC/ALM OTA API.
When implementing the functionality of ALM as a Web Service or Web Application the OTA API should be avoided as it is a single user, single threaded API (due to its use of the WinInet API).
In ALM the REST API was selected over implementing WinHTTP. The REST API offers platform independence while maintaining the existing OTA API in its current form.
The ALM REST API is recommended when implementing the functionality of ALM as a Web Service or Web Application or in applications where platform independence is an objective.