Nice blog from Resharper to explain the step by step guide to improve the Performace when we use ReSharper with Visual Studio. Most of our team members who are using the VM's from offshore will be benefiting from this Performance Improvements quide. Performance Guide for Visual Studio in ReSharper 2017.3
For persons who worked on WIF Programming would encounter the following error, ID4243: Could not create a SecurityToken. A token was not found in the token cache and no cookie was found in the context We will be getting this error when the browser sends the cookie to the server and when sever validates the token and it fails then we may get this error. The end user can't do anything since the browser sends the token to the server always until the user manually clears the cookie from the browser. To handle this scenario we can srite the below list of code in the Global.asax.cs Basically, what it does is it will check for the excetion type and then it tries to sign out the user (delete the cookie informations) and redirect to the requested page. It is as simple as it is :) protected void Application_OnError() { var ex = Context.Error; if (!(ex is SecurityTokenException)) return; Context.ClearError(); if (FederatedAuthenticati...
When ever we are struck with the values being not properly filled in the model and need to print all the properties of the model or dto of the page then we can use the below lines of code to loop through the model or dto and write all the items in the page. foreach (var result in Model) { var type = result.GetType(); var properties = type.GetProperties(); <ul> @foreach (var property in properties) { <li> ...
Comments