When you are hosting your application in a shared hosting environment, you need to think about the trust levels that you need to set for your application.
Apart from the security to your web application and the files ASP.NET provides, trust levels are those, which are used to sucure the files and application in the hosting environment. The trust levels are set in the web.config file and can be set at machine, site and application levels.
What is Trust?
The application runtime, can be set to configure trust levels, which are used to contrain what an application can do. That is, if an application is running on full trust, it means, it allows the native code to execute, can look at a process, to find or corrupt or delete data from other applications. A trust level of minimum means, its a highly restrictive and a full trust means, there are no restrictions at all. The default trust level for asp.net applications is full trust.
In a full trust level application, its even possible to walk through the directories, retrieve a listing of files in specified folder outside of the root where the code executes.
With medium trust level, asp.net places a number of restrictions on the application. The application file access is restricted within the virtual directory where the application resides.
Trust level specification in web.config
<trust level="[Full|High|Medium|Low|Minimal]" originUrl="URL"processRequestInApplicationTrust = "[True|False]" />
For more information on trust level check this link:
trust element (ASP.NET Settings Schema)