Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

'RequiredAccess' property specified was not found - cannot run site after upgrade.

Vote:
 

Hi,

I updated my client Episerver CMS site from that was on update 51 to update 82 through nuget console. It updated the dependant core files and everything was installed/updated successfully.

Although, when I try to launch the site I get an error message on the yellow screen stating 'RequiredAccess' property specified was not found. A more detailed error message can be found below. 

[CustomAttributeFormatException: 'RequiredAccess' property specified was not found.]
   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +1853

[CustomAttributeFormatException: 'RequiredAccess' property specified was not found.]
   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +2884
   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit) +212
   EPiServer.Framework.Initialization.<>c.b__37_0(Type t) +32
   System.Linq.WhereEnumerableIterator`1.MoveNext() +123
   System.Linq.d__1`1.MoveNext() +81
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +263
   System.Linq.d__1`1.MoveNext() +75
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +524
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +70
   EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +71
   EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +313
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +230
   EPiServer.Global..ctor() +104
   MyProject.Web.Global..ctor() +43
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\11bcf7dc\29488548\App_global.asax.0.cs:0

[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, StackCrawlMark& stackMark) +138
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +105
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1528
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +191
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +27
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +82
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +300
   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) +579
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712

 

The episerver log isn't showing anything, so I suspect that the eventlogger isn't even intializes before the error occurs.
I tried searching for the property "RequiredAccess" in my solution, but it returns 0 results. 
I tried updating all the packages in the solution to the newest, but still receive the same error. 

Any suggestions?

Best regards,

Christian

#161190
Oct 07, 2016 9:38
Vote:
 

Probably an old dll somewhere that is messing with you. Might be an old Episerver dll, old addon or old third party dll. 

I would start removing all dlls that isn't part of alloy template site of the same version until I found the one...

#161191
Oct 07, 2016 9:53
Vote:
 

Hi Daniel,

Thanks for your input. I tried it but it did not fix it.

I compared all the versions of the relevant .dlls and they were exactly the same as the alloy (which was updated to latest packages through nuget.

Any other suggestions?

BR/

Chris

#162083
Oct 10, 2016 15:48
Vote:
 

My guess is also that there are a something referencing to/depending on an old version of an dll.

I found an old thread with the same exception but with another property that might point you further:
http://world.episerver.com/Forum/Developer-forum/Problems-and-bugs/Thread-Container/2012/9/Error-related-to-PageTypeBuilder-SystemReflectionCustomAttributeFormatException-LongStringSettings-property-specified-was-not-found/

#162110
Oct 11, 2016 10:37
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.