Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

published code breaking in IIS #898

Open
4pawan opened this issue Nov 25, 2022 · 0 comments
Open

published code breaking in IIS #898

4pawan opened this issue Nov 25, 2022 · 0 comments

Comments

@4pawan
Copy link

4pawan commented Nov 25, 2022

Describe the bug
Site works fine when running in Visual studio port but when i published code in new folder and pointed to IIS. we get below errors.
A clear and concise description of what the bug is.

fail: EPiServer.Framework.Initialization.InitializationEngine[0]
Initialize action failed for 'Initialize on class EPiServer.Forms.EditView.InitializationModule, EPiServer.Forms.UI, Version=5.3.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
System.ArgumentException: Unable to find a module by assembly 'EPiServer.Forms, Version=5.3.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' (Parameter 'moduleAssembly')
at EPiServer.Shell.Paths.ToResource(Assembly moduleAssembly, String moduleRelativeResourcePath)
at EPiServer.Shell.Paths.ToResource(Type typeInModuleAssembly, String moduleRelativeResourcePath)
at EPiServer.Forms.Configuration.EPiServerFormsSection.get_Instance()
at EPiServer.Forms.Configuration.EPiServerFormsConfig.get_SendMessageInHTMLFormat()
at EPiServer.Forms.Implementation.Actors.SendEmailAfterSubmissionActor..ctor()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters) at EPiServer.Forms.Helpers.Internal.FormsExtensions.GetPropertyValue(Type type, String propertyName) at EPiServer.Forms.EditView.InitializationModule.<>c.<GetSubmissionActorTypes>b__31_0(Type t) at System.Linq.Enumerable.WhereArrayIterator1.GetCount(Boolean onlyIfCheap)
at System.Linq.OrderedEnumerable1.GetCount(Boolean onlyIfCheap) at System.Linq.Enumerable.Count[TSource](IEnumerable1 source)
at EPiServer.Forms.EditView.InitializationModule.SetupFormContainerProperties()
at EPiServer.Forms.EditView.InitializationModule.Initialize(InitializationEngine context)
at EPiServer.Framework.Initialization.Internal.ModuleNode.<>c__DisplayClass4_0.b__0()
at EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key)
at EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context)
at EPiServer.Framework.Initialization.InitializationEngine.InitializeModules()
System.ArgumentException: Unable to find a module by assembly 'EPiServer.Forms, Version=5.3.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' (Parameter 'moduleAssembly')
at EPiServer.Shell.Paths.ToResource(Assembly moduleAssembly, String moduleRelativeResourcePath)
at EPiServer.Shell.Paths.ToResource(Type typeInModuleAssembly, String moduleRelativeResourcePath)
at EPiServer.Forms.Configuration.EPiServerFormsSection.get_Instance()
at EPiServer.Forms.Configuration.EPiServerFormsConfig.get_SendMessageInHTMLFormat()
at EPiServer.Forms.Implementation.Actors.SendEmailAfterSubmissionActor..ctor()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters) at EPiServer.Forms.Helpers.Internal.FormsExtensions.GetPropertyValue(Type type, String propertyName) at EPiServer.Forms.EditView.InitializationModule.<>c.<GetSubmissionActorTypes>b__31_0(Type t) at System.Linq.Enumerable.WhereArrayIterator1.GetCount(Boolean onlyIfCheap)
at System.Linq.OrderedEnumerable1.GetCount(Boolean onlyIfCheap) at System.Linq.Enumerable.Count[TSource](IEnumerable1 source)
at EPiServer.Forms.EditView.InitializationModule.SetupFormContainerProperties()
at EPiServer.Forms.EditView.InitializationModule.Initialize(InitializationEngine context)
at EPiServer.Framework.Initialization.Internal.ModuleNode.<>c__DisplayClass4_0.b__0()
at EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key)
at EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context)
at EPiServer.Framework.Initialization.InitializationEngine.InitializeModules()
fail: EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner[0]
Failed to eager compile type Foundation.Features.CatalogContent.DynamicCatalogContent.DynamicVariation.DynamicVariant
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at EPiServer.Commerce.Catalog.DataAnnotations.PositiveNumberAttribute..ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes)
at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
at System.Attribute.GetCustomAttributes(MemberInfo element, Boolean inherit)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.IsPropertyLazy(PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateMakeReadonly(IEnumerable1 properties, MethodInfo baseMethod, MethodBuilder overriddenMethod) at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.OverrideMakeReadOnly(Type contentType, TypeBuilder typeBuilder, IEnumerable1 propertiesToOverride)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateType(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.b__20_0(Type type)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GetOrGenerate(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.IlGeneratedContentDataActivator.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentDataActivatorSelector.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.<>c__DisplayClass27_0.b__2()
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at EPiServer.Commerce.Catalog.DataAnnotations.PositiveNumberAttribute..ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes)
at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
at System.Attribute.GetCustomAttributes(MemberInfo element, Boolean inherit)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.IsPropertyLazy(PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateMakeReadonly(IEnumerable1 properties, MethodInfo baseMethod, MethodBuilder overriddenMethod) at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.OverrideMakeReadOnly(Type contentType, TypeBuilder typeBuilder, IEnumerable1 propertiesToOverride)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateType(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.b__20_0(Type type)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GetOrGenerate(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.IlGeneratedContentDataActivator.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentDataActivatorSelector.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.<>c__DisplayClass27_0.b__2()
fail: EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner[0]
Failed to eager compile type Foundation.Features.CatalogContent.DynamicCatalogContent.DynamicProduct.DynamicProduct
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at EPiServer.Commerce.Catalog.DataAnnotations.ValidUrlAttribute..ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes)
at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
at System.Attribute.GetCustomAttributes(MemberInfo element, Boolean inherit)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.IsPropertyLazy(PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GeneratePropertyGetter(MethodBuilder getMethod, PropertyMapping property, Boolean isPage)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateProperty(TypeBuilder typeBuilder, PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateType(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.b__20_0(Type type)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GetOrGenerate(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.IlGeneratedContentDataActivator.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentDataActivatorSelector.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.<>c__DisplayClass27_0.b__2()
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at EPiServer.Commerce.Catalog.DataAnnotations.ValidUrlAttribute..ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes)
at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
at System.Attribute.GetCustomAttributes(MemberInfo element, Boolean inherit)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.IsPropertyLazy(PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GeneratePropertyGetter(MethodBuilder getMethod, PropertyMapping property, Boolean isPage)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateProperty(TypeBuilder typeBuilder, PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateType(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.b__20_0(Type type)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GetOrGenerate(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.IlGeneratedContentDataActivator.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentDataActivatorSelector.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.<>c__DisplayClass27_0.b__2()
fail: EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner[0]
Failed to eager compile type Foundation.Features.CatalogContent.Bundle.GenericBundle
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at EPiServer.Commerce.Catalog.DataAnnotations.ValidUrlAttribute..ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes)
at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
at System.Attribute.GetCustomAttributes(MemberInfo element, Boolean inherit)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.IsPropertyLazy(PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GeneratePropertyGetter(MethodBuilder getMethod, PropertyMapping property, Boolean isPage)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateProperty(TypeBuilder typeBuilder, PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateType(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.b__20_0(Type type)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GetOrGenerate(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.IlGeneratedContentDataActivator.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentDataActivatorSelector.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.<>c__DisplayClass27_0.b__2()
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at EPiServer.Commerce.Catalog.DataAnnotations.ValidUrlAttribute..ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes)
at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
at System.Attribute.GetCustomAttributes(MemberInfo element, Boolean inherit)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.IsPropertyLazy(PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GeneratePropertyGetter(MethodBuilder getMethod, PropertyMapping property, Boolean isPage)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateProperty(TypeBuilder typeBuilder, PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateType(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.b__20_0(Type type)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GetOrGenerate(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.IlGeneratedContentDataActivator.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentDataActivatorSelector.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.<>c__DisplayClass27_0.b__2()
fail: EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner[0]
Failed to eager compile type Foundation.Features.Blog.BlogListPage.BlogListPage
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Geta.Optimizely.Categories.DataAnnotations.CategoriesAttribute..ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes)
at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
at System.Attribute.GetCustomAttributes(MemberInfo element, Boolean inherit)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.IsPropertyLazy(PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GeneratePropertyGetter(MethodBuilder getMethod, PropertyMapping property, Boolean isPage)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateProperty(TypeBuilder typeBuilder, PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateType(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.b__20_0(Type type)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GetOrGenerate(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.IlGeneratedContentDataActivator.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentDataActivatorSelector.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.<>c__DisplayClass27_0.b__2()
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Geta.Optimizely.Categories.DataAnnotations.CategoriesAttribute..ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1 derivedAttributes)
at System.Attribute.InternalGetCustomAttributes(PropertyInfo element, Type type, Boolean inherit)
at System.Attribute.GetCustomAttributes(MemberInfo element, Boolean inherit)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.IsPropertyLazy(PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GeneratePropertyGetter(MethodBuilder getMethod, PropertyMapping property, Boolean isPage)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateProperty(TypeBuilder typeBuilder, PropertyMapping property)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GenerateType(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.b__20_0(Type type)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelILCompiler.GetOrGenerate(Type contentType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.IlGeneratedContentDataActivator.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentDataActivatorSelector.Create(Type contentDataType)
at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.<>c__DisplayClass27_0.b__2()

To Reproduce
Steps to reproduce the behavior:

  1. Open solution in Visual studio 2022.
  2. Right Click on project and publish to a temporary folder.
  3. Create a new Site in IIS and point to this new folder.
  4. Verify and see error as above metioned.

Expected behavior
Site should open without any exception.

Desktop (please complete the following information):

  • OS: [e.g. windows 10 ]
  • Browser [e.g. chrome]
  • Version [e.g. 22]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant