title: how can i change my application trust level to medium level?
body: <p>I bought an hosting provides medium trust level. And i try to make a web site. i couldn't make it work in my host location. </p>
  
  <p>I change the trust level in the iis manager. I deploy the project and tried again but none of them is working. </p>
  
  <p>I tried <code>&lt;trust level="Medium" originUrl=""/&gt;</code> and it is not working.
  Also i tried that. </p>
  
  <pre><code>&lt;location allowOverride=”true”&gt;
  &lt;system.web&gt;
  &lt;securityPolicy&gt;
  &lt;trustLevel name=”Medium” policyFile=”web_mediumtrust.config” /&gt;
  &lt;/securityPolicy&gt;
  &lt;/system.web&gt;
  &lt;/location&gt;
  </code></pre>
  
  <p>This is working in my local but not working in hosting.</p>
  
  <p>This is the problem i have.</p>
  
  <pre><code>[SecurityException: Request failed.]
     System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +96
     System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +80
     System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +288
     System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, RuntimeAssembly asm, SecurityAction action) +70
     System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
     System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +70
     System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark&amp; stackMark) +40
     System.Type.GetType(String typeName) +30
     System.CodeDom.Compiler.CompilerInfo.get_IsCodeDomProviderTypeValid() +12
     System.Web.Compilation.CompilationUtil.GetRecompilationHash(CompilationSection ps) +2045
     System.Web.Configuration.CompilationSection.get_RecompilationHash() +107
     System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDateInternal(Int64 cachedHash) +458
     System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate(Int64 cachedHash) +51
     System.Web.Compilation.BuildManager.ExecutePreAppStart() +135
     System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +549
  
  </code></pre>
  
  <p>I don't know what i change in here. I change my iis trust level to medium. And working. So what else can i do to fix this? please help me!</p>