UFT FIX – VM hangs when working with UFT and .NET

Automation Guild Online Conference Top ad

UFT Virtual Machine Hanging Issue

Is UFT hanging on a virtual machine when you are testing against a .NET application? Do you sometimes see UFT freeze when it tries to launch a .NET application, but everything works fine when UFT is not running? Are you seeing these issues only in a Virtual machine environment? If so, the following fix may help you.



Possible Cause for UFT Freezing

The issue described above may actually be due to a known issue with .NET and the Crypt32.dll. HP claims this has nothing to do with UFT but rather the problem occurs because of the mechanism used by the .NET Common Language Runtime (CLR) to verify code-signed .NET assemblies.

For a full explanation of this issue check out the national instruments article on Measurements Studio .NET Assemblies Take more than 10 Seconds to Load.

Two ways to fix the UFT hanging behavior

There are two ways you try to work around this issue on your virtual machine

  • Per-Machine Workaround
  • Per-Application Workaround

UFT Per-Machine Fix

To fix this behavior on a per-machine basis you can try to disable the CRL setting in IE using the following steps

  • Go to your Control Panel and Click on Network and Internet
  • Under Network and Internet click on the Internet Options


  • Under the Internet Properties dialog select the Advanced tab
  • Find the Security section and make sure that the Check for publisher's certificate revocation is un-checked


According to HP “By disabling the CRL checking using the Internet Options, you are not exposing yourself to a security threat because this check is not working. The reason why this problem occurs is because your network settings are not allowing Windows to access the CRL.”

UFT Per-Application Fix

If, for whatever reason, you don't want to do the per machine workaround you can also try a per application workaround by doing the following:

  • First Install make sure you are using .NET framework 2.0 SP1 or higher or install the required Microsoft Hotfix
  • For each application you want to use this workaround for you will need to create a application configuration file
  • In your config file make sure to set the generatePublisherEvidence setting to equal false


UFT VM freeze Issue Wrap-up

Hopefully the above fix will help resolve any VM specific UFT halting issues you may be experiencing with .NET applications.


2 comments
Elliott - January 6, 2014

Joe,

This post seems to be an extract of my recent support call with HP (including giving the National Instrument’s URL), if this is the case then it’s worth pointing out the root cause of the problem I faced was that the VM I was using did not have internet access. Thus the certificate check mechanism was failing. A much simpler fix, and what I actually did, was to just set a proxy (Internet Explorer connection settings).

The link you give in the “per application workaround” also makes a similar root cause observation:
“we found that the server did not have access to the internet and the assemblies were authenticode signed. Since there was no internet access .NET thread would wait to connect and ultimately timeout without doing the security check”

So in summary try setting a proxy if available, otherwise turn off the certificate check

Cheers

Elliott
(EDIT: corrected email)

Reply
Elliott - January 6, 2014

Edit for previous post, email corrected.

Reply
Click here to add a comment

Leave a comment: