Hi there
I'm using VB.NET and Office Web Components to access a SQL Server 2005
Express database and draw pictures on the fly in my ASP.NET application.
Using .ExportPicture to write the GIF/JPEG/PNG image to disk and then load
it into the page using the <IMG /> tag is probably not the tidiest or most
secure way of doing this, but it is the easiest and allows the greatest
flexibility in terms of positioning. (It also seems to be the most popular
method, judging by the newsgroups.)
However, the parser gives an "Access denied" error message at the line
containing the .ExportPicture command. The same set of code, run on a
different machine, doesn't give this error. So I'm assuming that it's a
security issue related to the application's attempt to write the GIF file to
disk and took the following diagnostic steps.
While trying to isolate the problem, from <Control panel> <User accounts> I
gave the ASPNET account write permission. From Windows Explorer, I
right-clicked the wwwroot folder, selected Properties and followed the
Security tab and added the ASPNET account with write permission on the
folder. I must have tried at least a dozen other things to get this right,
but without success.
I'm keen to solve the "Access denied" problem of course, but I'm also
interested to know why there are so many independent methods of establishing
write permissions on the file system.
I'd greatly appreciate a reference and a pointer in the right direction.
Best regards
Loane