Grault
Blazor WASM: Injecting a service
I'm trying to inject a service to extract details (dimensions, so far) of the browser. The code for the service is from https://blazor.tips/blazor-how-to-ready-window-dimensions/ .
The service is registered in the Client project's Program.cs:
Obviously the service needs to be entirely on the client, so the component which consumes it has:
When I run the project and open the page which contains the component, I receive:
>InvalidOperationException: Cannot provide a value for property 'Browser' on type 'Quilt.Client.Components.Sheet'. There is no registered service of type 'Quilt.Client.Utilities.BrowserService'.
Is some of the component running on the server? Why?
22 replies
NetMQ: SendFrame never sends, never returns.
(I'm posting this here because I haven't found a ZeroMQ community. If you're aware of one, I'd appreciate a link.)
(I have marked the question Beginner within the context of ZeroMQ; the problem really has little to do with C# or .Net.)
I'm attempting to upgrade a .Net Framework 4.0 project to .Net Core. (The previous, working version of the project uses clrzmq.) So far I've managed to get it all working properly except the ZeroMQ aspect.
The product consists of a C# WPF application and a C++ (Windows) console application (driver). For now, I am only upgrading the WPF application to .Net Core; the driver may follow later.
My problem is that the WPF app is supposed to contact the driver. The connection is apparently set up properly but then when I attempt to send a message the SendFrame method never returns and the driver never receives the message. I also haven't managed to find the message in Wireshark, but I'm a novice with that tool.
I have produced a minimal test case which does not fail in the way that the WPF application does. That test case consists of a client and server both written in C# with NetMQ.
I don't have any ideas left for why this might be happening. I guess my next thing to try is to build the minimal server in C++. Help, please?
5 replies