I'm building a web application using .net 2010, c#. I want to create several projects in one solution.
A asp.net web application
A class library to hold normal business logic.
A class library to hold business logic to call a third party API.
When i call third party API, I need to login first, and third party API will return a session for me to communicate until I logout. What I want is to remain the same login session in asp.net web application. Which means when user logged in from web form, the program will login third party API and grab a session for that user; another user logged in from web form, the program will login third party API and grab another session for that user. whenever the user make some calls to the business logic layer, the method in business logic layer should be able to know which session from third party API it is using.
Also, I might want to reuse the 2 class library for a WPF app or a console app later.
How can I implement it?