IT Management Suite

Expand all | Collapse all

ASDK error in Workflow: An Exception occured. Failed to construct DatabaseContext object. Connection to database failed.

  • 1.  ASDK error in Workflow: An Exception occured. Failed to construct DatabaseContext object. Connection to database failed.

    Posted Jun 20, 2012 04:08 PM

    Dear All,

    I am using the ASDK to execute a Task Server Task in a WebService:

    C:\PROGRA~1\Altiris\ALTIRI~4\Bin\AltirisASDKTask.exe cmd:ExecuteTask taskGuid:"<Task GUID>" executionName:"<Task Name>" inputParameters:"<inputParameters><parameter><name>@AssignedResources</name><value><Machine Guid></value></parameter><parameter><name>@CompRequirements</name><value><minWaitTime>1 minutes</minWaitTime><maxWaitTime>60 minutes</maxWaitTime><minCompletion>1 %</minCompletion></value></parameter></inputParameters>"

    When I run this in Debug, it works and gives me back a GUID. However, when I run it via a WebService, I get the following error:

    An Exception occured. Failed to construct DatabaseContext object. Connection to database failed.

    I am wondering if this is a permissions issue for the user that the WebService is running as in IIS, but I do not know what it might be permissions for? Is it the IIS User needing a login on the SQL Server 2008 Server? What does the ASDK use for this?

    Does anyone else know what the problem is?

    Kindest regards,

    QuietLeni



  • 2.  RE: ASDK error in Workflow: An Exception occured. Failed to construct DatabaseContext object. Connection to database failed.

    Posted Jun 20, 2012 04:31 PM

    Dear All,

    I have got a little further. I set the "IIS APPPOOL\Classic .NET AppPool" login as being a dbo on the Symantec_CMDB and now I get a different error:

    An Exception occured. Unable to check for license '9f9a80fc-2d71-4b08-a1ad-fb146b4af2c6'. Error: 'The current user does not have required permission 'read' to load item 'd0e33520-c160-11d2-8612-00104b74a9df'.

    I have checked the licenses in the SIM and all is in order. I am using ASDK 7.1.83 on Altiris 7.1.8280.

    Why might this be happening?

    Help!



  • 3.  RE: ASDK error in Workflow: An Exception occured. Failed to construct DatabaseContext object. Connection to database failed.
    Best Answer

    Posted Jun 20, 2012 05:38 PM

    Dear All,

    Right - fixed it.

    I added the "IIS APPPOOL\Classic .NET AppPool" user as an Account in Altiris Security (on top of the above).

    Hope that this helps someone else!

    Kindest regards,

    QuietLeni