Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nilay 3 posts 84 karma points
    1 week ago
    Nilay
    0

    Value cannot be null. (Parameter 'source')

    I have setup Umbraco 10 website on hosting and getting below error. It works fine on local

    ArgumentNullException: Value cannot be null. (Parameter 'source')
    System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
    
    ArgumentNullException: Value cannot be null. (Parameter 'source')
    System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
    System.Linq.Enumerable.OfType<TResult>(IEnumerable source)
    Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionDescriptorProvider..ctor(IEnumerable<IPageRouteModelProvider> pageRouteModelProviders, IOptions<MvcOptions> mvcOptionsAccessor, IOptions<RazorPagesOptions> pagesOptionsAccessor)
    System.RuntimeMethodHandle.InvokeMethod(object target, ref Span<object> arguments, Signature sig, bool constructor, bool wrapExceptions)
    System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
    Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
    System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey key, Func<TKey, TValue> valueFactory)
    Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
    Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
    Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
    Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<T>(IServiceProvider provider)
    Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.GetOrCreateDataSource(IEndpointRouteBuilder endpoints)
    Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapControllerRoute(IEndpointRouteBuilder endpoints, string name, string pattern, object defaults, object constraints, object dataTokens)
    Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapAreaControllerRoute(IEndpointRouteBuilder endpoints, string name, string areaName, string pattern, object defaults, object constraints, object dataTokens)
    Umbraco.Extensions.EndpointRouteBuilderExtensions.MapUmbracoRoute(IEndpointRouteBuilder endpoints, Type controllerType, string rootSegment, string areaName, string prefixPathSegment, string defaultAction, bool includeControllerNameInRoute, object constraints)
    Umbraco.Cms.Web.BackOffice.Install.InstallAreaRoutes.CreateRoutes(IEndpointRouteBuilder endpoints)
    Umbraco.Extensions.UmbracoApplicationBuilderExtensions.UseInstallerEndpoints(IUmbracoEndpointBuilderContext app)
    Premneo.Website.Startup+<>c.<Configure>b__4_2(IUmbracoEndpointBuilderContext u) in Startup.cs
    Umbraco.Cms.Web.Common.ApplicationBuilder.UmbracoApplicationBuilder+<>c__DisplayClass17_0.<WithEndpoints>b__0(IEndpointRouteBuilder endpoints)
    Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseEndpoints(IApplicationBuilder builder, Action<IEndpointRouteBuilder> configure)
    Umbraco.Cms.Web.Common.ApplicationBuilder.UmbracoApplicationBuilder.WithEndpoints(Action<IUmbracoEndpointBuilderContext> configureUmbraco)
    Premneo.Website.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in Startup.cs
    System.RuntimeMethodHandle.InvokeMethod(object target, ref Span<object> arguments, Signature sig, bool constructor, bool wrapExceptions)
    System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
    Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(object instance, IApplicationBuilder builder)
    Microsoft.AspNetCore.Hosting.ConfigureBuilder+<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
    Microsoft.AspNetCore.Hosting.GenericWebHostBuilder+<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app)
    Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter+<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
    Microsoft.AspNetCore.Server.IIS.Core.IISServerSetupFilter+<>c__DisplayClass2_0.<Configure>b__0(IApplicationBuilder app)
    Microsoft.AspNetCore.HostFilteringStartupFilter+<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
    Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
    Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
    Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
    Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
    Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
    Premneo.Website.Program.Main(string[] args) in Program.cs
    
  • Andrew 44 posts 216 karma points
    1 week ago
    Andrew
    0

    I'm getting the same error with site deployed to Elastic Beanstalk. (Works fine localy)

  • Isabelle Santin 2 posts 72 karma points
    1 week ago
    Isabelle Santin
    0

    Same here, not sure what's going on...

  • Sebastiaan Janssen 5002 posts 15248 karma points MVP admin hq
    1 week ago
    Sebastiaan Janssen
    100

    This usually indicates that the server you're deploying to is running an outdated version of .NET 6, we require .NET 6.0.5 to be running at least - you can ask your hosting provider to do an upgrade to the latest patch.

    To make matters more confusing, .NET 6.0.5 is included in .NET SDK 6.0.300. We highly recommend SDK 6.0.301 however (including .NET 6.0.6) because it contains a security patch.

  • Nilay 3 posts 84 karma points
    1 week ago
    Nilay
    0

    Let me check with hosting

    Thanks

  • Andrew 44 posts 216 karma points
    1 week ago
    Andrew
    0

    Hi Sebastiaan,

    I was pretty sure that was the cause of the problem but I'm not sure how to resolve it in Elastic Beanstalk.

    From what I see, 6.0.6 is supported, but I haven't figured out how to ensure/force it to use 6.0.6

    https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platform-history-dotnetlinux.html

    Update: inside the EB "machine", dotnet --info says only 6.0.1 is available

  • Isabelle Santin 2 posts 72 karma points
    1 week ago
    Isabelle Santin
    0

    Checking this out and seeing if a standalone deployment can do the trick. Thanks for the insight!

  • Nilay 3 posts 84 karma points
    1 week ago
    Nilay
    1

    After upgrading .net core version it works

    Thanks Sebastiaan

Please Sign in or register to post replies

Write your reply to:

Draft