You need ti grant the FullTrust right to the remote share:
1. On the Web server, open Administrative Tools, and then double-click Microsoft .NET Framework Configuration.
2. Expand Runtime Security Policy, expand Machine, and then expand Code Groups.
3. Right-click All_Code, and then click New.
4. Select Create a new code group. Give your code group a relevant name, such as the name of the applications share. Click Next.
5. In the Choose the condition type for this code group list, select URL.
6. In the URL text box, type the path of the share in the following format (where computername is the name of the computer that is hosting the remote share, and sharename is the name of the share): file:////\\computername\sharename\*
7. Click Next. On the next page, select Use an existing permission set, and then select FullTrust.
8. Click Next, and then click Finish.
9. Restart Internet Information Services (IIS) to restart the ASP.NET worker process.