views:

44

answers:

1

I am using GhostScript to generate some thumbnails of PDF pages in an ASP.NET application. I have it wrapped in this library called GhostScriptSharp that just uses DllImport to call methods in the GhostScript DLL.

It looks like this wont work on a medium trust hosting environment, either because of the fact that it is calling unmanaged code, or that it looks like the library is creating files all over the place (outside my virtual directory).

I ran Process Monitor and saw it trying to Read, QueryNameInformationFile, CreateFile and QueryStandardInformationFile in places like:

C:\WINDOWS\system32\Halftone\Default or C:\gs\gs8.63\lib\Halftone\Default or C:\gs\font\Halftone\Default

Any ideas about whether this is "fixable" to run in medium trust?

If I can't use GhostScript, is there another free/open source library that WILL work in Medium trust?

A: 

From what I understand, Medium Trust does not allow for Unmanaged Code to be run.

Therefore, GhostScript will not work in Medium Trust. (At least at the time of this answer.)

SkippyFire
Can anybody verify this? I am not a .NET security expert.
SkippyFire