Jump to content

verify sessionID


joecool2005
 Share

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...