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
2
votes
0 answers

DSOFile and Medium Trust

(C#, ASP.NET 3.5 Environment) I'm using Microsoft's DSOFile.dll for counting the pages in a word document (.doc format). When I deployed my application to a medium trust environment (GoDaddy) I got a security exception. I narrowed my web service…
taosd
  • 21
  • 2
2
votes
0 answers

Using fyiReporting in a medium trust host

Anyone knows if fyiReporting RDL reports require Full trust like RDLC or they can work in Medium trust?
Ariel Popovsky
  • 4,787
  • 2
  • 28
  • 30
2
votes
2 answers

Options for in-process databases under medium trust

I have seen a few different in-process SQL databases for .NET (including one from Microsoft), but either they do not work under medium trust (ASP.NET) or the documentation/websites don't even talk about. What experiences have you had with in-process…
Jason Whitehorn
  • 13,585
  • 9
  • 54
  • 68
2
votes
2 answers

.NET 4.0 Medium Trust Level and MYSQL connection

I have a problem and I think a proper answer will help a lot of people which is having same problem.Because it is a common and not well answered problem. The problem is about "Medium trust level" configuration in IIS.A few months ago I coded my…
2
votes
0 answers

Checking user access permissions to a virtual path in medium trust

If I wanted to check whether the current user has access to a given url in full trust I can use code like this. IPrincipal user = context.User ?? new GenericPrincipal(new GenericIdentity( …
James South
  • 10,147
  • 4
  • 59
  • 115
2
votes
2 answers

Subsonic 3.0 Medium Trust Issue

I'm having an issue with running Subsonic in medium trust and don't know if i'm querying wrong - if there is some part of subsonic 3.0.3 that doesn't like medium trust can someone tell me? Someone else posted somethin similar a while ago and there…
Doug
  • 6,460
  • 5
  • 59
  • 83
2
votes
1 answer

Encrypt and Save the ASP.NET ConnectionString within the web.config using Medium Trust?

I have searched around Google and Stackoverflow but can't seen to come up with a solution for editing the web.config to encrypt and store a SQL Server connection string for an installation script. The link at Accessing the web.config in Medium…
Luke
  • 6,195
  • 11
  • 57
  • 85
2
votes
1 answer

ASP.Net Medium Trust setup

I am trying to configure the IPermission node as part of medium trust. However I am unable to find the valid values list for the PathDiscovery attribute on the node
rams
  • 6,381
  • 8
  • 46
  • 65
2
votes
4 answers

NHibernate 3.3.1 with Medium Trust error

I'm using NHibernate 3.3.1 in medium trust. It throw a Security Exception. In the NHibernate 3.3.1 say that it is compatible with medium trust. Has it any prerequisite?
Patrick Coelho
  • 158
  • 2
  • 14
2
votes
1 answer

Is there any way to do Image Quantization safely and with no Marshalling?

I'm currently using Brendan Tompkins ImageQuantization dll. http://codebetter.com/blogs/brendan.tompkins/archive/2007/06/14/gif-image-color-quantizer-now-with-safe-goodness.aspx But it doesn't run in medium trust in asp.net. Does anyone know of a…
Donny V.
  • 22,248
  • 13
  • 65
  • 79
2
votes
2 answers

LDAP in medium trust

I've have a solution with one website and several projects. The projects all have the AllowPartiallyTrustedCallers attribute and are strongly-named. The site works in full trust. However, after set the trust to medium, I get the…
eych
  • 1,262
  • 2
  • 16
  • 37
2
votes
1 answer

Get NHibernate working on shared hosting with medium trust

A friend made a ASP.NET website work with NHibernate locally on his computer, and on my computer after I downloaded it from a SVN repository. However, we're trying to host it on a shared hosting environment with Medium Trust Level. The server gives…
MarioDS
  • 12,895
  • 15
  • 65
  • 121
2
votes
1 answer

Using Castle Windsor and the NHibernate facility on shared hosting

I'm attempting to use Windsor and NHibernate in a medium trust environment and I'm running up against some problems with permissions. I have read through the other questions on this but I'm using Windsor's NHibernate facility which I haven't seen…
1
vote
1 answer

ReflectionPermission problems when using Ninject 2.2, Fluent NHibernate in a Medium Trust environment

I am using (from Nuget packages) Ninject 2.2 and Fluent NHibernate 1.3 (NHibernate v3.2 under the hood) and I've hit a brick wall. I am using Fluent config to point to my database, mappings etc: var fluentConfig = Fluently.Configure() …
1
vote
4 answers

ASP.NET Using Twitterizer in Medium Trust

Does anyone using the Twitterizer framework have any experience running it in a Medium Trust environment? I keep getting security exceptions... Security Exception Description: The application attempted to perform an operation not allowed by…
Jason
  • 51,583
  • 38
  • 133
  • 185