Video Screencast Help
Search Video Help Close Back
to help

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

Created: 20 Jun 2012 | Updated: 20 Jun 2012 | 2 comments
QuietLeni's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

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

Comments 2 CommentsJump to latest comment

QuietLeni's picture

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!

I stand by the accuracy of my Inventory of the organisation. Don't blame me for the picture that it presents...

0
Login to vote
  • Actions
QuietLeni's picture

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

I stand by the accuracy of my Inventory of the organisation. Don't blame me for the picture that it presents...

SOLUTION
0
Login to vote
  • Actions