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

Ninject + MVC3 + Medium Trust Environment

Ok, read a lot of questions about this, but really didn't see any solution that works for me... So, any help will be very apreciated. I'm running a MVC3 web application with Ninject installed through nuGet (so i got Ninject version 3.0.1.10).…
Marcelo Myara
  • 2,841
  • 2
  • 27
  • 36
0
votes
2 answers

Unable To Edit AppSetting In Web.Config In Medium Trust?

I am trying to update an appSetting in the web.config in an MVC3 app running in medium trust. It fails as soon as I try to call? var config = WebConfigurationManager.OpenWebConfiguration("~"); Tried other variations but they all seem to throw this…
YodasMyDad
  • 9,248
  • 24
  • 76
  • 121
0
votes
2 answers

nHibernate 3.3.1 System.Security.Permissions.ReflectionPermission Error

I am trying to get my web application written in ASP.NET 4.0 working locally using medium trust. I'm using Go Daddy as web host and they use medium trust on their shared hosts. I've read that nHibernate now works with Medium Trust sites out of the…
0
votes
1 answer

Asp Classic with ADODB needs to migrate to Medium Trust

I have a very large project written largely in ASP classic. It uses ADODB (recordsets mostly) in several thousand files. It is mandatory to move the project to Medium trust, although that can be customized. Attempting to load the ADODB.dll under…
0
votes
1 answer

examine site search with umbraco 4.7 and medium trust

I'm trying to use umbraco examine for the site search. It works fine on the development machine, however, on the shared host, the indexes are not being built. the shared host uses medium trust. I've tried doing the steps mentioned here:…
user560498
  • 537
  • 1
  • 16
  • 25
0
votes
3 answers

db4o running in asp.net Medium Trust environment

I am using the embedded client/server version of db4o (I called OpenServer() instead of OpenFile() method) so that I can host an asp.net website that will have several users reading and writing to the database simultaneously. The only issue is that…
bbqchickenrobot
  • 3,592
  • 3
  • 45
  • 67
0
votes
0 answers

EF4 mvc .net 4 medium trust MetadataException

I have an MVC .NET 4.0 web application which is using an EF4 Entity Model (database generated). In full trust all works ok, but in medium trust this exception is thrown when code is trying to access a model; Schema specified is not valid. Errors:…
jaap
  • 373
  • 6
  • 15
0
votes
3 answers

NonPublic causing a permissions error in reflection on medium trust

I must say that so far, I've probably just been darn lucky in that I've never come across the problems associated with a web site running in medium trust. I've only ever developed intranet apps or happened to have use a hosting company that runs in…
Rob Nicholson
  • 1,943
  • 5
  • 22
  • 37
0
votes
1 answer

Linq to SQL with medium trust level

I used Linq to SQL in an ASP.NET app that I now need to deploy on a server. Unfortunately, the hosting sever can only offer a medium level trust. My app crashes not having permission of type ReflectionPermission. Is there a way to edit my queries to…
morsanu
  • 975
  • 20
  • 35
-1
votes
1 answer

Security Exception with medium trust, ninject and entity framework

I keep getting this exception whenever I try running my project in medium trust. The project is MVC Forum, and even though I don't need to run any of my own sites in medium trust, I figure I better make it work in the medium trust environment…
Steen Tøttrup
  • 3,755
  • 2
  • 22
  • 36
1 2 3
9
10