Skip to main content
0 votes
0 answers
7 views

ASP.NET Core Authentication cookie expires

I have a Blazor 7 WebAssembly app with the following code for the Auth cookie in Program.cs: builder.Services.AddAuthentication(opts => { opts.DefaultAuthenticateScheme = ...
MikeT's user avatar
  • 2,691
0 votes
0 answers
15 views

how to retrieve information from identity token in blazor

I'm creating a Blazor Server app where I call an API from one of my ASP.NET services that handles authentication using Identity. The service correctly returns the response DTO: tokenType": "...
Manuel Enzo's user avatar
0 votes
1 answer
33 views

Best practice for return value for a Login method [closed]

I have this Login method in my AccountController. I return a LoginResponseDTO when the user successfully logs in. However, if the authentication fails, I'm not sure what's best to return. Right now I ...
CoderForHire's user avatar
1 vote
1 answer
18 views

In ASP.NET Core OpenIdConnect authentication, how can I keep the cookie state in sync with the ID token?

In ASP.NET Core docs, the following code is used as an example of setting up the OIDC authentication: builder.Services.AddAuthentication(options => { options.DefaultScheme = ...
Parsa99's user avatar
  • 503
2 votes
2 answers
83 views

EF Core temporal table on owned entity

I have an EF Core defined table, and a child entity that is configured using OwnsOne without using a secondary table. The properties of the child entity are stored in the same table as the parent ...
Mark Lisoway's user avatar
0 votes
0 answers
27 views

How do I integrate Caddyfile with ASP.NET Core 9 with Angular application to set https on local environment?

I have an ASP.NET Core application with Angular. This is how I created my project: mkdir <solution_name> cd <solution_name> dotnet new sln --name <solution_name> mkdir src cd src ...
Hoang Minh's user avatar
  • 1,262
1 vote
1 answer
70 views

I have problem to save new data in database using EF Core in ASP.NET Core

I want to create a test website for recording a company's information. After running the software and entering three data entries, everything goes well. However, after registering the fourth data ...
Abozar Nazari Zohan's user avatar
1 vote
0 answers
41 views

SeriLog DI changed in .NET 8 with DiagnosticContext needing a logger injected

In my ASP.NET Core 8.0 Web API, I ran into an runtime issue with Serilog and DiagnosticContext. My previously working config is as follows: public static WebApplicationBuilder AddLogging(this ...
Chaos's user avatar
  • 139
0 votes
1 answer
32 views

Umbraco - BeginUmbracoForm posting to the wrong controller

I cannot work out why BeginUmbracoForm is generating a form that posts back to the wrong controller. I figure this is due to data within the hidden upfrt field but I cannot find a solution or really ...
monkeySeeMonkeyDo's user avatar
0 votes
0 answers
24 views

AddDataAnnotationsLocalization does not work

I would like to translate the validation messages into Italian, to do so I added this call to this method on the mvc builder, the problem is that it doesn't work, the messages remain in English. ...
Simone Ancona's user avatar
2 votes
2 answers
111 views

Comma as number decimal separator in GET-call not working

I have an ASP.NET Core 8 web with culture set to "sv-SE". In this web there's a regular form where an input decimal is submitted. The input decimal is displayed correctly with a comma as the ...
HischT's user avatar
  • 973
0 votes
0 answers
9 views

How to treat RazorLight templates as Razor views at build-time for validation, but use RazorLight at runtime?

I'm working on an ASP.NET clean architecture project that uses Azure Functions to send emails. The email templates are stored in Services/EmailService/Template/ with each template using @model to bind ...
2gblue's user avatar
  • 1
0 votes
2 answers
53 views

Why does one ASP.NET Core route use a slash (/) for parameters while another uses a query string (?)?

Program.cs app.MapControllerRoute( name: "index", pattern: "{controller=Home}/{action=Index}/{id?}" ); app.MapControllerRoute( name: "read", pattern: &...
Arshia's user avatar
  • 13
-2 votes
1 answer
35 views

Trying to teach myself some .Net Core and ran into a problem with an HTML Form [closed]

When the page renders the text of my submit control shows up in the textarea above it and I don't have the Submit button. Probably a simple issue if I was more used to front end coding. Is something ...
pchancey's user avatar
-4 votes
0 answers
89 views

Sending Email in .NET [closed]

Originally, our software used SmtpClient to send emails. Then one day, for reasons I don't fully understand, this stopped working reliably. So then we moved to MailKit.Net.Smtp, and that worked ...
Jonathan Wood's user avatar

15 30 50 per page
1
2 3 4 5
5688