asp.netconfigurationumbracoshared-hostingmedium-trust

Run Umbraco 6.x in Medium Trust / Shared hosting environment


I have a Umbraco 6.1.5 project, and i want to deploy it to a shared hosting environment. I read that Umbraco 6 can run in Medium Trust, but i cant find much more info than just that one sentence.

And, in the web.config i found this setting: umbracoUseMediumTrust which i can set to "true". But, after doing so, i get the following error:

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

Is there anyone who knows how to run Umbraco in such a Shared Hosting environment?


Solution

  • I addition to setting umbracoUseMediumTrust=true, it should just be a matter of setting the trust and machineKey elements:

    <system.web>
        <trust level="Medium" originUrl=".*" />
        <machineKey validationKey="yourKey"
                    decryptionKey="yourKey"
                    validation="SHA1"
                    decryption="AES" />
        ....
    </system.web>
    

    You can generate a validationKey and decryptionKey here: http://aspnetresources.com/tools/machineKey