2

So I'm currently running a Blazor .NET Core server side App on Azure App Services in a linux based config, the below is my environment

System info
System up time: 5.05:06:19.3920000
OS version: Unix 4.15.0.112
64 bit system: True
64 bit process: True
Processor count: 1
Short instance id: bdcba9
CLR version: 4.0.30319.42000
System directory:
Current working directory: /opt/Kudu
IIS command line: /opt/Kudu/Kudu.Services.Web.dll

It was all running fine yesterday but as of today when I made a minor change to some text and did a re-publish. And suddenly I am now getting a HTTP 500 error with this in the kudu log stream. You can see it crashing when trying to get a cultureinfo with what I presume is an incorrect parameter (GetMethodFromHandle perhaps) Locally its all running fine with no issues and hitting no exceptions even with it set to hit everything/all exception types. There is also nowhere in my app I set CultureInfo or play around with Locale.

2020-09-12T12:07:40.245382681Z: [INFO]  [41m[30mfail[39m[22m[49m: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
2020-09-12T12:07:40.245431982Z: [INFO]        An unhandled exception has occurred while executing the request.
2020-09-12T12:07:40.247771813Z: [INFO]  System.Globalization.CultureNotFoundException: Culture is not supported. (Parameter 'name')
2020-09-12T12:07:40.247802114Z: [INFO]  ethodFromHandle is an invalid culture identifier.
2020-09-12T12:07:40.247876715Z: [INFO]     at System.Globalization.CultureInfo.GetCultureInfo(String name)
2020-09-12T12:07:40.247892415Z: [INFO]     at System.Reflection.RuntimeAssembly.GetLocale()
2020-09-12T12:07:40.247937615Z: [INFO]     at System.Reflection.RuntimeAssembly.GetName(Boolean copiedName)
2020-09-12T12:07:40.247952516Z: [INFO]     at Microsoft.AspNetCore.Mvc.ViewFeatures.ServerComponentSerializer.CreateSerializedServerComponent(ServerComponentInvocationSequence invocationId, Type rootComponent, ParameterView parameters)
2020-09-12T12:07:40.247999016Z: [INFO]     at Microsoft.AspNetCore.Mvc.ViewFeatures.ComponentRenderer.NonPrerenderedServerComponent(HttpContext context, ServerComponentInvocationSequence invocationId, Type type, ParameterView parametersCollection)
2020-09-12T12:07:40.248015117Z: [INFO]     at Microsoft.AspNetCore.Mvc.ViewFeatures.ComponentRenderer.RenderComponentAsync(ViewContext viewContext, Type componentType, RenderMode renderMode, Object parameters)
2020-09-12T12:07:40.248055617Z: [INFO]     at Microsoft.AspNetCore.Mvc.TagHelpers.ComponentTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
2020-09-12T12:07:40.248079317Z: [INFO]     at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count)
2020-09-12T12:07:40.248117818Z: [INFO]     at BHub.Pages.Pages__Host.<ExecuteAsync>b__15_1() in D:\Sites\BHub\BHub\Pages\_Host.cshtml:line 29
2020-09-12T12:07:40.249937843Z: [INFO]     at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
2020-09-12T12:07:40.249974943Z: [INFO]     at BHub.Pages.Pages__Host.ExecuteAsync() in D:\Sites\BHub\BHub\Pages\_Host.cshtml:line 5
2020-09-12T12:07:40.250014644Z: [INFO]     at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
2020-09-12T12:07:40.267442179Z: [INFO]     at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
2020-09-12T12:07:40.267524481Z: [INFO]     at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
2020-09-12T12:07:40.267669083Z: [INFO]     at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
2020-09-12T12:07:40.267711783Z: [INFO]     at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
2020-09-12T12:07:40.267807784Z: [INFO]     at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|29_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

I am not quite sure what's causing this and wondering if anyone else has had anything similar or could shed some light. I understand it gets the culture from the OS but there's been no changes on my end and it was working previously. I'm not sure what I can try as locally it's fine, I'm sort of leaning towards a problem in a Azure App/Linux config but.. hmph

benjay_uk
  • 107
  • 2
  • 8

1 Answers1

2

I wouldn't necessarily call this a solution but I basically noticed that when I was deploying it wasn't restarting the web server after pushing the files like it should do. I removed and re-added this app to the deployment list to get it to start doing this again and voila. It now restarts after deployment and seems to work again.

Updating file (bhublive\System.Runtime.Caching.dll).
Updating file (bhublive\web.config).
Publish Succeeded.
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========
Waiting for Web App to be ready...
Restarting the Web App...
Successfully restarted Web App.
Web App is ready.
benjay_uk
  • 107
  • 2
  • 8