I have created a web part that loads binary files (stored as byte
arrays in a varbinary column in SQL Server 2005) and displays them,
either as a link for download, or in a 3rd party control
(WebImageViewer, from Atalasoft). The WebImageViewer control requires
a caching folder with writeable permissions. When loading an image
into the WebImageViewer control, it immediately (in the background)
writes out the image to the cacheing folder, and then displays the
image from the cache.
I had this working in an earlier incarnation as a user control
running with SmartPart. At that time, I had created a subdirectory
path within the particular Sharepoint web application (the default
VirtualDirectories/80) as /UserControls/ImageCache, and given
read/write permissions on these folders to the AppPool identity. In
that incarnation, the Atalasoft DLLs were in the bin directory.
Now, I have redeveloped this as a web part. Since I no longer have
user controls, I just have an /ImageCache subdirectory. I am
deploying the DLLs to the GAC instead of the bin, and using a wsp
solution file to deploy everything. I am running on Minimal_Trust.
Also, I have lots of other web parts which DON'T require write
permissions on a folder. These web parts are working correctly, so I
am quite sure that my general SafeControls web.config settings are
correct.
The problem is that when WebImageViewer loads an image and then goes
to write it to the ImageCache folder, a 4011 event code occurs (see
EventViewer details, below). I have been trying to fix this for 2
days, and am stumped. The user write permissions appear to be the
same as before, and all the DLLs involved in this process are in the
GAC. (I also briefly tried FullTrust, it didn't resolve this!) What
am I missing?