illunix
illunix
CC#
Created by illunix on 12/18/2023 in #help
The target "GetEFProjectMetadata" does not exist in the project.
Hey, I've started working on my proj on mac and I wanted to create migration and I get this weird error, can someone explain to me what it's going on? On windows it normally worked
error MSB4057: The target "GetEFProjectMetadata" does not exist in the project.
error MSB4057: The target "GetEFProjectMetadata" does not exist in the project.
1 replies
CC#
Created by illunix on 9/18/2023 in #help
❔ Error about anti-forgery on production when try hit api endpoint
Hello, when I try hit the endpoint I get this error, when I debug my app I don't get any error like this, but when my app is on kubernetes, I get contains anti-forgery metadata, but a middleware was not found that supports anti-forgery. Configure your application startup by adding app.UseAntiforgery() in the application startup code. If there are calls to app.UseRouting() and app.UseEndpoints(...), the call to app.UseAntiforgery() must go between them. Calls to app.UseAntiforgery() must be placed after calls to app.UseAuthentication() and app.UseAuthorization().
2 replies
CC#
Created by illunix on 7/21/2023 in #help
❔ How to mock HttpClient that is automatically applied in class without IHttpClientFactory
Hello, I have a problem because I don't know how can I mock HttpClient in my tests for StripeClient, I don't use IHttpClientFactory, HttpClient is assigned automatically
public sealed partial class StripeClient : IStripeClient
{
private readonly HttpClient _http;
}
public sealed partial class StripeClient : IStripeClient
{
private readonly HttpClient _http;
}
services.AddHttpClient<IStripeClient, StripeClient>(...)
services.AddHttpClient<IStripeClient, StripeClient>(...)
81 replies