heloo
heloo
CC#
Created by heloo on 5/5/2024 in #help
Cookies help Dotnet webapi
Iam using dotnet webapi trying to set cookies in browser the request returns 200 but the cookies arent getting set CookieOptions cookOpt = new() { HttpOnly = true, Expires = refresh.ExpiresAt, SameSite = Microsoft.AspNetCore.Http.SameSiteMode.Strict, Secure = true, }; _httpContext.HttpContext?.Response.Cookies.Append("refreshToken", refresh.Token, cookOpt); Console.WriteLine("set"); here is my set cookie method
27 replies
CC#
Created by heloo on 2/12/2024 in #help
SignalR sending wont send custom headers
try{ const conn = new HubConnectionBuilder() .withUrl("http://localhost:4000/chat", { accessTokenFactory: () => { console.log(token) return token }, withCredentials: true, headers:{ "test":"test" } }) .configureLogging(LogLevel.Information).build()

await conn.start();
const re = await conn.invoke("CreateChatRoom", "num", id); console.log(re) }catch(e){ console.log(e) } _httpContext.HttpContext.Request.Headers.ToList().ForEach(e => Console.WriteLine(e)); i wont get the custom or auth headers on the server
27 replies
CC#
Created by heloo on 7/13/2023 in #help
EF Error SQLite Error 1: 'no such table: __EFMigrationsHistory'. when i run dotnet ef databas update
iam using linux and vs code .Net 7 was following this tutorial https://www.youtube.com/watch?v=PDiRDNNc2tw&t=394s and ran into this issue
23 replies