garann
garann

Reputation: 169

Why am I only allowed to access this zip file in Debug mode?

I'm having a problem that doesn't make a lot of sense to me. I have an ASP.NET application that runs perfectly in Debug mode, but throws Access Denied errors when running normally. I've given the ASPNET account and the account the application impersonates Full Control rights on the files the webapp is calling (using the Process object).

I determined that the files throwing the error are in a zip file and that the process I'm running will not look for them anywhere but the zip file. But it seems that until I unzip the zip file, I can't set permissions on its contents. Does this make sense to anyone else? And does anyone know of a solution?

Upvotes: 0

Views: 528

Answers (3)

Joshua
Joshua

Reputation: 43327

Oh shoot, "Access Denied", not "Permission Denied". This one always catches me.

"Access Denied" is when you cannot open the file even though you have permissions, usually because somebody else already has it open.

Upvotes: 0

Dirk Vollmar
Dirk Vollmar

Reputation: 176239

What library do you use to access the zip file? Maybe you cannot open a single zip archive twice when to different threads try to extract a file from the archive at the same time?

Upvotes: 0

Joshua
Joshua

Reputation: 43327

Set the permissions for CREATOR_OWNER on the folder it decompresses to.

Upvotes: 1

Related Questions