0

I have created a session in MVC Controller, but now i have to use that session in other ApiController. The problem is the context of MVC Controller is different from ApiController, so is there any way to send current Session information from MVC Controller to ApiController?

My current session contains UserID and Username

dieuvd
  • 29
  • 2
  • Take a look at this: http://stackoverflow.com/questions/11478244/asp-net-web-api-session-or-something – Alex Art. Aug 05 '15 at 05:06
  • Note that the answer linked to in the comment from Alex mentions that this is not a good idea, and goes against the concepts of having a WebAPI. If you are specifically requiring the userid / username, then that would be passed to the api controller via the application cooking / token. – Brendan Green Aug 05 '15 at 05:30

0 Answers0