An ASP.NET website will run under the permissions that you give it. For custom permissions, this usually done by adding the <identity impersonate="true" /> tag to the web.config and then configuring a user in the website's IIS options. This will work throughout most of the website, but these permissions are not used for code executing from the global.asax. The reason for this is that the code in the global.asax executes at a higher level and uses the permissions coming from the website's app pool.
To change the app pool's permissions you can have the pool run under a custom Windows account. The account, however, must be part of the IIS_WPG group (IIS Worker Process Group) on the local web server. To add the account to the group, open up the Computer Management utility, and navigate to:
System Tools \ Local Users and Groups \ Groups.
Right-Click on IIS_WPG, and click on Add to Group. Add your account and it should be ready to run an IIS app pool. Once you set up the account for the IIS app pool, you'll want to stop the pool and then start it again. Recycling will not refresh the account. Now you can control the permissions of code executing from the global.asax file.