Medium trust installation.

Topics: Installing Orchard
Sep 20, 2012 at 3:38 PM

Hi Guys,

Firstly I just want to say a big thank you to all the developers, mods and users who have contributed to this code base and made it as great as it is.

I am having trouble performing a new install on our medium trust enviroment.

I am using .NET4 integrated pipeline mode and have applied the correct permissions to the app_data and media folders, but still i am getting an error. If someone could shed somelight on the issue that would be fantastic.

Here is the error that's been thrown:

[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
   System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31
   System.Security.CodeAccessPermission.Demand() +46
   System.Web.Hosting.HostingEnvironment.MapPath(VirtualPath virtualPath) +72
   Orchard.FileSystems.AppData.AppDataFolderRoot.get_RootFolder() in IAppDataFolderRoot.cs:25
   Orchard.FileSystems.AppData.AppDataFolder.CombineToPhysicalPath(String[] paths) in AppDataFolder.cs:91
   Orchard.FileSystems.AppData.AppDataFolder.CreateDirectory(String path) in AppDataFolder.cs:187
   Orchard.FileSystems.Dependencies.DefaultDependenciesFolder.<LoadDescriptors>b__3(AcquireContext`1 ctx) in DefaultDependenciesFolder.cs:38
   Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in Cache.cs:57
   Orchard.Caching.<>c__DisplayClass2.<Get>b__0(TKey k) in Cache.cs:19
   System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory) +125
   Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in Cache.cs:17
   Orchard.Caching.DefaultCacheManager.Get(TKey key, Func`2 acquire) in DefaultCacheManager.cs:33
   Orchard.FileSystems.Dependencies.DefaultDependenciesFolder.LoadDescriptors() in DefaultDependenciesFolder.cs:36
   Orchard.Environment.Extensions.ExtensionLoaderCoordinator.CreateLoadingContext() in ExtensionLoaderCoordinator.cs:196
   Orchard.Environment.Extensions.ExtensionLoaderCoordinator.SetupExtensions() in ExtensionLoaderCoordinator.cs:55
   Orchard.Environment.DefaultOrchardHost.BuildCurrent() in DefaultOrchardHost.cs:102
   Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.Initialize() in DefaultOrchardHost.cs:68
   Orchard.Web.MvcApplication.HostInitialization(HttpApplication application) in Global.asax.cs:48
   Orchard.WarmupStarter.<>c__DisplayClass3.<LaunchStartupThread>b__2(Object state) in Starter.cs:89

Thank you in advance

Jamie

 

Coordinator
Sep 21, 2012 at 8:51 PM

You probably need to ask your hosting company to give write permissions on app_data, modules, media and themes folders.