using System.Security.Permissions
The problem is that the webserver is running everything locally through its own IIS user and your code on the local machine is accessing through a "remote" connection. I once ran into a similar problem using a mapped folder. You only need to set up the permissions for your development machine, NOT the development SERVER, just the machine you are actually writing code on. You'll need to figure out just which permissions you need to set but here is the MSDN link for the above namespace. System.Security.Permissions Namespace
I once knew a man with a wooden leg named Smith, I never asked what he named his other leg.