I have been struggling with this since 1 month. Can someone please help me with this scenario?
I have QTP installed on one server and my ASP.Net web application installed on a different server. I am trying to invoke QTP from my web server using C# or VBS code. Both approaches are not working. After doing a lots of research i came to know that i will need to add the user that is trying to invoke QTP to COM settings on QTP server. I even added my self to the COM settings but this approach is not working as well. After doing some research i came to know there might be a problem with permissions or firewall restrictions. But i have reached out to our network team and came to know that there are no firewall restrictions between our servers. Below are the C# and VBS approaches i used and there outcomes. Please help me with this request if anyone knows the solution for this issue. Thanks in advance.
VBS approach:
.cs file code
System.Diagnostics.Process.Start(@"C:\Program Filestest1.vbs");
.vbs file code
Dim qtApp
Dim qtTest
Dim qtResultsOpt
Set qtApp = CreateObject("QuickTest.Application","Server IP")
qtApp.Launch
qtApp.Visible = True
Outcome: Code ran On Server : No error message and it dint invoke QTP on the other server. Code ran from local : Error message Permission denied: 'CreateObject' , 800A0046.
C# code approach:
Type remoteQTP = Type.GetTypeFromProgID("QuickTest.Application", "Server IP");
QuickTest.Application qtp = (QuickTest.Application)Activator.CreateInstance(remoteQTP);
qtp.Launch();
qtp.Visible = true;
Outcome: Retrieving the COM class factory for remote component with CLSID {2B9B8E92-EBAA-44AF-A23C-9FBD08EAFA54} from machine Server IP address failed due to the following error: 80070005.