Wednesday, March 21, 2012

December release under Medium Trust

Hey,

I read on the forums somewhere that my medium trust problem is common for the december release. My ISP won't put me on high or full trust, so now I'm looking for alternatives. I was thinking about a custompolicy. Can anyone tell me what restriction exactly prevents the usage of Atlas? Perhaps I can get my ISP to make a custom policy for me.

Thanks in advance

Okey I found out what it is.

It's the configurationPermission. To allow it, copy the Medium trust policy file from your /frameworkversionno/CONFIG folder to rename it to something like web_AtlasPolicy.config.

Then add:

<SecurityClassName="ConfigurationPermission"Description="System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

And:

<IPermission

class="ConfigurationPermission"

version="1"

Unrestricted="true"

/>

Then go to your web.config file (I think it's machine.config for your host) and add this in system.web:

<securityPolicy>

<trustLevelname="Atlas"policyFile="path/web_AtlasPolicy.config"/>

</securityPolicy>

<trustlevel="Atlas"/>

I don't think your ISP will do this for you though, my ISP argues that if something isn't in Medium trust, it's unsafe so they won't change it. If anyone has a good argument on why my ISP should allow this please let me know. Good luck with yours.

No comments:

Post a Comment