Tim
Tim
Explore posts from servers
CC#
Created by Tim on 9/8/2024 in #help
Which package for asp.net middleware
I want to write my own middleware for asp.net as a class library but I cannot access HttpContext, RequestDelegate or IApplicationBuilder. Which package do I have to add to use those classes and interfaces?
9 replies
CC#
Created by Tim on 8/18/2024 in #help
Authenticate with AspNet.Security.OAuth.Spotify
I have the following code with the AspNet.Security.OAuth.Spotify-Package but I have no idea where the user should authenticate in the end - what is the endpoint for that?
c#
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages();
builder.Services.AddAuthentication().AddSpotify(options =>
{
options.ClientId = "";
options.ClientSecret = "";
options.SaveTokens = true;
options.CallbackPath = "/auth/callback";

var scopes = new List<string>
{
"user-library-read",
"playlist-read-private",
"playlist-read-collaborative",
"playlist-modify-private",
"playlist-modify-public"
};
options.Scope.Add(String.Join(",", scopes));
});

var app = builder.Build();
app.MapRazorPages();
app.UseAuthentication();
app.UseAuthorization();

app.Run();
c#
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages();
builder.Services.AddAuthentication().AddSpotify(options =>
{
options.ClientId = "";
options.ClientSecret = "";
options.SaveTokens = true;
options.CallbackPath = "/auth/callback";

var scopes = new List<string>
{
"user-library-read",
"playlist-read-private",
"playlist-read-collaborative",
"playlist-modify-private",
"playlist-modify-public"
};
options.Scope.Add(String.Join(",", scopes));
});

var app = builder.Build();
app.MapRazorPages();
app.UseAuthentication();
app.UseAuthorization();

app.Run();
64 replies
CC#
Created by Tim on 8/17/2024 in #help
✅ WireGuard Wrapper
Is there a good WireGuard wrapper for Linux (connect, disconnect, generate public key etc)?
10 replies
CC#
Created by Tim on 10/14/2023 in #help
✅ .NET Runtime on ARMv5
Is there a way to run .NET-Applications on an ARMv5 (in my case an EV3)?
27 replies
CC#
Created by Tim on 9/28/2023 in #help
❔ C# Scripting
Is there something like https://github.com/kscripting/kscript but for C#?
11 replies
CC#
Created by Tim on 9/26/2023 in #help
❔ Portable DotNet SDK
Is there any way to install the DotNet SDK (+ Runtime) on an USB-Stick?
31 replies
CC#
Created by Tim on 9/9/2023 in #help
❔ Blazor Client Side: Get Query-Parameters
Is there any way to get the Query-Parameters with Blazor Client Side?
9 replies
CC#
Created by Tim on 4/4/2023 in #help
❔ WebSocketSharp: Identify WebSocket-Session
Is there a way in WebSocketSharp to identify the session by smth like an id in the OnMessage- and OnClose-Event?
4 replies
CC#
Created by Tim on 3/10/2023 in #help
❔ NU1301 - Oracle VM
Does anyone have an idea why I get the error /src/NetcupPromotions.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json. when I run dotnet restore "NetcupPromotions.csproj" in a Dockerfile? The whole thing is running on an Oracle Cloud VM, maybe it's the firewall there or something?
2 replies
CC#
Created by Tim on 10/21/2022 in #help
Cant connect to Redis Database
Any idea, why I cant connect to my local Redis database? When I try to connect via redis cli, it works. https://haste.devcord.club/kigopamura.cs
19 replies
CC#
Created by Tim on 10/21/2022 in #help
System.Text.Json.Serialize returns emtpy map
Hey! 👋 Any idea, why my System.Text.Json-Serialize returns an empty map? response = new Response(404, "Endpoint not found"); JsonSerializer.Serialize(response) Response-Class: https://haste.devcord.club/tonasutapi.cs
3 replies
CC#
Created by Tim on 10/20/2022 in #help
StackExchange.Redis RedisJSON
Hey! 👋 any idea, how I can use RedisJSON(https://redis.io/docs/stack/json/) with StackExchange.Redis(https://stackexchange.github.io/StackExchange.Redis/)?
2 replies
CC#
Created by Tim on 10/19/2022 in #help
C Sharp Monorepo
Hey guys 👋 I want to create an Monorepo for my C# Backend and Frontend (Blazor). Any idea, how can I create such an Monorepo?
41 replies