-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesuntriaged
Milestone
Description
Hi, we have a hard-to-reproduce issue and are struggling to find a solution. We serve pages using a custom implementation of the IFileProvider
and IFileInfo
. On rare occasions, a page request will get a 500 response, and we can find this Exception/StackTrace in our logs:
System.ArgumentNullException: Value cannot be null. (Parameter 'type')
at System.ArgumentNullException.Throw(String paramName)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.CompiledPageActionDescriptorFactory.CreateCompiledDescriptor(PageActionDescriptor actionDescriptor, CompiledViewDescriptor viewDescriptor)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageLoader.LoadAsyncCore(PageActionDescriptor actionDescriptor, EndpointMetadataCollection endpointMetadata)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageLoaderMatcherPolicy.ApplyAsyncAwaited(PageLoader pageLoader, CandidateSet candidates, Task`1 actionDescriptorTask, Int32 index)
at Microsoft.AspNetCore.Routing.Matching.DfaMatcher.SelectEndpointWithPoliciesAsync(HttpContext httpContext, IEndpointSelectorPolicy[] policies, CandidateSet candidateSet)
at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatch|10_1(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task matchTask)
Once a page gets this error, every user requesting the same page will get this error. At the moment, we can only resolve this by restarting the server. Nothing seems to be wrong with the Razor page, as a server restart always resolves the issue.
Is there anything about how we provide a page to the file provider that can result in this exception?
viliusvig, janleons and SondreVestrheim
Metadata
Metadata
Assignees
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesuntriaged