Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Helix Install Issue - Permissions on serialization folder

Having a problem on a fresh Habitat setup... followed all steps, publish projects etc, but now I'm getting this error:

Access to the path '$(sourceFolder)\feature\accounts\serialization' is denied.

I've tried setting permissions on that folder, giving Everyone full access, but it doesn't make a difference.

Using latest version as of yesterday. Sitecore was working fine before publishing foundation projects. Have not yet run Unicorn Sync.

Any suggestions?

Here's the full error:

Access to the path '$(sourceFolder)\feature\accounts\serialization' 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 '$(sourceFolder)\feature\accounts\serialization' 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 File 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: 


Line 103:    public Job StartRebuildAnalyticsIndexJob()
Line 104:    {
Line 105:      var options = new Sitecore.Jobs.JobOptions("Rebuild analytics index", "Indexing job", "shell", this, "RebuildAnalyticsIndex");
Line 106:      return Sitecore.Jobs.JobManager.Start(options);
Line 107:    }

Source File: C:\DATA\Latrobe.Sc\git\sitecore\src\foundation\Installer\code\MongoRestore\MongoRestoreService.cs    Line: 105 

Stack Trace: 


[UnauthorizedAccessException: Access to the path '$(sourceFolder)\feature\accounts\serialization' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +419
   System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost) +1438
   System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost) +73
   Rainbow.Storage.SerializationFileSystemDataStore.InitializeRootPath(String rootPath) +313
   Rainbow.Storage.SerializationFileSystemDataStore..ctor(String physicalRootPath, Boolean useDataCache, ITreeRootFactory rootFactory, ISerializationFormatter formatter) +233
   lambda_method(Closure , Object[] ) +246
   Unicorn.Configuration.MicroConfiguration.Activate(Type type, KeyValuePair`2[] unmappedConstructorParameters) +826
   Unicorn.Configuration.<>c__DisplayClass7_0`1.<RegisterExpectedConfigType>b__2() +38
   System.Lazy`1.CreateValue() +709
   System.Lazy`1.LazyInitValue() +191
   Unicorn.Data.ConfigurationDataStore.RegisterForChanges(Action`2 actionOnChange) +19
   Unicorn.Data.DataProvider.UnicornDataProvider..ctor(ITargetDataStore targetDataStore, ISourceDataStore sourceDataStore, IPredicate predicate, IFieldFilter fieldFilter, IUnicornDataProviderLogger logger, IUnicornDataProviderConfiguration dataProviderConfiguration, ISyncConfiguration syncConfiguration, PredicateRootPathResolver rootPathResolver) +547
   lambda_method(Closure , Object[] ) +391
   Unicorn.Configuration.MicroConfiguration.Activate(Type type, KeyValuePair`2[] unmappedConstructorParameters) +826
   Unicorn.Configuration.MicroConfiguration.Resolve() +118
   System.Linq.WhereSelectArrayIterator`2.MoveNext() +102
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +148
   System.Linq.Enumerable.ToArray(IEnumerable`1 source) +106
   Unicorn.Data.DataProvider.UnicornSqlServerDataProvider..ctor(String connectionString) +232

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +329
   Sitecore.Reflection.ReflectionUtil.CreateObject(Type type, Object[] parameters) +119
   Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) +119
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +165
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert) +72
   Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert) +619
   Sitecore.Configuration.DefaultFactory.CreateFromReference(XmlNode configNode, String[] parameters, Boolean assert) +170
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +118
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert) +72
   Sitecore.Configuration.DefaultFactory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) +932
   Sitecore.Configuration.DefaultFactory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +560
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +322
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert) +72
   Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert) +619
   Sitecore.Configuration.DefaultFactory.GetDatabase(String name, Boolean assert) +157
   Sitecore.Configuration.DefaultFactory.GetDatabase(String name) +55
   Sitecore.Configuration.DefaultFactory.GetDatabases() +121
   Sitecore.Data.Managers.LanguageProvider.InitializeEventHandlers() +73
   Sitecore.Data.Managers.LanguageProvider..ctor() +225
   Sitecore.DependencyInjection.DefaultSitecoreServicesConfigurator.<.cctor>b__a(IServiceProvider p) +31
   Microsoft.Extensions.DependencyInjection.ScopedCallSite.Invoke(ServiceProvider provider) +117
   Microsoft.Extensions.DependencyInjection.ServiceLookup.ConstructorCallSite.Invoke(ServiceProvider provider) +117
   Microsoft.Extensions.DependencyInjection.ScopedCallSite.Invoke(ServiceProvider provider) +117
   Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) +100
   Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider) +59
   System.Lazy`1.CreateValue() +709
   System.Lazy`1.LazyInitValue() +191
   Sitecore.Globalization.Language.TryParse(String name, Language& result) +139
   Sitecore.Globalization.Language.Parse(String name) +63
   Sitecore.Jobs.JobOptions..ctor(String jobName, String category, String siteName, Object obj, String methodName, Object[] parameters) +593
   Sitecore.Jobs.JobOptions..ctor(String jobName, String category, String siteName, Object obj, String methodName) +66
   Sitecore.Foundation.Installer.MongoRestore.MongoRestoreService.StartRebuildAnalyticsIndexJob() in C:\DATA\Latrobe.Sc\git\sitecore\src\foundation\Installer\code\MongoRestore\MongoRestoreService.cs:105
   Sitecore.Foundation.Installer.MongoRestore.MongoRestoreProcessor.Process(PipelineArgs args) in C:\DATA\Latrobe.Sc\git\sitecore\src\foundation\Installer\code\MongoRestore\MongoRestoreProcessor.cs:30
   (Object , Object[] ) +170
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
   Sitecore.Nexus.Web.HttpModule.Application_Start() +259
   Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +704
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +618
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +539
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +125
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +731
like image 769
Jeeby Avatar asked Jan 05 '23 17:01

Jeeby


1 Answers

I had similar issue in my sitecore project. And I was missing below configuration settings.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <sc.variable name="sourceFolder" value="C:\projects\Habitat\src" />   
  </sitecore>
</configuration>

Hope this helps you.

Thanks

like image 193
Rakesh Avatar answered Mar 12 '23 20:03

Rakesh