Save value from a variable within a controller to use in another DLL run method

Asked

Viewed 63 times

0

I need to save information in the User Login and use this information in another DLL.

EX:

Projeto.Web
Projeto.Domain.dll      

When logging in the User Project.Web controller, I need to save which project the user is logging in, so I created a static class in Project.domain.dll and put the value as soon as the user logs in, but when I use this value in a method that is in the dll Project.Domain it is zeroed, ie it loses the value.

What is the best way to work with this data pass, because I tried with Session and also had no success, I believe it is due to using this value in DLL Class Library.......

  • Tried to read the Session object in dll like this: System.Web.HttpContext.Current.Session ?

  • 1

    The fact of accessing the Session in a Class Library it is not a problem. However storing User information in a statistical field, only it will not give you problems if your system has only one user.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.