views:

29

answers:

1

Could any body simply tell me what Medium Trust level is ?

And what does it mean :

"More and more ASP.NET hosting providers are enforcing a Medium Trust Policy on their servers.Therefore it is important to make your website work (as much as possible) in environments where medium trust is enforced."

Thanks

+1  A: 

To put this simply there are features of the .NET framework that won't work in Medium Trust such as P/Invoke, no access to the Windows Registry and the Windows Event Log. And also you can access files only in the current directory. You can read more about ASP.NET Code Access Security on MSDN. Here's a nice table from the article:

alt text

Darin Dimitrov
@Darin : The point is that , I don't get it what's medium trust ? What's that and why is that ?
Mostafa
It is to ensure that an ASP.NET application cannot perform certain tasks which could be useful for example in shared hosting scenarios where your application is not the only one running and thus it cannot have full control of this server. For example if your application had full trusted and was running under an account with elevated privileges you could delete other applications on the server.
Darin Dimitrov