In ASP.Net when using the code:
zipFile.Add(.....);
zipFile.CommitUpdate();
I get an "invalid directory" exception on the commitUpdate statement. Looking at the stack trace it appears that SharpZipLib is trying to use
System.IO.
Path.GetTempPath() and create a temp file in the %temp% directory.
If I set in the web.config impersonate to true and give a local user account then the CommitUpdate will work fine.
<identity impersonate="true" username="..." password="...." />
I am sure all this is by design, but could someone clarify what is happening?
Is there a way I could set the temp directory it uses to somewhere else?
Is there a way of this code working in asp.net without using impersonation?