This is working fine on my local computer, but when I deployed the code to server.
I guess that on your local computer you use Visual Studio to run the application on the IIS Express. If so the worker process to run the application has your user account which you logged in your PC and executed the Visual Studio. Probably your account has an administrator right and has an access right to the wwwroot holder.
When you deployed the application to the server the account of worker process is the Network Service or AppPoolIdentity by default which has very low access right. That is why you got the UnauthorizedAccessException.
To solve the issue, therefore, you will have to give the account of worker process a proper access right to the FilledPDFFiles folder.