Check the application pool that is running the ASP.NET code.  Modify the permissions to have appropriate rights to shared resources that are referenced in the code.