Search code examples
c#asp.netwindowsweb-configmedium-trust

How to set trust level?


My web hosting's configurations is requesting me to create a trust nevel and set it to menimum to my web site. I did some search and found on ASP.NET 4+ it's done by adding this to web.config:

 <securityPolicy>
      <trustLevel name="Medium" 
                  policyFile="internal.config"
       />
    </securityPolicy>

But this doesn't show any of example what internal.config is like. Would anyone give me an example?


Solution

  • To set full trust level add this code to web.config

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