Category: Asp.Net MVC
.Net Asp.Net MVC Development
Creating IP based Access Validation
First you have to create a validation class which will do the work. Once that is done, now you can use the attributes in your controllers and actions like this:
.Net Asp.Net MVC Development
Creating Meta Classes for Meta Data
you can create new meta classes for meta data like display name, required or not, etc.
.Net Asp.Net MVC Development
Manually Logging User with Role
To logging a user with a custom role, you have to create an authentication cookies, only after user has been authenticated (Username and password has been verified). FormsAuthenticationTicket Class Namespace: System.Web.SecurityAssembly: System.Web.dll Constructor: public FormsAuthenticationTicket (int…
.Net Asp.Net MVC
Could not load file or assembly ‘Microsoft.Web.Infrastructure
Copy and paste the Microsoft.web.infrastructure dll file in the bin folder of the project.