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
0
votes
1 answer

Google OAuth 2.0 in .NET4 fails to create ServiceAccount on medium trust level server

I would like to read some calendar events inside a .NET4.0 web service. Because no user is involved I used a service account authorization method. It works perfectly on my local machine. But when I want to install it on the hosting server I get…
0
votes
1 answer

Can GhostScript run in Medium Trust?

I am using GhostScript to generate some thumbnails of PDF pages in an ASP.NET application. I have it wrapped in this library called GhostScriptSharp that just uses DllImport to call methods in the GhostScript DLL. It looks like this wont work on a…
John B
  • 20,062
  • 35
  • 120
  • 170
0
votes
2 answers

Entity Framework - Medium Trust

I'm trying to get the entity framework working in medium trust. I've tried splitting the files and using a separate assembly but I seem to have one problem after another. I moved the EDMX to a separate assembly, which causes a single .dll to be…
Echilon
  • 10,064
  • 33
  • 131
  • 217
0
votes
1 answer

Should OutputCacheProfiles (in webconfig) be accessible under a medium trust environment?

I'm trying to use DevTrends Donut Caching in an MVC app in a shared hosting environment. When I upload the app I get this error: System.Security.SecurityException: MvcDonutCaching does not have permission to read web.config section…
Martin Hansen Lennox
  • 2,837
  • 2
  • 23
  • 64
0
votes
2 answers

Subsonic 3.1 when is it likely?

I have a project built around Subsonic 3.0.0.3 and have run into the dreaded medium trust issue, can anyone tell me is there a way I can mod the code myself to get this working or what the expected timescale for 3.1 version is? Its looking…
Mike
  • 1
0
votes
1 answer

Create AppDomain in restricted security environment

In .net4 the AppDomain.Create methods are marked with the SecuritySafeCritical attribute. When these methods are invoked inside an environment with medium trust level a SecurityException is thrown (or am I wrong?) How can I create another AppDomain…
Thanasis Ioannidis
  • 2,981
  • 1
  • 30
  • 50
0
votes
1 answer

Moving from Castle Windsor to an IoC that runs under Medium Trust

I've inherited a project which was running on a host who had set up Full Trust, as this is required for the Castle Windsor IoC. The new host, however, will only run in Medium Trust (as do most shared hosting providers), so I need to replace Windsor…
ingredient_15939
  • 3,022
  • 7
  • 35
  • 55
0
votes
1 answer

Run Umbraco 6.x in Medium Trust / Shared hosting environment

I have a Umbraco 6.1.5 project, and i want to deploy it to a shared hosting environment. I read that Umbraco 6 can run in Medium Trust, but i cant find much more info than just that one sentence. And, in the web.config i found this setting:…
Tys
  • 3,592
  • 9
  • 49
  • 71
0
votes
1 answer

Allowing partially trusted callers security exception is been thrown althought running on Full trust mode

While developing using ASP.net 2.0 (C#) and NHibernate 2.1.0 I am getting the error: System.TypeInitializationException: The type initializer for 'NHibernate.ByteCode.LinFu.ProxyFactory' threw an exception. ---> System.Security.SecurityException:…
Tal
  • 422
  • 3
  • 13
0
votes
3 answers

Lucene.NET in medium trust

How do I make Lucene.NET 2.3.2 run in a medium trust environment? GoDaddy doesn't like it the way it is.
Prabhu
  • 12,995
  • 33
  • 127
  • 210
0
votes
1 answer

Where can I download Ninject with Medium Trust for ASP .NET 4.5

My site is working good on my local. but on Godady server it is throwing Method Access Exception : I found this article. Ninject error on deployment So Now I found that Godady allows medium Trust of Ninject instead of Full trust. So my question is…
Inder
  • 29
  • 2
  • 9
0
votes
3 answers

Subtext install gives error in Medium trust level

I am trying to install Subtext in a medium trust level environment (host: Crystaltech) and am getting the following error (see below). I was able to do the administration setup but when it tries to go to the blog for actual use, boom. I know I…
Craig
  • 11,614
  • 13
  • 44
  • 62
0
votes
1 answer

asp.net 1.0 website that is getting a 'does not allow partially trusted callers' error during sendmail

I have an old asp.net 1.0 website that throws an error during the sending of email. The error: Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers. Is there a way to fix this without…
mrblah
  • 99,669
  • 140
  • 310
  • 420
0
votes
1 answer

How to prevent InvalidOperationException with XmlDataSource in medium trust for the same domain

I'm using an XmlDataSource to fetch an RSS feed on the same domain. Ever since my ISP moved to medium trust, that code is failing with a System.InvalidOperationException. Is there a way to fix this?
Martin Plante
  • 4,553
  • 3
  • 33
  • 45
0
votes
1 answer

trust medium in asp.net mvc

When i try to run my project in trust medium or high it says [PolicyException: Required permissions cannot be acquired.] [FileLoadException: Could not load file or assembly but i'm running all the assemblies in bin only.
Santhosh
  • 19,616
  • 22
  • 63
  • 74
1 2 3
9
10