Rank: Newbie Groups: Member
Joined: 3/8/2018 Posts: 5
|
Hello,
I recently upgraded an application from EO.pdf version 5 to EO2018 and I have noticed a difference in the way that the library handles sessions. Before each time we initiated a print it would be treated as a new session requiring re-authentication but it appears now that the session is stored between print instances. I'm assuming that it has something to do with how cookies are stored now or cache folders?
Is there a way to disable this behavior? or clear cookies? I've tried calling "CleanUpCacheFolders" but that doesnt seem to do the trick.
Any assistance with this would be great.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
Internally EO.Pdf creates WebView object (which creates full blown browser engine using our EO.WebBrowser product) to perform the conversion. As browser engine evolves it becomes more and more powerful, yet becomes heavier and heavier at the same time. So the new version maintain a pool of WebView and Engine objects and reuse them to perform conversions. This does cause multiple conversions that are served by the same Engine object to share session data.
Currently there is no easy way to avoid this behavior. The most effective method for this problem is through your server side code -- for example, to implement a "log out" feature and then you can call from the converter (through HtmlToPdfSession object). Other workaround exists but it can cause more problems for you since it would counter the original purpose of reusing WebViews. For example, you can create a separate AppDomain to perform the conversion, then shutdown that AppDomain. This will isolate each AppDomain with its own cache folder and cookie stores, which would resolve your problem but it causes other problems. First it would introduce a performance penalty because it effectively shutdown the WebView/Engine reusing mechanism. Second it would cause numerous cache folder being created on your system. You can however use CleanUpCacheFolders to clean up these folders periodically.
Thanks!
|