-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Process.GetCurrentProcess().ProcessName is throwing InvalidOperationException for Blazor Webassembly project #56532
Comments
my simple blazor app repo link : https://github.com/sonupmandal/WebApplication.git |
What would you expect the process name to return when running in the browser sandbox? |
There is an answer from @danroth27 in your previous issue that explains the exception. |
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process Issue DetailsI have created a simple Blazor Webassembly application in which Contents of Counter.razor file
Upon running this application, a browser window opens, when i press click me button, i end up getting this exception. Can someone assist me why i am getting this error ? Is Process.GetCurrentProcess().ProcessName API not supported with Blazor webassembly app ?
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsI have created a simple Blazor Webassembly application in which Contents of Counter.razor file
Upon running this application, a browser window opens, when i press click me button, i end up getting this exception. Can someone assist me why i am getting this error ? Is Process.GetCurrentProcess().ProcessName API not supported with Blazor webassembly app ?
|
Entire |
I have created a simple Blazor Webassembly application in which
Target Framework : .NET Standard 2.1
Contents of Counter.razor file
Upon running this application, a browser window opens, when i press click me button, i end up getting this exception.
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Process has exited or is inaccessible, so the requested information is not available.
System.InvalidOperationException: Process has exited or is inaccessible, so the requested information is not available.
at System.Diagnostics.Process.get_ProcessName () <0x2d34700 + 0x0004a> in :0
at WebApplication1.Pages.Counter.IncrementCount () <0x2d33d80 + 0x0000c> in :0
at Microsoft.AspNetCore.Components.EventCallbackWorkItem.InvokeAsync[T] (System.MulticastDelegate delegate, T arg) <0x2d07e80 + 0x0005e> in :0
at Microsoft.AspNetCore.Components.EventCallbackWorkItem.InvokeAsync (System.Object arg) <0x2d07bc0 + 0x0000a> in :0
at Microsoft.AspNetCore.Components.ComponentBase.Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync (Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, System.Object arg) <0x2d07b28 + 0x0000a> in :0
at Microsoft.AspNetCore.Components.EventCallback.InvokeAsync (System.Object arg) <0x2d076f0 + 0x00040> in :0
at Microsoft.AspNetCore.Components.RenderTree.Renderer.DispatchEventAsync (System.UInt64 eventHandlerId, Microsoft.AspNetCore.Components.RenderTree.EventFieldInfo fieldInfo, System.EventArgs eventArgs) <0x2d06ce0 + 0x000a8> in :0
Can someone assist me why i am getting this error ? Is Process.GetCurrentProcess().ProcessName API not supported with Blazor webassembly app ?
The text was updated successfully, but these errors were encountered: