Welcome Guest Search | Active Topics | Sign In | Register

EO.PDF.dll and EO.Base.dll file locking Options
Matthew Cosier
Posted: Tuesday, August 23, 2016 3:39:19 AM
Rank: Newbie
Groups: Member

Joined: 7/13/2016
Posts: 1
Hi there,

We are running PDF generation out of two separate TopShelf (C#/.NET) hosted windows-services on Server 2012 R2.

When the services are shut down, both EO.PDF.dll and EO.Base.dll remain locked. So all future deployments of the services fail due to file locking.

I did some research here, and I can only assume it has something to do with how you are hosting out of rundll32, which seems to hold the lock on those resources. Some people have suggested to create a new app domain for every PDF generation, then explicitly shut that app domain down, etc.

Does anyone have any solid sample code, or any type of service infrastructure they could share with me so that I don't have to waste a whole heap of time writing this and testing this myself?

Matt
eo_support
Posted: Tuesday, August 23, 2016 11:50:54 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
Hi,

Currently rundll32 will close 5 seconds after your application close. So you may want to add a time delay in your code before you try to replace the file. Another way to avoid this issue is to use "shadow copy". You can add some code to make a copy of the DLLs from your installation folder into a private folder and then run your application from that folder. That way you can always update the original one since it's never really used. This is how ASP.NET works.

We will look into this on our end to see if we can add something to force shutdown everything immediately.

Thanks!
eo_support
Posted: Friday, August 26, 2016 1:55:40 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
Hi,

This is just to let you know that we have posted a new build that you can use this method to close down all child processes:

http://www.essentialobjects.com/doc/eo.base.runtime.shutdown.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.