How to store temporary data for ASP.NET Web API? -


i understand web api should stateless , session not recommended storing temporary data, such userid, studentid.

in case, need place store temporary data , wonder method should use beside cookie? because possible customer disable cookie, isn't it?

you should carry values need store request/response, retieving , using them need. if values keys or else important encrypt them.

session bad, tempdata useful in cases when need store information use in same request context.

in cases, of them, can use querystring, if need get request.

this way can keep api stateless, must be.


Comments