I got this issue after hosting my umbraco website on GoDaddy server.

Solution

<configuration>
    <system.web>
       <trust level="Full" />
    </system.web>
</configuration>

This will fix your issue. Happy Coding :)