title: Why does my .net application require full trust?
body: <p>I've developed a .net 3.0 application, which is deployed using clickonce.</p>
  
  <p>I'd like to move from full trust to partial trust to ease deployment.</p>
  
  <p>I've tried the "Calculate Permissions" tool in the "Security" tab of my project under visual studio, and the answer is quite clear :</p>
  
  <pre><code>---------------------------
  Microsoft Visual Studio
  ---------------------------
  This application requires full trust to run correctly.
  </code></pre>
  
  <p>However, I've not been able to figure out why full trust is required. I've tried to change the security settings to "partial trust", but the application raises a SecurityException immediately upon launch : </p>
  
  <pre><code>System.Security.SecurityException   {"Request failed.", Action= "System.Security.Permissions.SecurityAction.LinkDemand"
     at MyNameSpace.Program.Main(String[] args)
     at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
     at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
     at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
     at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
     at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
     at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
     at System.Activator.CreateInstance(ActivationContext activationContext)
     at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
     at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
     at System.Threading.ExecutionContext.runTryCode(Object userData)
     at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.ThreadHelper.ThreadStart()
  </code></pre>
  
  <p>My software probably doesn't need full trust (I only connect to a webserver using https, and access the filesystem only upon user request, for importation/exportation purposes)</p>
  
  <p>How can I figure out why my application requires full trust?</p>