MvcCodeRouting was working fine for months. Suddenly it started to throw this error:
Assembly 'MvcCodeRouting, Version=220.127.116.11, Culture=neutral, PublicKeyToken=bf7cf9743009fe42' is partially trusted, which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself. In order to access
security critical code, this assembly must be fully trusted.
System.MethodAccessException: Attempt by security transparent method 'MvcCodeRouting.Web.Mvc.MvcControllerInfo.Create
(System.Type, MvcCodeRouting.RegisterSettings, MvcCodeRouting.CodeRoutingProvider)' to
access security critical method 'System.Runtime.Serialization.FormatterServices.GetUninitializedObject(System.Type)
I found this article from microsoft:
Using Libraries from Partially Trusted Code
It's not clear to me what really happened.
I think my host provider just enabled some security stuff.
It seems to me that you have to flag your assembly for use in "medium trust" context.
"There is no programmatic way for partially trusted code to call a library that does not have the AllowPartiallyTrustedCallersAttribute attribute."
Is that right?
How can I fix this?
Thanks in advance.