Posts

Showing posts from December, 2013

Custom Attributes in MVC

Many a times, in web development world, it is required to access certain page on https while others are on simple http. In ancient time, it can be achieve through configuring URL re-writing concepts in IIS. But if you specifically developing your web application in Asp.net MVC, it is lot easier to implement. Believe me! This article describe on how to develop functionality for accessing certain page on Https protocol while others are on simple http. Scenario: Let us take an example of web site where login page needs to be accessed over secure socket layer (SSL - https) while after loging in, rest of the site should be run on normal http. Assume that this web application is to be developed using asp.net MVC Solution: Many of you may already aware about attributes or custom attribute. Attributes provide a powerful method of associating declarative information with C# code (types, methods, properties, and so forth). Once associated with a program entity, the attribute can be