A dynamic RequireSsl Attribute for ASP.NET MVC

In most of my Web applications I’m finding that I need to handle SSL activation dynamically rather than statically. IOW, depending on the environment that I’m running in I need to specify whether I want to enforce SSL or not. Specifically during development I typically want to run with SSL disabled and at runtime on my live server I want to force it on. On a staging server typically I don’t want to run SSL unless I have access to a configured certificate.

Typically there’s little reason to run SSL locally on development machines, and it certainly isn’t configured by default. Although IIS makes it pretty easy to create machine certificates these days, it’s still not quite automatic for SSL to ‘just work’ out of the box. I find especially in multi-developer environments or for staging and testing servers adding certificates is often a causing a problem or adding extra work that doesn’t really add any value on a non-production machine.

For these reasons I like to use a configuration switch to turn SSL on and off at runtime based on a configuration setting.

Read Full Article Here.

Hope this will help !!!

Jay Ganesh

Category and Sub Category in Single Drop Down List (DDL) in ASP.NET MVC

In this article you will learn how to create a Drop Down List in ASP.NET MVC that can display states and their associated districts in a single Drop Down List.

Read full article

Hope this will help !!!

Jay Ganesh