An unhandled access exception has occurred

Mar 18, 2009 at 4:16 AM
I'm pretty new to SharePoint development and we recently deployed a MOSS 2007 site and one of our pages utilized the SPUserPoll.

Our users kept randomly getting 403 Forbidden error messages when they attempted to connect to the page containing this web part (which is a great web part btw).

I think the issue was, at any given time, multiple users would be attempting to access the same Chart file generated by the Web Part.

By default, the images are stored physically on the hard drive. When ASP.NET/ SharePoint attempted to render the file for the client, it would first have to open the file, read the bytes and stream it to the end client. So when many users accessed the page at once, ASP.NET would try to open the file multiple times at the same time when only one thread is going to have access to it.

So, to get by the issue, I had to configure the SPUserPoll to write the images to memory rather than writing it to the hard drive. This is done by, as stated in the documentation (which very well could cover this issue, I didn't read it all of the way :-P) by adding a new key value pair to the appSettings node. Key = "ChartImageHandler", Value = "Storage=memory;Timeout=20;Url=~/tempImages/;".

I really hope this did fix the issue on our end (which is why I am posting it), and if it did, I hope it can help anyone else out there running into the same issue.

Information on our environment: MOSS 2007 SP1, Windows Server 2003 SP2 X64, .NET Framework 2.0 SP2, .NET Framework 3.0 SP2, .NET Framework 3.5 SP1.
Mar 19, 2009 at 6:59 PM
Thanks for sharing the information! I hope it will help some users who might face this problem.
I will include it in a trouble shoot section of the documentation.