Natro
Explore posts from serversJob scheduling: Quartz vs Hangfire vs ?
Hey,
I am going to be implementing a service which has multiple triggers - e.g. api, chain jobs, cron.
I am currently deciding between Hangfire and Quartz.
I am noticing that Quartz has a bit more boilerplate code in my opinion with JobStore, etc. compared to Hangfire. So setup is much more easier. Additionally, Hangfire has UI for monitoring.
Is there something that Quartz can do and Hangfire can't? And the other way around?
Which solution does the community prefer and why? (Is there maybe some other solution that I haven't looked into?)
1 replies
Streaming 3D content to frontend
Hey,
I started a side project where the endgoal is streaming 3D gltf object to frontend and render a 3D city in web via WebGL.
I am using a dataset in so-called CityGML format which can be transformed into gltf models.
This transformation should be deterministic, so I should be able to do it once and then save those objects. Any ideas or tips on what I should look into when storing and streaming this kind of data?
I suppose I am just going to end up with postgres (with postgis) database that based on coordinates gets these files and then sends it to frontend. (Planning to send so-called "3d tiles" which are basically chunks of the city) But maybe there are some technologies I don't know about 🙂
1 replies
Receiving 400 on production, local env works fine
Hey,
I have same ASP.NET Core app running both on my localhost and on production (docker).
The only difference between the two are environment variables (aspnet env - release for prod and development for localhost).
When I run following powershell to call one of my endpoints:
The localhost goes through and production throws:
This is how my controller looks:
Any ideas why this is happening?
19 replies
ngrok - How to listen on webhook requests locally (docker)?
Hey,
I have ASP.NET app that is listening on Slack webhook requests.
How can I debug this locally? I know there is this thing called tunnels which exists in Visual Studio.
This is my Dockerfile:
My dockerfile:
6 replies
Migrating to Microsoft.IdentityModel.JsonWebTokens .net6 => .net8
Hi,
I am migrating a project which uses Duende as identity server + Ocelot gateway from .NET 6 to .NET 8.
In Ocelot AuthorizationMiddleware project uses JWT subclaims and tries to access them like this:
I noticed that after migrating I was receiving error when authenticating users regarding Signature
{"IDX10500: Signature validation failed. No security keys were provided to validate the signature."}
.
Stack overflow hinted me to removing System.IdentityModel.Tokens.Jwt
package and moving to Microsoft.IdentityModel.JsonWebTokens
as there has been breaking change in aspnet core.
https://github.com/dotnet/aspnetcore/issues/52075#issuecomment-1815025177
...2 replies
How to debug webhook locally (docker)?
Hey,
I have a ASP.NET Core application running through docker-compose. I am wondering if there is a way to test webhooks locally.
I am trying to integrate with clerk.com webhooks.
My initial idea is to add nginx into my docker-compose and sign a certificate. Is that a viable solution or is there something easier and quicker?
5 replies
Repo pattern - is it okay to call one repo from multiple services?
Hi,
pretty much the title summarizes it all.
In one code base I am refactoring I am seeing a lot of calling from multiple services classes to one repository - most likely to bypass circular dependencies.
Is it a good practice? Why yes? Why not?
I usually try to keep calls between services to make sure business logic is checked at all times.
17 replies
No error log - app quits (async problem?)
Hey,
I am working on an app that has multiple background workers:
StepOne works correctly, in StepTwo I am calling OpenAI API via this NuGet (https://github.com/OkGoDoIt/OpenAI-API-dotnet).
On this line my app (Console application) just turns off - no error log, nothing.
So I tried doing try-catch block - nothing.
I debugged and figured out problem is here (L133):
https://github.com/OkGoDoIt/OpenAI-API-dotnet/blob/5f7c23a928be39da87e89d5105a044ecb7401727/OpenAI_API/EndpointBase.cs#L133
It's being called with following:
Seems to be correct (calling other endpoint with same NuGet - e.g. chat completion works)
I cloned the repo, put try-catch block around that line - still nothing.
When trying to debug the HttpClient method my debugger is just jumping all around place without sense.
I guess I would have to get the code of HttpClient locally and do it like that - but at that point I am wondering.
Anyone has idea why this is happening? I expect it's because of how I use Tasks?
I am clueless here, not getting any output or error anywhere :/
19 replies
What's correct unit testing?
In codebase I am working on some devs are writing unit tests that test Controller level - tests if endpoint returns 200 for example. They mock repository/DAL layer and ignore service layer.
Wouldn't the correct thing to do be just mock the service layer and then test service layer functions separately and mock repo layer in that test?
25 replies
✅ EF Json column - object reference not set to an instance of an object
Hey, I am trying to get JSON columns work with EF.
When creating my initial migration I am met with:
Object reference not set to an instance of an object
Migration only fails when I include Adress part of Store.
Any ideas what could be the issue?12 replies
✅ .NET 7 with Visual Studio 2019
Hello,
I have licenses for Visual Studio 2019 and so far I have been working on old solutions using .NET Framework.
I am in need of .NET 7 - I was looking at Microsoft pages but it says that .NET 7 SDK is only for Visual Studio 2022. What now?
3 replies
❔ ✅ Applying math to programming
Hi,
this is not necessarily a C# question and more question towards math and programming. I am using C# as my language so I hope it's okay to ask this here.
I have always been struggling with applying math equations and so on to programming and I am finally tackling this mental block I have and trying to force myself to learn more.
I have a 2 dimensional array (grid) of 0 or 1 (which size is set dynamically)
I would like to use
x^4 + y^4 = 1
to fill it out.
https://www.wolframalpha.com/input?i=x%5E4+%2B+y%5E4+%3D+1
How can I draw this shape in it?
I would also like to go beyond and how could I fill it out or reverse fill it out in my grid?
Just a small pointer on how to use math to achieve some different result would help help so much.
Thank you.
Example (With bigger size edges would be smoother):
11 replies
Cookies not being set on localhost
Hi!
I am setting my cookie on my ASP.NET Core backend:
I am running
create-react-app
on my frontend and I am receiving this cookie in response in the headers. The problem is that the cookie is not being set into cookies when inspecting it in browser and is also not being sent in next API requests.
Frontend: http://localhost:3001/login
- where request is being sent from
Backend: http://localhost:39500/account/login
- API
I tried several settings for the cookie, playing with SameSite and Secure but nothing seems to be working?
How can I make cookies work when working on localhost?58 replies