Questions tagged [medium-trust]

Medium trust is the default trust level in ASP.NET. It prevents applications from accessing shared system resources and eliminates the potential for application interference.

Trust level refers to permissions set in the Web.config file (see ) that dictate what operations can and cannot be performed by Web applications. ASP.NET 3.5 and 4.0 shared hosting servers use the default Medium trust level with the addition of OleDbPermission, OdbcPermission, and a less-restrictive WebPermission.

Applications operating under a Medium trust level have no registry access, no access to the Windows event log, and cannot use ReflectionPermission (but can use Reflection). Such applications can communicate only with a defined range of network addresses and file system access is limited to the application's virtual directory hierarchy.

Using a Medium trust level prevents applications from accessing shared system resources and eliminates the potential for application interference. Adding OleDbPermission and OdbcPermission allows applications to use those data providers to access databases. WebPermission is modified to allow outbound http and https traffic.

145 questions
3
votes
1 answer

Calling internal methods in Medium Trust

I have the requirement to call an internal method of a 3rd party object (I cannot make it public for example). I can do that via reflection. Unfortunately this does not work in ASP.NET Medium trust due to insufficient rights:
Atanas Korchev
  • 30,562
  • 8
  • 59
  • 93
3
votes
0 answers

Using db4o with multiple application instances under medium trust

I recently stumbled over the object database engine db4o which I think looks really interesting. I would like to use it in an ASP.NET MVC application that will be deployed to a shared hosting environment under medium trust. Because of the trust…
Anders Fjeldstad
  • 10,724
  • 2
  • 33
  • 50
3
votes
3 answers

ASP.NET - PDF Component in Medium Trust

Can anyone recommend some ASP.NET-compatible PDF Components that work in a medium trust environment? I read that ITextSharp works well, but coming from ABCPdf and ASPPdf, the thought of compiling the entire PDF in code is very daunting. Ideally I'd…
Nathan Taylor
  • 24,423
  • 19
  • 99
  • 156
3
votes
0 answers

Digital Signing/Decrypting with asymmetric key in medium trust .NET 4.0

I have some files which I would like to sign digitally with my own certificate in ASP:NET. In 3.5 .NET (medium trust) I managed to do this, but when switching to .NET 4.0 in medium trust I have the System.Security…
JJschk
  • 431
  • 3
  • 8
3
votes
0 answers

Ninject and trust level medium

I am trying to host my asp.net mvc 4 web app using hostgator. The problem at hand is the fact that the plan I am using only allows for the medium trust level. My application currently has the Ninject MVC package installed. I have tried using the…
Bob
  • 821
  • 1
  • 17
  • 36
3
votes
1 answer

Any hints on getting Sitefinity CMS to work on medium trust?

We have been using Mosso / The Rackspace Cloud until very recently, but they have suddenly switched to a medium trust model for .NET for newly added sites and will be migrating existing server farms to medium trust shortly We can't get our…
2
votes
1 answer

Possible to run a C++ dll in a medium trust environment?

I have an issue with an open source C++ project that I have been using where when I run it on my development machine (full trust) it works fine. When I deploy it to my hosting environment my site throws the following…
Abe Miessler
  • 82,532
  • 99
  • 305
  • 486
2
votes
3 answers

ASP.NET MVC in Medium Trust

just trying to set up my development environment for ASP.NET MVC, have started a blank ASP.NET MVC project, and have placed the following in my web.config: Running the project then results in the following…
Daniel.S
  • 913
  • 8
  • 8
2
votes
1 answer

Windows Server AppFabric Caching

I'm currently working on a ASP.NET MVC site where we have to run in partial trust. Now I'm facing a problem with connecting to AppFabric when in High Trust. No problems when running in full trust. What Permission do I need in my…
2
votes
4 answers

Problems with MVC Controllers + Dependency Injection (Ninject) in medium trust

I want to use dependency injection in an medium trust environment. To that aim I picked Ninject as Iv been told its light weight. How do I set-up injection into the controllers? When I tried to create a custom controller factory: public class…
Dan
  • 29,100
  • 43
  • 148
  • 207
2
votes
0 answers

SecurityException in Ninject.Web.MVC3 under medium trust even when UseReflectionBasedInjection = true

Possible Duplicate: Ninject model validator causing issues in medium trust I've modified CreateKernel as per other info sources : private static IKernel CreateKernel() { var kernel = new StandardKernel(new NinjectSettings {…
Andrei Rînea
  • 20,288
  • 17
  • 117
  • 166
2
votes
1 answer

ValueInjecter question

After working with AutoMapper I came across ValueInjecter on this site. I am trying it out but I am stuck on what is probably a very simple scenario. But before I dig into the code sample, does anyone know if ValueInjecter works in a Medium-Trust…
NYCChris
  • 649
  • 5
  • 13
2
votes
1 answer

NPOI dll (third party excel writer dll)....System.Security.SecurityException: That assembly does not allow partially trusted callers

I had developed portal on Asp.net mvc framework.I had hosted this site at godaddy hosting.I had a great problem on integrating third party dll i.e. NPOI (excel writer dll).It dispaly following error. Security Exception **Description**: *The…
MikMark
  • 547
  • 1
  • 5
  • 17
2
votes
1 answer

OleDbPermission and ASP.NET medium trust

I'm following this document in order to run my website in a medium trust environment. My web app uses OleDb, so I need to give it permission in medium trust. I've done everything that is in that article and it's still not working :( In my…
vtortola
  • 34,709
  • 29
  • 161
  • 263
2
votes
0 answers

ASP.NET Trust Level other than Full

Background My company hired a security firm to assess our website. One of their recommendations was to run the site under minimal trust. I believe this will be too restrictive, but I would like to use a trust level that is more secure that full…
Mark Good
  • 4,271
  • 2
  • 31
  • 43
1 2
3
9 10