Asp.Net MVC Project in Medium-Trust

3

I have a project in Asp.Net MVC using .NET Framework 4.5, but my host is shared and has a security policy that only allows Medium-Trust (save Locaweb).

When you publish the application, even if you change the Web.config to Medium-Trust, the application does not work. I believe it is some DLL that requests some service that can not be accessed in Medium-Trust.

As a precaution I changed all the reference DLLs to Copy Local = true , but it still has not worked.

Is there any way to make it work the way it is?

    
asked by anonymous 10.11.2015 / 11:43

1 answer

2

I'll translate this response .

The official position of the ASP.NET team is that the average trust is obsolete. This means that some things:

  • We are automatically solving all related bugs-Trust Medium reported to us as "will not resolve".
  • We provide guidelines for hosters that they should migrate from Medium Confidence and Proper Usage Level Usage Isolation ( link ).

  • We are removing the medium trust support from frames that we develop (MVC, WebAPI, SignalR, and so on). From here to front, the applications built on these structures will require total.

Here, the term "average trust" above refers to all non-complete trust settings in ASP.NET, including the use of built-in trust levels (Minimal, Low, Medium, High) or any levels confidence.

Edit May 26, 2015: The .NET Framework as a whole has deprecated partial trust, and clients are advised not to trust it as a security limit. From MSDN:

You also have the option to use azure, you can even host a free basic web site with a bank up to 20Mb. (user comment Renatto Machado )

    
10.11.2015 / 12:01