3
By a business rule of the project, whenever an object of the type ViewModelBase
is instantiated, I need to perform some user profile validations to define which buttons the user will have access to on View that will be carried.
For this, I created within the constructor of this class a method call ObterPermissoes
, which uses as a basis the data stored in the user’s session.
The problem is that every time I update a DLL on the server where the application is published (IIS), the value of the object of this session is null in the first access of the users, generating exception in the application
HttpContext.Current.Session["UsuarioLogado"]
The problem is that in index
of View, the same method is executed and the session is loaded normally. But when the user performs a query action, when passing the method ObterPermissoes
the session is null, even if previously, to load the screen, the information has already been read in the correct way.
I’m really lost on the reason for this mistake...