03-03-2010 02:00 AM
I'm having some trouble using the SDK with ACT 2010 Premium For Web.
I have installed ACT 2010 Premium For Web on a Windows 2003 server. I have created a Visual Studio C# project and added the Act Framework dlls from the Global Assembly Cache as references. I'm using the following code to initiate a login:
ActFramework framework = new ActFramework();
framework.LogOn(installDir + "\\demo.pad", "Chris Huffman", "");
catch (Exception e)
The contents of the demo.pad file are:
<?xml version="1.0" standalone="no"?>
<!--This file represents a Pointer to an Act Database or [PAD]-->
<ACTDatabase name="ACT2010Demo" host="(local)" location="" type="SQL" />
I can access the database fine using the ACT client but everytime I run my application I receive the following exception:
System.UnauthorizedAccessException: Access to the path 'ACT\ACT For Web\' is denied.
at Act.Framework.ActFramework.FailLogOn(Exception ex, TraceCategory tCat, TraceLevel tLevel)
at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, Boolean fireEvents, Boolean suppressTierCheck, Boolean suppressSchemaCheck, Boolean suppressLicenseCheck, Boolean allowTrialModeDeparture, LogonTrack tracklogon)
at Act.Framework.ActFramework.LogOn(String xmlPADFile, String userName, String password)
I have tried installing ACT 2010 Premium For Web on another machine running Windows XP and I receive the same exception.
03-05-2010 01:34 AM
Turns out the issue is when you run Act Framework code as the system user. The system user doesn't have their own user specific user directory so therefore can not access "%USER%\Act\Act For Web". My good colleague Karl caught on to this and change the windows service we had created to run as an ordinary Windows user and now the framework is working fine.
Let this serve as a warning to anyone else creating Windows services with Act framework code in them. Run as a valid user!