I am currently having this issues as well. My website is hosted with 1and1 and after installing 4.5.1 I get this error very frequently when browsing the site.
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
1and1 support has said that the site does not run at full trust, and I have commented out that line in the web.config.
There are several other setting that they had me change to the web.config based on their FAQ for install DNN 3.0.13. Other than that they have be very unhelpful and have suggested I install version 3.0.13 or get a dedicated server from them so that I can run it at full trust.
Here are the other settings I have adjusted in the web.config based on their faq:
c. Enable impersonation.
<identity impersonate="true"/> already exists in the Web.config file,
but it is commented out. Un-comment it by removing <!-- It should look as follows:
<identity impersonate="true"/>
<!--
<authentication mode="Windows">
</authentication>
-->
d. Disable changes in maximum file size. (Very important!)
The tag <httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="8192" />
has to be commented out. Use <!-- and -->
e. Change database owner.
In the section <data defaultProvider="SqlDataProvider">, the string
databaseOwner="dbo" has to be replaced with databaseOwner="dbo123456789" (the
database username)
Also per their instructions I have granted all permissions to the IUSR and Network Services.
Does anyone have any other suggestions? I have looked over the existing posts but they have not resolved my issue. 1and1 support has been fairly unhelpful, but I really don't what to take the time to switch providers at the moment.