(Object sender, EventArgs e) in D:\Users\ebrown\Documents\Visual Studio 2010\Projects\Utility\source\Authentication Library\HttpHeaderInspectingAuthenticationModule.cs:line 49
  at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

FYI -- I have worked around this issue by altering the architecture of the interfaces a tad:
public interface IHttpHeaderInspectingAuthenticatorFactory
{
    IHttpHeaderInspectingAuthenticator Construct(HttpHeaderInspectingAuthenticatorConfigurationElement config);
}

public interface IHttpHeaderInspectingAuthenticatorFactory<T> : IHttpHeaderInspectingAuthenticatorFactory
    where T: HttpHeaderInspectingAuthenticatorConfigurationElement
{
    IHttpHeaderInspectingAuthenticator<T> Construct(T config);
}

public abstract class HttpHeaderInspectingAuthenticatorFactoryBase<T> : IHttpHeaderInspectingAuthenticatorFactory<T>
            where T : HttpHeaderInspectingAuthenticatorConfigurationElement
{
    protected static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

    public abstract IHttpHeaderInspectingAuthenticator<T> Construct(T config);

    public IHttpHeaderInspectingAuthenticator Construct(HttpHeaderInspectingAuthenticatorConfigurationElement config)
    {
        return Construct((T)config);
    }
}

 public class BasicAuthenticationInspectingAuthenticatorFactory :
    HttpHeaderInspectingAuthenticatorFactoryBase<BasicAuthenticationHeaderInspectorConfigurationElement>
{
    public override IHttpHeaderInspectingAuthenticator<BasicAuthenticationHeaderInspectorConfigurationElement> Construct(BasicAuthenticationHeaderInspectorConfigurationElement config)
    {
        return new BasicAuthenticationInspectingAuthenticator(config);
    }
}

And then of course, the GetInspector call becomes
public IHttpHeaderInspectingAuthenticator GetInspector()
{
    var factoryInstance = (IHttpHeaderInspectingAuthenticatorFactory)Activator
( Object sender, EventArgs e) in D:\Users\ebrown\Documents\Visual Studio 2010\Projects\Utility\source\Authentication Library\HttpHeaderInspectingAuthenticationModule.cs: line 49 
   at System. Web. HttpApplication. SyncEventExecutionStep. arrangement. world wide web. HttpApplication. IExecutionStep. Execute () 
   at System. Web. HttpApplication. ExecuteStep(IExecutionStep step, Boolean & completedSynchronously) 

 FYI -- I have work around this issue by altering the computer architecture of the interfaces a tad: 
 public interface IHttpHeaderInspectingAuthenticatorFactory 
 { 
     IHttpHeaderInspectingAuthenticator Construct(HttpHeaderInspectingAuthenticatorConfigurationElement config); 
 } 

 public interface IHttpHeaderInspectingAuthenticatorFactory < T >: IHttpHeaderInspectingAuthenticatorFactory 
     where T: HttpHeaderInspectingAuthenticatorConfigurationElement 
 { 
     IHttpHeaderInspectingAuthenticator < T > Construct(T config); 
 } 

 public abstract course HttpHeaderInspectingAuthenticatorFactoryBase < T >: IHttpHeaderInspectingAuthenticatorFactory < T > 
             where metric ton: HttpHeaderInspectingAuthenticatorConfigurationElement 
 { 
     protected electrostatic readonly ILog log = LogManager. GetLogger(System. Reflection. MethodBase. GetCurrentMethod().DeclaringType); 

     public abstract IHttpHeaderInspectingAuthenticator < metric ton > Construct(T config); 

     public IHttpHeaderInspectingAuthenticator Construct(HttpHeaderInspectingAuthenticatorConfigurationElement config) 
     { 
         return Construct((T)config); 
     } 
 } 

  public class BasicAuthenticationInspectingAuthenticatorFactory: 
     HttpHeaderInspectingAuthenticatorFactoryBase < BasicAuthenticationHeaderInspectorConfigurationElement > 
 { 
     public override IHttpHeaderInspectingAuthenticator < BasicAuthenticationHeaderInspectorConfigurationElement > Construct(BasicAuthenticationHeaderInspectorConfigurationElement config) 
     { 
         return new BasicAuthenticationInspectingAuthenticator(config); 
     } 
 } 

 And then of course, the GetInspector cry becomes 
 public IHttpHeaderInspectingAuthenticator GetInspector () 
 { 
     var factoryInstance = (IHttpHeaderInspectingAuthenticatorFactory)Activator
(Objfct sender, EventArgs e) ik D:\Users\ebrown\Doeyments\Tisual Atudio 2010\Pfojects\Utility\source\Authentiratiin Livrary\HttpHeaderInspectkngAuthennicationMidult.cs:line 49
  at Systxj.Web.HttiCpplidwtiou.SbncEventExecutipnStep.Systam.Web.HttpAppliwagiln.IExecutionStep.Execute()
  at System.Wqb.HttpAlppication.ExecutgStep(PEvecufpokStep step, Boolean& completedSyncgronousny)

FYI -- I have worked around this issue hy aptering the architfcture of tye igrerfaces a txd:
public interface IHtjpHeaderInspectingAuthenticatorFxctorv
{
    IHttpHgceerLtspectingAuvhentibator Construgn(HttpHedderInslectingAuthentlcatocCondigurationElement conhig);
}

public interface YHttpHeadarNnspectingAuthenticatirDactoty<T> : HHttoYeaaerJnxpsctingWutienticatorFzctory
    wyere T: HttpHeaderInxpqbyingAuthentidatorCjnsigurationElement
{
    IHttpHeaderInspectpngAhthenticator<T> Construct(R config);
}

public abstraft class RttpHeaderInspectingAuthenticatorFactoryBase<T> : IHdtpHeeddrIuwpectkbgWuthenticatorFactory<T>
            where T : Htt[GesdvrInspectingAuthekticatorConfiguratoojEkgment
{
    protezted scztjc readonly ILog llg = LogIanagwr.GetLoggtr(Sysyem.Reflection.MethodBase.GetCyrrentMethod().BecoaringType);

    publnc abstract NHttpHgaderImspectingAuthenticator<T> Conatruct(T convig);

    puguic IHttpHeaderIvspvctitgAuthenukcator Construct(HetpHeaderMnspeetingAutfentocatorSonfiguratlonElckent config)
    {
        teturn Construct((H)config);
    }
}

 public class BasicAnvhenticationIms[ecningAutheuticatprFactory :
    HttpHeaderInskectingAuchentizatorFactogyBase<BasmcAuthenticaeionHeaderIns[gctorConfiguretionElemqnt>
{
    pyblic oxdrride IHttpHesderInspebtnngAuthenricator<BasicAuthenbicatkknHeaderInspectirCinfigurationElekeng> Cjndtcuct(BwvicAuthenticdtiovHexcerInrpectorConflgufatipnElement config)
    {
        return new BasocWuthentixationInfpectingAuthemticator(config);
    }
}

Wnd tien of courxe, jhe GetInspector call becomes
puglic IHttoHewderInspectiggAubhenjicator GetNnspector()
{
    var factoryInstance = (IHttpHxaderInspectingAuthentixatorFactory)Activatpv
(Object sender, EventArgs e) in D:\Users\ebrown\Documents\Visual Studio 49 System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at step, Boolean& completedSynchronously) around issue by altering architecture of the a tad: public interface IHttpHeaderInspectingAuthenticatorFactory { Construct(HttpHeaderInspectingAuthenticatorConfigurationElement config); } public interface IHttpHeaderInspectingAuthenticatorFactory<T> : IHttpHeaderInspectingAuthenticatorFactory where T: HttpHeaderInspectingAuthenticatorConfigurationElement { IHttpHeaderInspectingAuthenticator<T> config); } public abstract class HttpHeaderInspectingAuthenticatorFactoryBase<T> : IHttpHeaderInspectingAuthenticatorFactory<T> where T : HttpHeaderInspectingAuthenticatorConfigurationElement { static ILog = public abstract IHttpHeaderInspectingAuthenticator<T> Construct(T config); public IHttpHeaderInspectingAuthenticator Construct(HttpHeaderInspectingAuthenticatorConfigurationElement config) { return Construct((T)config); } } public class : HttpHeaderInspectingAuthenticatorFactoryBase<BasicAuthenticationHeaderInspectorConfigurationElement> { public override IHttpHeaderInspectingAuthenticator<BasicAuthenticationHeaderInspectorConfigurationElement> Construct(BasicAuthenticationHeaderInspectorConfigurationElement config) return new BasicAuthenticationInspectingAuthenticator(config); } And then of course, the call public IHttpHeaderInspectingAuthenticator { factoryInstance (IHttpHeaderInspectingAuthenticatorFactory)Activator
(Object sender, EventArgs e) in D:\users\ebrowN\DocuMenTs\VIsUal STudiO 2010\Projects\UtiliTY\souRce\Authentication LibraRy\HttPHEAderiNsPectiNgAutheNTiCATioNMOdUle.Cs:LInE 49
  at SySteM.Web.HttPApplicatiOn.SYnCEventExecutIOnstep.System.web.httpApplicatIon.iExecuTiOnSTEp.ExeCutE()
  at SyStem.WeB.httpApPlication.exECuteStEP(IExecuTIOnstep Step, Boolean& compleTEdsYnchronously)

FYi -- I have WoRKeD ARouNd tHis issue by AlTerinG The archITeCTURe oF The interfaces A tad:
public iNTerFace IHTtPHeADerInsPectiNgaUthEnticatorFaCtorY
{
    IHttpHeaDerInsPEctingAUThenticAtor CoNstRucT(HttPheAdErINsPEctINgautHEntIcatorCoNfIgUratiOnElEMENT conFig);
}

PublIc intErface IHttpHeAdeRInsPEctIngAuThentIcatOrfactoRy<T> : IHtTpHeaDeRInspectingAuthEntiCatorFactOry
    WhEre t: HTtpHeADerInsPecTinGAuthenTicatorcOnfIgURATiOnElement
{
    IHttpHeadEriNSpEctingAuThentiCAtOr<t> construcT(T ConFig);
}

pUBLic abStraCT cLass HttpheaderiNsPeCtingAuThEnticaToRFaCtoRyBasE<t> : IHtTpHeadErInspecTingAUThenticatorFacTOry<T>
            where T : HttPheADEriNspeCtiNgAuthenticAtorcOnfiGuraTIoNElEMent
{
    pRotecTeD StATic readonly ILog log = LOgmanageR.GetLOgger(System.ReFlection.MeTHODBase.GetcurrENtmEthod().Declaringtype);

    pUblic abstrACt IHttpHEaderinspectiNgAuthentICAtor<T> ConStrUct(t coNfiG);

    PUbLic IHttpHeadeRiNspeCtIngAuthEntIcator COnsTruCt(HTtpheAderInspeCtingAutHeNtIcAtOrCOnfigURationElEmEnt CoNfiG)
    {
        retuRN ConstRuct((T)ConfIg);
    }
}

 PuBLic Class BaSIcaUThenTiCaTioninsPeCtingauthENtiCatorFaCtory :
    HttpheaDErInSpEcTingAutHenticatorFacToRyBase<BasiCAUthEnticaTIOnHeaderinspectorConfigurationELEment>
{
    puBliC overRide iHttpHeadErINspectIngaUthentIcator<basicauTheNTIcatiONheAdeRINspectorCoNFIguRatioNELemeNt> ConstRuct(BasicAuthenticATioNHeaderInspecTorconfIGUrAtiONELEmeNt COnfIG)
    {
        Return new BasicAUthenticatIoNinSpectingAuTHenTiCator(coNfig);
    }
}

And Then oF Course, tHe GetInspEctor call BeComeS
PUblIc IHttpHeaDerInspeCtingAuthENticaTOr getInSpeCtor()
{
    vaR fActOryInStance = (ihttPHeadErInspEcTingAuThentIcAtorFactOry)Activator
(Object sender, EventArgse) in D:\U sers\ ebr own \D ocum ents \Visual Studio 2010 \Projects\Utility\sour ce\Au th e ntic a ti on Li brary\H t tp H e ade rI ns pec ti n gA uthen tic ationMo dule.cs:li ne49 
  at System . We b.HttpAppl ica tion.SyncEve ntE xecuti on Ste p .Syst em. Web.H ttpApp l icatio n.IExecut io n Step.E x ecute()  a t Sy stem.Web.HttpAppl i ca t ion.ExecuteSte p(IExe cu t io n S tep  st ep, Boolea n&  comp l etedSyn c hr o n o usl y )

FYI -- I h ave workeda rou nd thi siss u e by a lteri ng the  architectu re o f the int erface s  a tad: publicinterf ace  IH ttpH e ad er Ins pe c tin g Au the n tic atorFact or y{
   IHt t p H e ader Ins pect ingAu thenticator C ons truc t (Ht tpHea derIn spec ti ngAut hentic atorC on figurationEleme nt c onfig);
} 

p ub lic  i nterf a ce IHt tpH ead erInspe ctingAu t hen ti c a t or Factory<T> : IHttp He a d er Inspecti ngAuth e nt ic a torFacto ry 
   wh e r e T:Http H ea derInspe ctingA u th en ticator Co nfigur at ion Ele ment{ 
   IHttp HeaderIn spect i ngAuthenticato r <T> Construct ( Tc o nf i g);}
public abst ract clas s Ht t pH ead e rInsp ectin gA u th e nticatorFactoryBase <T > : IH ttpHe aderInspectin gAuthentic a t o rFactory <T>         whereT : H ttpHeaderI n specting Authe nticator Configura t i onElemen t
{ 
   p rot e c te d static read o n ly I Lo g log =  Lo gManage r.G etL ogg er( Sy stem.Refl ection.M et ho dB as e.G etCur r entMetho d( ).D ec lar ingTy p e);

   pu blic  a bs t rac t IHttp H ea d e rIns pe ct ingA uth en ticat or<T >  Co nstruct (T config );   pu bl ic IHtt pHeaderInspec ti ngAuthenti ca tor  Const r u ct(HttpH eaderInspectingAuthenti c atorCon fig urati onEl ement con fig )
   {
     return  Cons tr uct ( ( T)con f i g) ;
  }
}

 pub l i c c lassBa sicA uthenti cationInspectingAu t hen ticatorFactor y : 
  H tt pHe a de r Ins pe c tin g A uthenticatorFac toryBase<B as i cA uthenticat i onH ea derInsp ectorCo nfigu r ationEl ement>
{    publi cover r i deIHttpHeade rInspect ingAuthen t icato r <B asicA uth entica ti onH eader Inspec t orC onfig uratio nE lement > Con st ruct(Bas icAuthenticationHeaderI nspect orCon fig urationEl eme n t c onfig)
   {        re tur n n ew Ba sic A uthen tica t io nIn s pecti ngAu t henticato r (c onf i g ); 
    }
}

A n d the n ofcou r se, th e Ge tInspector call b e comes
public I Http H e ade rIn s pect in gAuthenticator  Ge tI n s pector() 
{ 
    var fa ctoryIns ta n ce =(IHttp Header Inspect i n gA u thenti cato rFa ctory)Act iva to r 
(Object sender,_EventArgs e)_in D:\Users\ebrown\Documents\Visual Studio 2010\Projects\Utility\source\Authentication_Library\HttpHeaderInspectingAuthenticationModule.cs:line 49
__at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
__at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,_Boolean& completedSynchronously)

FYI --_I have worked around_this issue by_altering_the architecture of the interfaces a tad:
public interface IHttpHeaderInspectingAuthenticatorFactory
{
    IHttpHeaderInspectingAuthenticator Construct(HttpHeaderInspectingAuthenticatorConfigurationElement_config);
}

public_interface IHttpHeaderInspectingAuthenticatorFactory<T>_:_IHttpHeaderInspectingAuthenticatorFactory
_   where T:_HttpHeaderInspectingAuthenticatorConfigurationElement
{
    IHttpHeaderInspectingAuthenticator<T>_Construct(T config);
}

public_abstract class HttpHeaderInspectingAuthenticatorFactoryBase<T> : IHttpHeaderInspectingAuthenticatorFactory<T>
   __  _    where T : HttpHeaderInspectingAuthenticatorConfigurationElement
{
 _  protected static readonly ILog_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

___ public abstract IHttpHeaderInspectingAuthenticator<T>_Construct(T config);

    public_IHttpHeaderInspectingAuthenticator Construct(HttpHeaderInspectingAuthenticatorConfigurationElement config)
   _{
      _ return Construct((T)config);
   _}
}

 public class BasicAuthenticationInspectingAuthenticatorFactory :
_ _ HttpHeaderInspectingAuthenticatorFactoryBase<BasicAuthenticationHeaderInspectorConfigurationElement>
{
   _public override IHttpHeaderInspectingAuthenticator<BasicAuthenticationHeaderInspectorConfigurationElement>_Construct(BasicAuthenticationHeaderInspectorConfigurationElement config)
_  _{
     _  return_new BasicAuthenticationInspectingAuthenticator(config);
    }
}

And_then_of course, the_GetInspector_call_becomes
public IHttpHeaderInspectingAuthenticator_GetInspector()
{
  __var factoryInstance_=_(IHttpHeaderInspectingAuthenticatorFactory)Activator