You need to set the framework you built your project on. Not blindly change it to 4.0 or so. If you made your project on 2.0, it's ok, leave it as is - do not change.
Based on the error, it looks like some security permission issue. Try giving
Network service
&
ASPNET
accounts read permission on the file (if missing).
Steps example:
Go to your application folder -> Properties -> Tab Security -> Add... -> In locations - local machine name, write/find "NETWORK SERVICE" -> give the account a full/(or read atleast) control access -> OK
Have a look at this article to get the correct account that would need access permission:
Who is my IIS application process identity? [
^]