By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,870 Members | 1,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,870 IT Pros & Developers. It's quick & easy.

"access denied" when writing to disk from

P: n/a
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
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a

Definately sounds like a security issue but "access denied" could also
mean that something else is accessing the "thing" already. Have you
looked into that. I would also suggest that you add ASPNET to the
"admin" group on the machine, just for debugging sake, to eliminate any
security issue.

Sayed Y. Hashimi
Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0

Nov 19 '05 #2

P: n/a
thank you for your suggestions. I tried adding ASPNET to the admins group
for testing purposes, but still the same problem, so perhaps the problem of
the component being in use by some other process is correct, I'll check it
out, thanks again
Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.