Re: ASP.NET Medium Trust Level, and passing mixed parameters to C# functions
- From: "Andy" <anedza@xxxxxxxxxxxxxxxxxxxxxx>
- Date: 21 Dec 2006 09:43:40 -0800
Here's what I found out:
Medium Trust is a default security policy Microsoft ships with its .NET
framework that is intentionally designed to protect shared web hosting
service providers. The design allows such providers to be confident
that clients cannot defeat their security and drop themselves out of
any imposed settings or constraints.
Part of this trust policy is meant to prevent buffer over-run attacks
(a common hacking technique used to load executible code into unused
memory by passing more data into a variable than the variable can
hold). It enforces code verification and type checking to ensure that
only well-defined fixed length parameter passing occurs between
functions.
The policy also prevents an application from having a mechanisim to
access external resources such as webservices since internal resources
on the providers LAN can also be on the same backbone that their
hosting service is. The URI parameter on the <trust> tag actually
takes a regular expression which is used to match the description of
any piece of equipment or webservice on a network, and passing the
regular expression ".*" could give access to anything (internal
printers, hard drives, etc).
This problem isn't really a bug with the Medium Trust Policy, as much
as it is really an indication that the web application was deployed on
the wrong type of web hosting service architecture.
Most often, people choose shared hosting because it is a less costly
alternative to paying for a dedicated server hosting service. In
between these two extremes is Virtual Personal Server (VPS) hosting
where you get the advantages of full administrative rights to what
appears to be a physical dedicated server while enjoying the cost
advantages gained from a shared hosting enviromnent.
VPS hosting services allow full admin rights because each account runs
in its own emulated server, and it is the server emulations that run in
a shared environment (rather than the end-user programs that are now
running within the server emulations). In effect, each VPS server is a
sandbox for its account, and each account user cannot administer
somebody else's emulated server. This is different from a shared
hosting service where user code awaits to be run on demand within a
single gigantic shared resource environment.
VPS has been available for UNIX based hosting for more than 10 years.
But, only recently has VPS started to become available for Windows
hosting environments.
Although a VPS server can be a software emulation of a pentium class
computer, it is usually a physical server that is assigned to a fixed
handful of customers. The processor time on the server is time sliced
across the clients, and the drive space is partitioned with real
harddrive partitions. Most VPS servers are always running, so there
aren't usually any timeout restrictions impossed on the user accounts.
With todays RAID technology, and multi-processor servers, a lot of
customers can share the cost of a single dedicated physical server
bringing the price point for VPS very close to what plain shared
hosting offers.
.
- References:
- Prev by Date: SslStream.AuthenticateAsClient is slow (calling the RemoteCertificateValidationCallback)
- Next by Date: Re: SslStream.AuthenticateAsClient is slow (calling the RemoteCertificateValidationCallback)
- Previous by thread: ASP.NET Medium Trust Level, and passing mixed parameters to C# functions
- Next by thread: Re: Recognising user by their Network login
- Index(es):
Relevant Pages
|