Posts

Showing posts with the label Session

Laravel Session Time Out - Trying to get property of non-object Error

Image
I have faced the follwing  error in laravel in user logged pages . Laravel Session Time Out  - Trying to get property of non-object Error The reason for error is session time out of the logged user but it not properly handled in the views . In larvel if the logged in user from auth , can be logged out using same auth middleware. Route::post('controllerName','folderName\fileName@fnNmae')- >middleware('auth'); https://stackoverflow.com/questions/34443632/make-session-expiration-redirect-back-to-login

ASP.net - Safe method to check session is null

Robust application has to utilize Proper method to check the session veribles.Following  method is one of the best approch. Assume  Session["selmachine_id"] hold string value  string sessionMac = Session["selmachine_id"] as string;                 if (!string.IsNullOrEmpty(sessonTestId))                 {                     //Valid Action                  }