it’s getting cause of server security level limitation, you need to
fixed this in yourWeb.Config
file.
or
you can asked to Serve Vendor to change the Security Level for your
Host.
<system.web>
<securityPolicy>
<trustLevel name="Full/High/Medium/Low/Minimal" policyFile="internal"/>
</securityPolicy>
</system.web>
See the Reference Here
2
solved Throws Security Exception on server , runs on localhost