RobertGee
RobertGee
CC#
Created by RobertGee on 12/13/2024 in #help
Identity Server 4 403 Error
Trying to follow this course and sometimes Identity server works sometimes it does not.
builder.Services.ConfigureApplicationCookie(opt =>
{
// Remove same site due to http
opt.Cookie.SameSite = SameSiteMode.Lax;
});
builder.Services.ConfigureApplicationCookie(opt =>
{
// Remove same site due to http
opt.Cookie.SameSite = SameSiteMode.Lax;
});
The above I was told to configure to allow Http to work.
{
"profiles": {
"SelfHost": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:5000"
}
}
}
{
"profiles": {
"SelfHost": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:5000"
}
}
}
As you can see above I am using http://localhost:5000 but a 403 appears on launchBrowser. Really nothing has been changed from default Identity Server 4. Only logs:
[16:58:32 Information] Microsoft.Hosting.Lifetime
Now listening on: http://localhost:5000

[16:58:32 Information] Microsoft.Hosting.Lifetime
Application started. Press Ctrl+C to shut down.

[16:58:32 Information] Microsoft.Hosting.Lifetime
Hosting environment: Development

[16:58:32 Information] Microsoft.Hosting.Lifetime
Content root path: /Volumes/Crucial X9 Pro For Mac/Programming/demo/Carsties/src/IdentityService
[16:58:32 Information] Microsoft.Hosting.Lifetime
Now listening on: http://localhost:5000

[16:58:32 Information] Microsoft.Hosting.Lifetime
Application started. Press Ctrl+C to shut down.

[16:58:32 Information] Microsoft.Hosting.Lifetime
Hosting environment: Development

[16:58:32 Information] Microsoft.Hosting.Lifetime
Content root path: /Volumes/Crucial X9 Pro For Mac/Programming/demo/Carsties/src/IdentityService
3 replies
CC#
Created by RobertGee on 12/9/2024 in #help
Anyone use Neovim and has it working for dotnet?
I cannot get some things working such as razor .cshtml working and all solutions are quite old. Is it possible to easily get this working or is it worth for dotnet using an ide like jetbrains... (macos)
12 replies
CC#
Created by RobertGee on 7/23/2024 in #help
✅ Rider Program does not contain Static Main
Program does not contain a static 'Main' method suitable for an entry point Program.Helper.cs
using System.Globalization;

partial class Program
{
private static void ConfigureConsole(string culture = "en-US", bool useComputerCulture = false)
{
OutputEncoding = System.Text.Encoding.UTF8;

if(!useComputerCulture) CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo(culture);

WriteLine($"Current Culture: {CultureInfo.CurrentCulture.DisplayName}");
}

private static void WriteLineInColor(string value, ConsoleColor color = ConsoleColor.White)
{
ConsoleColor previousColor = ForegroundColor;
ForegroundColor = color;
WriteLine(value);
ForegroundColor = previousColor;
}
}
using System.Globalization;

partial class Program
{
private static void ConfigureConsole(string culture = "en-US", bool useComputerCulture = false)
{
OutputEncoding = System.Text.Encoding.UTF8;

if(!useComputerCulture) CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo(culture);

WriteLine($"Current Culture: {CultureInfo.CurrentCulture.DisplayName}");
}

private static void WriteLineInColor(string value, ConsoleColor color = ConsoleColor.White)
{
ConsoleColor previousColor = ForegroundColor;
ForegroundColor = color;
WriteLine(value);
ForegroundColor = previousColor;
}
}
My Program.cs is empty
66 replies
CC#
Created by RobertGee on 7/21/2024 in #help
Unsure of why i get cert errors, can anyone run this project with docker?
having issues forking / cloning this project and running it with the docker https://github.com/aspnetrun/run-aspnetcore-microservices Most images are failing due to HTTPS certs failing Not sure if i have done this wrong?
6 replies