access denied

Topics: General
Jan 8, 2012 at 11:02 PM

im getting this error after uploading code ...(exporting from VS locally then ftp to website)

 

it worries me that the eventual (and only?) reference to a directory is the dev environment? d:/.../../

 

cess is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) 

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. 

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace: 

[UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))]
   System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
   System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) +49
   System.Data.SqlServerCe.UnmanagedLibraryHelper..ctor(String fileName) +76
   System.Data.SqlServerCe.NativeMethodsHelper..ctor(String modulePath) +27
   System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(String modulePath) +281
   System.Data.SqlServerCe.NativeMethods.LoadNativeBinariesFromPrivateFolder(String privateInstall) +76
   System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries() +225
   System.Data.SqlServerCe.SqlCeCommand..ctor() +65

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
   NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type) +8
   NHibernate.Driver.ReflectionBasedDriver.CreateCommand() +28
   NHibernate.Driver.SqlServerCeDriver.Configure(IDictionary`2 settings) +99
   Orchard.Data.Providers.OrchardSqlServerCeDriver.Configure(IDictionary`2 settings) in D:\Orchard_Repository\src\Orchard\Data\Providers\SqlCeDataServicesProvider.cs:77
   NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings) +158

[HibernateException: Could not create the driver from Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver, Orchard.Framework, Version=1.3.10.0, Culture=neutral, PublicKeyToken=null.]
   NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings) +241
   NHibernate.Connection.ConnectionProvider.Configure(IDictionary`2 settings) +86
   NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary`2 settings) +351
   NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary`2 properties) +953
   NHibernate.Cfg.Configuration.BuildSettings() +17
   NHibernate.Cfg.Configuration.BuildSessionFactory() +44
   Orchard.Data.SessionFactoryHolder.BuildSessionFactory() in D:\Orchard_Repository\src\Orchard\Data\SessionFactoryHolder.cs:83
   Orchard.Data.SessionFactoryHolder.GetSessionFactory() in D:\Orchard_Repository\src\Orchard\Data\SessionFactoryHolder.cs:61
   Orchard.Data.SessionLocator.For(Type entityType) in D:\Orchard_Repository\src\Orchard\Data\SessionLocator.cs:29
   Orchard.Data.Repository`1.get_Session() in D:\Orchard_Repository\src\Orchard\Data\Repository.cs:26
   Orchard.Data.Repository`1.get_Table() in D:\Orchard_Repository\src\Orchard\Data\Repository.cs:30
   Orchard.Data.Repository`1.Fetch(Expression`1 predicate) in D:\Orchard_Repository\src\Orchard\Data\Repository.cs:126
   Orchard.Data.Repository`1.Get(Expression`1 predicate) in D:\Orchard_Repository\src\Orchard\Data\Repository.cs:91
   Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1 predicate) in D:\Orchard_Repository\src\Orchard\Data\Repository.cs:60
   Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord() in D:\Orchard_Repository\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:57
   Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor() in D:\Orchard_Repository\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:30
   Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings) in D:\Orchard_Repository\src\Orchard\Environment\ShellBuilders\ShellContextFactory.cs:66
   Orchard.Environment.DefaultOrchardHost.CreateShellContext(ShellSettings settings) in D:\Orchard_Repository\src\Orchard\Environment\DefaultOrchardHost.cs:168
   Orchard.Environment.DefaultOrchardHost.CreateAndActivateShells() in D:\Orchard_Repository\src\Orchard\Environment\DefaultOrchardHost.cs:132
   Orchard.Environment.DefaultOrchardHost.BuildCurrent() in D:\Orchard_Repository\src\Orchard\Environment\DefaultOrchardHost.cs:103
   Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.Initialize() in D:\Orchard_Repository\src\Orchard\Environment\DefaultOrchardHost.cs:67
   Orchard.Web.MvcApplication.HostInitialization(HttpApplication application) in D:\Orchard_Repository\src\Orchard.Web\Global.asax.cs:48
   Orchard.WarmupStarter.<>c__DisplayClass3.<LaunchStartupThread>b__2(Object state) in D:\Orchard_Repository\src\Orchard.Startup\Starter.cs:89

[ApplicationException: Error during application initialization]
   Orchard.WarmupStarter.Starter`1.OnBeginRequest(HttpApplication application) in D:\Orchard_Repository\src\Orchard.Startup\Starter.cs:63
   Orchard.Web.MvcApplication.Application_BeginRequest() in D:\Orchard_Repository\src\Orchard.Web\Global.asax.cs:29

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +335
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
   System.Web.Util.ArglessEventHandlerProxy.Callback(Object sender, EventArgs e) +57
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Coordinator
Jan 9, 2012 at 1:25 AM
Edited Jan 9, 2012 at 1:26 AM

It means the ASP.NET process doesn't have write access to app_data, most likely.

(and those paths you see only indicate what path the code was on when it was built, you can ignore that as it has zero impact on runtime).

Jan 9, 2012 at 7:44 AM

thank you...yeah got onto the providor and all sorted