This project is read-only.

Where to download partial trust dll?

Mar 23, 2009 at 8:40 PM
Hi Cheeso,

Thank you so much for the great component...

I'm creating a very small web site. I'm using v1.7 (Ionic.Zip.dll comes with when I delopy to Full trust web site, it works fine? However, I get System.Security.Permissions.EnvironmentPermission in Medium trust web site.

Where can I download Medium trust dll file?

Thank you again!!!
Mar 25, 2009 at 2:20 AM
Winmyan,  Hmmmm, I'm pretty sure the Ionic.Zip.dll was marked as partial trust. 

System.Security.Permissions.EnvironmentPermission can be returned when retrieving an environment setting is disallowed.

The library does this in only one place, as far as I know.  It calls System.IO.Path.GetTempPath() when setting the TempFileFolder property to the default value.
(This will implicitly retrieve the User Name from the environment).

The TempFileFolder property tells DotNetZip where to create temp files, and it's necessary to have it set when saving files to disk.

In ASP.NET scenarios, you normally have to set it to a directory for which the ASPNET user (or IUSR) has write permissions.

If you set it explicitly (with something like zip.TempFileFolder = "c:\\writable_directory";)  then, DotNetZip will not have to set it to a default value, and as a result will not call GetTempPath() and I suspect that will avoid the EnvironmentPermission exception.

Can you try that?