+ 1
C# MySQL create sesid
Hi :) My english is still better from day to day :) I make a program where i have to connect with database (i did it), and i know that the best way is using something like session in PHP. I looked for something about this but in C#, and i found HttpContext and it has property "Current". What about this Current, it is always null. I found information about that and it is only in ASP.NET, but i'm not using ASP.NET but WInForms. How can I create this? please help me :)
5 Respuestas
+ 2
I believe that it is better to use specific sql client to connect to db, not the httpclient
https://www.codeproject.com/Articles/823854/How-to-connect-SQL-Database-to-your-Csharp-program
+ 2
I believe that System.web (httpContext is part of it) used to manage connections between user browser to your app, not just http connections, so if there are no user browser sessions will be null. This why I believe it is better to use libraries witch designed to work with db not just some general, If I correct understand that you want to connect to db.
0
But i'm using this... I want to know how to use Session.
0
So?
0
I don't understand what do you mean