Hi Patrice,
Thank you for that link, it certainly looks like a more streamlined solution
to use the ashx handler instead.
My problem now is going off at a tangent, but maybe you can help.
If I use the file.OpenRead() functions, I get an
UnauthorizedAccessException, however if I simply use an asp:image, with
imageURL value of the same path - that works fine! Any ideas? The path is
along the lines of "\\servername\share\file.jpg" and I'm using integrated
windows authentication - with the authenticated user having permissions on
\\servername.
Thank you for your help,
Chris
> Try for example :
> http://www.developerfusion.co.uk/show/5223/
[quoted text clipped - 23 lines]
>> cheers,
>> Chris
Patrice - 11 Feb 2008 17:14 GMT
I would trust the exception. Not sure what you meant exactly by having
access to \\servername but are you 100 % sure the user has access to BOTH
the file system location and the network share (most often I would say
granting access to the network share is forgotten) ?
You could perhaps try a tool such as filemon from www.sysinternals.com to
track file operations failures (or ask your admin if enabling auditing
could help). You could also try to create a file (and check its owner to see
if impersonation is properly done as expected).
--
Patrice
> Hi Patrice,
>
[quoted text clipped - 40 lines]
>>> cheers,
>>> Chris