joecool2005 Posted August 29, 2019 Share Posted August 29, 2019 Hi, I have a sessionID, how do you check if that sessionID is expired on IIS? Regards, Joe Link to comment Share on other sites More sharing options...
justsomeguy Posted August 29, 2019 Share Posted August 29, 2019 .NET should handle that automatically, or is this some ID that you're creating and managing yourself? Link to comment Share on other sites More sharing options...
joecool2005 Posted August 29, 2019 Author Share Posted August 29, 2019 I have a windows application that is calling a web server. Here is my scenario. 1) The windows app calls the webserver for authentication. If authenticated, the webserver will send back the session Id to windows app. 2) Once is authenticated, the windows app will make another call to webserver to get some value by sending the session Id. 3) The web server will check if the session Id exists. If yes, that means the windows app was authenticated and the web server can send back the data. So I need to check if the session ID exists. I don't know how. Any idea? Link to comment Share on other sites More sharing options...
justsomeguy Posted August 29, 2019 Share Posted August 29, 2019 Well, how are you generating and storing the ID in the first place? It seems pretty trivial to store a piece of data in a certain place and then check the same place to see if that data is there or not, I'm not sure what you're missing. Link to comment Share on other sites More sharing options...
joecool2005 Posted August 29, 2019 Author Share Posted August 29, 2019 Is it possible to look all the sessionID that IIS has? Link to comment Share on other sites More sharing options...
justsomeguy Posted August 29, 2019 Share Posted August 29, 2019 Probably not automatically through .NET (it is .NET, not IIS, that manages session state), but I suppose you can figure out where it stores them and look them up that way. I don't know why that's necessary though, this is all handled automatically. When the session times out it is deleted. I don't know how .NET handles sessions specifically, but I imagine that if you try to start a session then it will either look for an ID for an existing valid session, or start a new empty session otherwise. Your web service can have some method that can look at the session to determine if it is a new empty session or if there is data there, and return that information to your other application. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now