Open IgorDR opened 10 years ago
@IgorDR Have you tried running locally in medium trust to see what it's breaking on?
Yes, the problem seems related to ServiceStack.Text as seen in the following exception stack trace
[SecurityException: Richiesta di autorizzazione di tipo 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' non soddisfatta.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31
System.Security.CodeAccessPermission.Demand() +46
System.Reflection.Emit.DynamicMethod.PerformSecurityCheck(Type owner, StackCrawlMark& stackMark, Boolean skipVisibility) +249
System.Reflection.Emit.DynamicMethod..ctor(String name, Type returnType, Type[] parameterTypes, Type owner, Boolean skipVisibility) +48
ServiceStack.Text.Common.TypeAccessor.CreateDynamicSetMethod(MemberInfo memberInfo) +225
ServiceStack.Text.Common.TypeAccessor.CreateIlPropertySetter(PropertyInfo propertyInfo) +66
ServiceStack.Text.Common.TypeAccessor.GetSetPropertyMethod(TypeConfig typeConfig, PropertyInfo propertyInfo) +352
ServiceStack.Text.Common.TypeAccessor.Create(ITypeSerializer serializer, TypeConfig typeConfig, PropertyInfo propertyInfo) +78
ServiceStack.Text.Common.DeserializeTypeRef.GetTypeAccessorMap(TypeConfig typeConfig, ITypeSerializer serializer) +204
ServiceStack.Text.Common.DeserializeType1.GetParseMethod(TypeConfig typeConfig) +95 ServiceStack.Text.Common.JsReader
1.GetCoreParseFn() +1748
ServiceStack.Text.Common.JsReader1.GetParseFn() +164 ServiceStack.Text.Json.JsonReader
1..cctor() +108
I'm having the same issue. Was there a resolution to this?
My solution was to change the Internet Service Provider.
Contact your hosting provider and let them know that Microsoft does not support Medium trust anymore for ASP.NET. My hosting provider tried to pull the same stunt, I complained and they reverted it. (I certainly wasn't the only one who complained)
I contacted my hosting provider and they are saying full trust is not supported on their shared hosting packages despite it no longer being supported by Microsoft. They are are going to change apparently. My hosting provider is 1and1 Internet. Looks like I'm going to have to move hosting providers.
What hosting providers are you using successfully?
Take a look at http://discountasp.net/ they support full trust.
I would use Mailchip.NET to subscribe leads to a mailing list. It works perfectly on my PC, but unfortunately not on my hosting ISP. It throws a security exception due to the unchangable medium trust level configured by my hosting provider. Thanks Igor