I am please that it does work when you take out the Session code.
Your issue with Session variables is a general .Net Devlopement inssue (i.e. not specific to our API), and therefore not directly relavent to this forum. Please direct your question to general .Net forum found on other websites where they may be able to help you.