|
Does DotNetAge 2 support hosting environments running in Medium Trust? I'm getting some Security Exceptions (my guess is about reading the machine.config information):
---- [SecurityException]: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) at System.Security.CodeAccessPermission.Demand() at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForRead(String streamName) at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName, Boolean assertPermissions) at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName) at System.Configuration.Internal.DelegatingConfigHost.OpenStreamForRead(String streamName) at System.Configuration.UpdateConfigHost.OpenStreamForRead(String streamName) at System.Configuration.BaseConfigurationRecord.InitConfigFromFile() [ConfigurationErrorsException]: An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (machine.config) at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal) at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors) at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams) at System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams) at System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle) at DNA.Mvc.DnaConfig.get_Configuration() at DNA.Mvc.DnaConfig.get_DnaHash() at DNA.Mvc.DnaRuntimeHealth.Check(Boolean httpAvailable) at DNA.Mvc.DnaConfig.get_IsNeedInstallCheck() at DNA.Mvc.Bootstrapper.RegisterGlobalFilters(GlobalFilterCollection filters) at DNA.Mvc.WebApp.Application_Start() [HttpException]: An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (machine.config) at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) [HttpException]: An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (machine.config) at System.Web.HttpRuntime.FirstRequestInit(HttpContext context) at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) ---- The system is ASP.NET 4.0 shared hosting, in medium trust, with a few added permissions (http://www.testingcode.org/blog/2011/04/overzicht-aangepaste-medium-trust-configuratie/ in Dutch) : WebPermission : Unrestricted=”true” OleDbPermission: Unrestricted=”true” OdbcPermission : Unrestricted=”true” ReflectionPermission : Flags=”RestrictedMemberAccess” FileIOPermission : Read=”$AppDir$” PathDiscovery=”$AppDir$” Write=”$AppDir$” Append=”$AppDir$” Thanks in advance for more inofrmation about this. Kind regards, Jan Reilink, VEVIDA Services (the Netherlands) |