User Activity report for multiple users not working error 0xc0040432

The user activity report is a new feature of Forefront TMG SP1. I recently came across an issue where the customer was trying to run TMG user activity reports. When he used a single user (domainname\username) it rendered the report okay, but when we tried the same for 2 users (domainname\username1; domainname\username2) it gave the following error message after 5 minutes:

0xc0040432 The report TEST MS could not be generated. Report Server error information: The operation has timed out. The error occurred on object 'Reports' of class 'Reports Configuration' in the scope of array 'XXXXXXXXXXX’.

As a part of the troubleshooting we tried to use the underlining SQL Server Reporting Server (SSRS) to run the same reports. This worked and we did not run into the issue.From looking at the built-in tracing in TMG, we identified that TMG failed to render the report because the operation timed out. By default the timeout for this report is 5 minutes.To fix the issue we created the following registry key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RAT\Stingray\Debug\REPORTING] REG_DWORD: "RS_SOAP_CLIENT_TIMEOUT_IN_MILLISECONDS" Value: 0x000927c0

Please note you may have to create the registry keys as they do not exist by default:

0x000927c0 (HEX) =600000 milliseconds = 10 minutes.
The default timeout value is 5 minutes.

This worked for 2 users, but with 10 users it still timed out and we got the same error. We eventually fixed the issue by increasing the registry value to 20 minutes. The main reason why we had to increase the timeout value was because the machine was not powerful enough to complete the processing of multiple users within the default 5 min.

Author
Saurav Datta
Security Support Escalation Engineer
Microsoft CSS Forefront Security Edge Team

Technical Reviewer
Lars Bentzen
Escalation Engineer
Microsoft CSS Forefront Security Edge Team