The problem I need to solve is this one, :
I have a WCF service that operate with MSProject, MSProject is STA and I need to operate in an MTA context, with multiple instances of MSProject that might work at the sime time in response of the simoultaneus client requests, for solve this I have created a pool of users that instance the MSproject, when I receive a request i serach for an user that is free and call a thread impersonated with the user tha open the MSProject app and work with this. so I can have more instances of the MSProject that can work at the same time.
I would like to manage a list that report the User that have actualy instanciated the MSProject, the MSProject Instances reference and a timestamp that reeport when the MSProject was Instanciated
If there are no problems the MSProject app is closed and the thread released and the user return free (release the user from the List).
If there are problems, sometimes MSProject app hangs and I need to manually kill the process but If I'Ve more instances at the same time I'm not able to kill it in a secure way, for avoiding this If I can associate the user with the process Id of the MS Project when pass 10 minutes form the timestamp i can decide that the MSProject is hanging and so kill them by code and release the user from the list.
In my context MSProject work in a background way without open Windows.
Can you help me to solve this problem?
I have a WCF service that operate with MSProject, MSProject is STA and I need to operate in an MTA context, with multiple instances of MSProject that might work at the sime time in response of the simoultaneus client requests, for solve this I have created a pool of users that instance the MSproject, when I receive a request i serach for an user that is free and call a thread impersonated with the user tha open the MSProject app and work with this. so I can have more instances of the MSProject that can work at the same time.
I would like to manage a list that report the User that have actualy instanciated the MSProject, the MSProject Instances reference and a timestamp that reeport when the MSProject was Instanciated
If there are no problems the MSProject app is closed and the thread released and the user return free (release the user from the List).
If there are problems, sometimes MSProject app hangs and I need to manually kill the process but If I'Ve more instances at the same time I'm not able to kill it in a secure way, for avoiding this If I can associate the user with the process Id of the MS Project when pass 10 minutes form the timestamp i can decide that the MSProject is hanging and so kill them by code and release the user from the list.
In my context MSProject work in a background way without open Windows.
Can you help me to solve this problem?