1

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.

user545359
  • 413
  • 5
  • 16
  • 29

1 Answers1

0

Can you check whether you have permissions specific to the QTP Remote Agent COM service on your target machine. Here are the steps:

  1. Go to Control Panel>Administrative Tools>Component Services.
  2. In the Component Services snap-in, navigate to Computers\My Computer\DCOM Config.
  3. In the right pane, locate AQTRmtAgent.
  4. Right- click the AQTRmtAgent and then select Properties.
  5. On the Security tab, select Customize, and then click Edit.
  6. Add the user to the permissions list.

PS: Sorry I just re-read your question and you mention you have tried adding the user to COM settings but it does not specify which process you tried to add, So I'll keep my post and try to help based on your response.

shreyansp
  • 723
  • 1
  • 7
  • 16