Re: ASP.NET Medium Trust Level, and passing mixed parameters to C# functions



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.

.



Relevant Pages

  • Re: ASP.NET 1.1 app breaks when moved to shared webhosting with medium trust level
    ... Medium Trust is a default security policy Microsoft ships with its .NET ... framework that is intentionally designed to protect shared web hosting ... alternative to paying for a dedicated server hosting service. ... VPS hosting services allow full admin rights because each account runs ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Courtyard arrangement - Jeff Middleton
    ... can do with ISA server publishing and how we interpret the idea of ... Microsoft MVPs ... SBS and hosting ... website or if we just had an ISP for the site, ...
    (microsoft.public.windows.server.sbs)
  • Re: why would squid only start when set to http_port 3128?
    ... squid.conf, I am able to start squid successfully. ... On every other server where I installed squid, ... that this hosting company might have sold me a "dedicated server" and ... setting I can peek at that will tell me whether or not I'm on a VPS ...
    (comp.os.linux.misc)
  • Re: Urgent: Problem setting up web site hosting on SBS03 with ISA
    ... On the other side of the coin, perhaps we can also stipulate that many of these issues can be mitigated by a knowledgable administrator who has the skill and experience to properly configure all aspects of the server. ... port 80 as opposed to the other avenues of attack that SBS presents on the external network, inparticular those that also rely on IIS for their core functions. ... Unless new vulnerabilities in IIS are discovered, hosting static HTML pages is probably fairly safe. ... Its database is kept synchronised to a master Access/SQL database on the customer's premises by means of email. ...
    (microsoft.public.windows.server.sbs)
  • Re: Domain Change
    ... If DYNdns.org is handling your External DNS, have them change this to your new IP of the website. ... >> server has a dynamic IP. ... >>> All you need to do is rent space on a ISP hosting service and FTP ...
    (microsoft.public.backoffice.smallbiz)