Orchard website Uploading error via ftp

Topics: Installing Orchard
Jun 23, 2011 at 5:52 AM
Edited Jun 23, 2011 at 5:56 AM

Hi Guys Pls can somebody help me with the problem that i am facing with the uploding the website to our dev server.The error that i am getting is as follows.



Server Error in '/' Application.

Access to the path 'C:\NewWebSites\dev.advertisers.pureprofile.com\App_Data\Dependencies\Orchard.Media.dll' is denied.

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 to the path 'C:\NewWebSites\dev.advertisers.pureprofile.com\App_Data\Dependencies\Orchard.Media.dll' is denied.

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 to the path 'C:\NewWebSites\dev.advertisers.pureprofile.com\App_Data\Dependencies\Orchard.Media.dll' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9726046
   System.IO.File.Delete(String path) +9563972
   Orchard.FileSystems.AppData.AppDataFolder.MakeDestinationFileNameAvailable(String destinationFileName) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\FileSystems\AppData\AppDataFolder.cs:79

[OrchardCoreException: Unable to make room for file "C:\NewWebSites\dev.advertisers.pureprofile.com\App_Data\Dependencies\Orchard.Media.dll" in "App_Data" folder]
   Orchard.FileSystems.AppData.AppDataFolder.MakeDestinationFileNameAvailable(String destinationFileName) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\FileSystems\AppData\AppDataFolder.cs:82
   Orchard.FileSystems.AppData.AppDataFolder.DeleteFile(String path) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\FileSystems\AppData\AppDataFolder.cs:145
   Orchard.FileSystems.Dependencies.DefaultAssemblyProbingFolder.DeleteAssembly(String moduleName) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\FileSystems\Dependencies\DefaultAssemblyProbingFolder.cs:53
   Orchard.Environment.Extensions.Loaders.<>c__DisplayClass11.<ExtensionDeactivated>b__f() in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\Extensions\Loaders\PrecompiledExtensionLoader.cs:91
   Orchard.Environment.Extensions.ExtensionLoaderCoordinator.ProcessContextCommands(ExtensionLoadingContext ctx) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\Extensions\ExtensionLoaderCoordinator.cs:360
   Orchard.Environment.Extensions.ExtensionLoaderCoordinator.SetupExtensions() in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\Extensions\ExtensionLoaderCoordinator.cs:74
   Orchard.Environment.DefaultOrchardHost.BuildCurrent() in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\DefaultOrchardHost.cs:95
   Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.Initialize() in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\DefaultOrchardHost.cs:64
   Orchard.Web.MvcApplication.HostInitialization(HttpApplication application) in d:\TeamCity\Projects\Orchard-Default\src\Orchard.Web\Global.asax.cs:48
   Orchard.WarmupStarter.<>c__DisplayClass3.<LaunchStartupThread>b__2(Object state) in d:\TeamCity\Projects\Orchard-Default\src\Orchard.Startup\Starter.cs:89

[ApplicationException: Error during application initialization]
   Orchard.WarmupStarter.Starter`1.OnBeginRequest(HttpApplication application) in d:\TeamCity\Projects\Orchard-Default\src\Orchard.Startup\Starter.cs:63
   Orchard.Web.MvcApplication.Application_BeginRequest() in d:\TeamCity\Projects\Orchard-Default\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
Jun 23, 2011 at 7:08 AM

You should check under what user is your AppDomain configured to run. it might be that the user from the AppDomain does not have access to that specific folder.

Are you running off of Orchard.Web or did you compile for Orchard.Source?

Jun 23, 2011 at 7:20 AM

i just used to run my orchard web site on localcopy by clicking the run button on the webmatrix interface i created an admin acc and its password there are no problems while running this site on local copy.can u explain me how do u configure the user from appdomain so that he has appropriate permissions.i am new to orchard so pls help me regarding this issue.

Thanks for your response.


Jun 23, 2011 at 12:24 PM

Do you have access to IIS or is it hosted with a 3rd party?

Jun 23, 2011 at 12:56 PM

@randompete It's on their dev server. They should have full control

@rohanvb chekout this article for setting the app pool identity on iis7 http://technet.microsoft.com/en-us/library/cc771170%28WS.10%29.aspx. Sorry I said AppDomain there, I meant App Pool.

Jun 23, 2011 at 2:22 PM

By default IIS pretends to be a user called "IIS APPPOOL\{AppPoolName}" - you don't necessarily need to change it, just grant the appropriate file permissions to that user.

Nov 15, 2011 at 1:23 PM

i have the same error and  my hosting says that i must get a web server for this.