By default, Web applications and any assemblies they call on the local computer are granted full trust by code access security policy. The default <trust> configuration in Machine.config assigns the full trust level to all Web applications, as follows :
<trust level="Full" originUrl="" />
With full trust, Web applications are not constrained in any way by code access security policy. The success or failure of resource access is determined purely by operating system security.
Task To test file I/O with no code access security constraints
Use Notepad to create a text file called Somefile.txt that contains a simple text string, and then place the file in the C:\temp directory. Also place a copy in the root C:\ directory.
Run the Web application and click Read File .
The contents of the text file are displayed.
Enter c:\somefile.txt in the text box and click Read File .
The contents of the text file are displayed.