afaik Umbraco should support medium trust. I've just setup a fresh install of umbraco 7 but when changing from full trust to medium trust I get a security exception. (regarding to 'AutoMapper')
I've already set the medium trust app setting ( <add key="umbracoUseMediumTrust" value="true" /> )
Thanks in advance
Server Error in '/' Application.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Delegate.DelegateConstruct(Object target, IntPtr slot) +0
AutoMapper.Internal.ProbingAdapterResolver..ctor(String[] platformNames) +45
AutoMapper.Internal.PlatformAdapter..cctor() +184
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446
Actually Umbraco has decided to NOT support medium trust in v7 to make things more secure. I actually think it's also stated in the release notes but you can read it in the comments for this blog post as well http://umbraco.com/follow-us/blog-archive/2013/11/21/umbraco-7.aspx
But if you are running on a web host with the key <trust level="Full"/> in your web.config does this mean that you are getting full trust or not?
I feel that here is a need for a script that one can run to diagnose if the web host is compatibale with Umbraco 7. Right now you sign up to a web host just knowing it can run .Net but you dont know if you actually can run Umbraco 7 on it. A detection script would greatly reduce this time to find out.
Hmm, I would never signup with a host before I was certain that they supported Umbraco. If I have any doubts about whether or not they support Umbraco I usually contact them beforehand asking them if it's possible.
I don't see how a detection script would be of any use when you have already signed up with the host? Then you're probably gonna pay them anyway :)
But didnt Umbraco 4 support medium trust once upon a time? Then you are stuck with a number of Umbraco 4 users that cannot upgrade? Isnt there a big need to know this before you attempt?
Aaah, you're of course thinking about if people who are currently running Umbraco 4 or 6 on hosting, which supports medium trust are trying to upgrade. Now I get it :) Stil a bit early for me this morning it seems.
But yes it would be nice to have a check in the upgrade script if possible to inform them that they're currently using medium trust settings and that Umbraco 7 does not support this and they need to check with their hosting company if they support full trust.
I think this should be added as a feature request on the issue tracker.
Hi all, I just had the same issue with a site that I just made live. The client is using some god-awful shared windows thing with names.co.uk. We had an umbraco 6 site up previously with no issues.
Im having the same issues but with Umbraco 7. The problem is that im unable to use Andy's solution because i get the error that i am not allowed to set the trust to Full because it was locked at a higher level, presumably the machine.config. Is there another way around this?
On Godaddy you should be able to set the level in your web.config. If you can't then something is seriously wrong and I would suggest you move providers.
Umbraco 7 in Medium Trust environment
Hi all,
afaik Umbraco should support medium trust. I've just setup a fresh install of umbraco 7 but when changing from full trust to medium trust I get a security exception. (regarding to 'AutoMapper')
I've already set the medium trust app setting ( <add key="umbracoUseMediumTrust" value="true" /> )
Thanks in advance
Server Error in '/' Application.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446
Hi Vincent
Actually Umbraco has decided to NOT support medium trust in v7 to make things more secure. I actually think it's also stated in the release notes but you can read it in the comments for this blog post as well http://umbraco.com/follow-us/blog-archive/2013/11/21/umbraco-7.aspx
Hope this clarifies things :)
/Jan
Hi Vincent
Actually it's due to an official statement from the ASP.NET team at Microsoft, which Niels is also reffering in the comments.
It's mentioned in this post on stackoverflow http://stackoverflow.com/a/17218344.
/Jan
But if you are running on a web host with the key <trust level="Full"/> in your web.config does this mean that you are getting full trust or not?
I feel that here is a need for a script that one can run to diagnose if the web host is compatibale with Umbraco 7. Right now you sign up to a web host just knowing it can run .Net but you dont know if you actually can run Umbraco 7 on it. A detection script would greatly reduce this time to find out.
Hi Johan
Hmm, I would never signup with a host before I was certain that they supported Umbraco. If I have any doubts about whether or not they support Umbraco I usually contact them beforehand asking them if it's possible.
I don't see how a detection script would be of any use when you have already signed up with the host? Then you're probably gonna pay them anyway :)
Cheers, Jan
But didnt Umbraco 4 support medium trust once upon a time? Then you are stuck with a number of Umbraco 4 users that cannot upgrade? Isnt there a big need to know this before you attempt?
Hi Johan
Aaah, you're of course thinking about if people who are currently running Umbraco 4 or 6 on hosting, which supports medium trust are trying to upgrade. Now I get it :) Stil a bit early for me this morning it seems.
But yes it would be nice to have a check in the upgrade script if possible to inform them that they're currently using medium trust settings and that Umbraco 7 does not support this and they need to check with their hosting company if they support full trust.
I think this should be added as a feature request on the issue tracker.
Cheers, Jan
Hi all, I just had the same issue with a site that I just made live. The client is using some god-awful shared windows thing with names.co.uk. We had an umbraco 6 site up previously with no issues.
Adding below did the job.
Im having the same issues but with Umbraco 7. The problem is that im unable to use Andy's solution because i get the error that i am not allowed to set the trust to Full because it was locked at a higher level, presumably the machine.config. Is there another way around this?
Hi Bunnynut,
On Godaddy you should be able to set the level in your web.config. If you can't then something is seriously wrong and I would suggest you move providers.
https://support.godaddy.com/help/article/1039/what-is-medium-trust-level-and-how-does-it-affect-my-hosting-account?countrysite=uk
is working on a reply...