© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago
alex

ASPNET Sessions

i have a aspnet backend and a react frontend. I'm trying to make a session when a request is made to any of the api endpoints which saves in cookies so that I can store data into that users session but I'm not having any luck doing this. Any help would be great

I first learnt php so I'm basically trying to do the same thing as what PHP does when you use start_session or $_SESSION


Startup.cs
https://pastebin.com/qNqgAVAg

Headers

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Thu, 28 Mar 2024 01:35:32 GMT
Server: Kestrel
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://localhost:3000
Transfer-Encoding: chunked
Vary: Origin
Pastebin
using Microsoft.AspNetCore.Builder;using Microsoft.AspNetCore.Hosti...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Aspnet Instrumentation OTEL Filters
C#CC# / help
9mo ago
✅ aspnet core not recognizing images
C#CC# / help
3y ago
Authenticate with AspNet.Security.OAuth.Spotify
C#CC# / help
2y ago
✅ Hybrid MultiTenancy with aspnet and efcore
C#CC# / help
2y ago