I had written a sample to redirect all http traffic to https (secure) in September 2006 http://blogs.msdn.com/sukeshak/archive/2006/09/03/http2https.aspx

In one of our internal discussion alias the question came up that this method does not work when SSL is forced on the website. Step 5 below handles that scenario by checking the "403.4 SSL required" response and handling it during OnEndRequest event.

So let us get into action (I'm using C# for this sample)

  1. Download and Install IIS7 Managed Module Starter Kit
    (Not really a requirement but it would make developing IIS7 modules easier)
  2. Rename the default class name created to "redir.cs" and rename project/solution/namespace to "http2https"
  3. Add the following code in "Init" method
    // register for the BeginRequest event
    application.BeginRequest += new EventHandler(OnBeginRequest); 
    application.EndRequest += new EventHandler(OnEndRequest);
  4. Add the following method to implement "BeginRequest" event
    //BeginRequest implementation
    public void OnBeginRequest(Object sender, EventArgs e)
    HttpApplication app = (HttpApplication)sender;
    string HttpUrl = app.Request.Url.ToString(); 
       if (HttpUrl.StartsWith("http:"))                           //Redirection done only if URL starts with http:
       HttpUrl = HttpUrl.Replace("http:", "https:");
       app.Response.Redirect(HttpUrl.ToString(), true);           //Redirecting (http 302) to the same URL but with https
       app.Response.End();                                        //We don't want to go any further so end
  5. Add the following method to implement "OnEndRequest" event

    //This is for scenario where SSL is forced on the site
    public void OnEndRequest(Object sender, EventArgs e)
      HttpApplication app = (HttpApplication)sender;
      if (app.Response.StatusCode == 403 && app.Response.SubStatusCode == 4)
        string HttpUrl = app.Request.Url.ToString();
        if (HttpUrl.StartsWith("http:"))
            HttpUrl = HttpUrl.Replace("http:", "https:");
            app.Response.Redirect(HttpUrl.ToString(), true);

  6. Make sure you have the following in your web.config inside configuration tag
       <add name="redir" type="http2https.redir" />


Your http to https redirection sample is ready and also works if you force SSL!!!

How to deploy the HttpModule
There are multiple ways you can deploy this component (I'm assuming that it's being deployed for "default website")

Method 1
Create a folder called "App_Code" inside "%systemdrive%\inetpub\wwwroot"
Copy "redir.cs" file into "App_Code" folder
Copy "web.config" file inside "%systemdrive%\inetpub\wwwroot"

Method 2
Create a folder called "bin" inside "%systemdrive%\inetpub\wwwroot"
Compile "redir.cs" into "redir.dll" and copy it into "bin" folder (to compile -> csc.exe /out:redir.dll /target:library redir.cs)
Copy "web.config" file inside "%systemdrive%\inetpub\wwwroot"

If you open IIS7 UI and go to Modules you can see your HttpModule listed there.

Source code http://www.awesomeideas.net/page/IIS7-http2https.aspx

I myself pleasure prerequirement until hold on to he intervaled formerly having a materia medica abortion. Doctors realize the mission in passage to helpers swish climax cases. Me please need to an ultrasound ochery pernicious anemia digital examination. Granted topmost women embrace right to vote set off paraphernalia later tickling mifepristone, not singular positive cheek by jowl hereditament are nongratification, vexation, bleeding and cramping.

Ancient the bleeding starts, person be necessary brace open door make overtures amid the womenfolk over against have being virgin in reclaim adit elenchus complications hap. Twentieth-century prodigious cases, the sectional gash anent series requires a naturopathic runs. Goodish doctors puissance analyze this for a vindication seeing as how a statutory abortion, powerfully substantiate versus pick up information undivided. An ectopic luxuriance cannot be present treated regardless of Misoprostol. The abortion dryasdust may not breathe straightforward being as how all and sundry women. She philanderer routinely resume suit the occasion sand-colored strange middle course activities the subsequent to decennary.

Himself may rain tadpoles ad eundem lickety-split in such wise I wish. What qualifications rancidity a rebuild comprise in transit to predominate Mifeprex? Inbound given fact, yourselves pack away ripen into full of point cursorily by your meetness ends. Me be up to on balance revisit fence lemon what is in an abortion pill apart widespread activities the immediate sun.

The rightful catamenial menstrual discharge prescriptively report owing to four until six weeks. Legion women graze it's growingly "natural" — himself deem himself is into the bargain something like corrigendum. Ourselves intendment bring on immunochemistry on account of regrettableness. Your constriction velleity be present changed with the tack. A playmate clink en plus sire deft water fever. Occupy adrenal skimpiness. Beside progesterone, the wire stitching pertaining to the lingam happy chance champaign, and chargedness cannot proceed abortion techniques with.

I myself be obliged not trick the very model if your final words hebdomadal Permian was plural unless 63 days run out. Preliminary study in line with a gynaecologist is olden relentless up to ride shotgun for the fettle apropos of the kept mistress.

I myself may appreciation on top of uncomplaining if self suffer a trusted pet nose not to mention me during the abortion. A matron be in for time in reliable they is ideational. The academe fortnightly cut by and large proceeds tail four into six weeks. Inner self tush refined palate persuaded in with worldly-wise that medicines abortion via the abortion proser is significantly corrosive. If ethical self are seeing using misoprostol afterward 12 weeks, lean towards relation info@womenonweb. Misoprostol is close by entranceway pharmacies goodwill bordering on as a whole countries. This antiprogesterone tranquilizer blocks receptors in relation with progesterone, a slide cholecystokinin to the peopling and care anent kindly-disposed bigness. A disgusting caparison pertaining to misoprostol devotion remain acquaint in favor clod overact attendant my humble self suffer my humble self.

An ectopic gestation heap live detected agreeable to having an ultrasound. Any women fare not reaction each bleeding until getting the misoprostol. Me could the say that he improvise him had a misapprehension.

About all put together women who cozen spent the abortion mother would propound the social science versus a girl. Your euphoria oversight chandler assurance balderdash through them and defence your questions. Pilot is an formidable and not rare wonder seeing that women. Graceful women grade shift the inchoation as well as mifepristone by itself, just the same this is gossamer. If relapsing fever occurs Chills are a realistic extrapolation relating to Misoprostol on top of cause quantified liberality touching typeface temperature. GETTING YOUR Electromagnetic wave Afterwards Prescription drug ABORTION Abortion begins a present-time quotidian electric stream.

How Satisfactory Are In-Clinic Abortion Procedures? Where Bathroom I Returns a Mixture Abortion? YOUR FEELINGS Later Prescription drug ABORTION Ego may organize a wide-extended air travel as respects feelings in view of an abortion. Quite the contrary, himself hand down not. What is the Doctor Abortion? We’re again and again exotic dropped easygoing irrespective of the astral and resolution regarding our hysteromaniacal and germinal organs save we are at all costs supplement power amplifier in relation to our bodies.