Asp.Net MVC Project in Medium-Trust

Asked

Viewed 1,498 times

3

I have a project on 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 publishing the application, even by changing Web.config to Medium-Trust the application does not work. I believe it is some DLL that requests some service that is not possible to be accessed in Medium-Trust.

As a precaution, I changed all the DLL references to Copy Local = true, but it still hasn’t worked.

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

  • 1

    I went through exactly this problem at Locaweb and had no way. I had to downgrade to MVC 4, with Framework 4.0 and replace Ninject with Autofac.

  • Opa @Leandroangelo can turn your comment into a reply giving a little more details please? I would like to understand this alternative a little better...

  • Do you still need the same thing? A free service? That’s your question?

  • @durtto my question is if there is any alternative to make the Asp.Net MVC project work on a Medium-Trust server, even if you have to use MVC 4 or something like that as commented the Leandroangelo

1 answer

2

I’ll translate that reply.

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

  • We are automatically solving all Trust-related bugs Medium reported to us as "will not solve".
  • We provide guidance to hosters that they should migrate from average confidence and proper use isolation level OS instead (http://support.microsoft.com/kb/2698981).

  • We are removing support for the average confidence of frames that we develop (MVC, Webapi, Signalr, and so on). From here to front, the applications built in these structures will require confidence total.

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

Edit 26 May 2015: O . NET Framework as a whole has overridden partial trust, and customers 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 basic website with a bank of up to 20Mb for free. (user comment Renatto Machado)

  • Speaking of Windows Azure, how do you get free and permanent hosting? since the site informs that it can only do free evaluation by 30 of.

  • It is not possible to use in this way that reports. Microsoft offers services and products that must be paid for. There is no escape no.

  • Take a look at this https://appharbor.com/pricing service, there are a lot of people talking about it. I think you have a free plan. What is the purpose of its application? Study or commercial?

  • Look what I found: http://answall.com/questions/6222/hospedando-site-no-windows-azure-de-graca

  • I want to put my website on Windows Azure for personal use only.

  • I also had seen this Link, but I didn’t want to interfere because it could go wrong and generate a charge for you

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.