@@ -662,39 +662,39 @@ private static void AddImageHandlers(string siteName)
662662 bool add1Missing = true ;
663663 bool remove2Missing = true ;
664664 bool remove3Missing = true ;
665- ConfigurationElement toRemoveCe = null ;
665+ // ConfigurationElement toRemoveCe = null;
666666
667667 List < ConfigurationElement > toRemoveElements = new List < ConfigurationElement > ( ) ;
668668
669669 foreach ( ConfigurationElement ce in handlersCollection )
670670 {
671- if ( ce . GetAttributeValue ( "name" ) . ToString ( ) == "get-image-png" )
672- {
673- //MessageBox.Show("pngHandlerMissing");
674- pngHandlerMissing = false ;
675- }
676- if ( ce . GetAttributeValue ( "name" ) . ToString ( ) == "get-image-jpg" )
677- {
678- //MessageBox.Show("jpgHandlerMissing");
679- jpgHandlerMissing = false ;
680- }
681- if ( ce . GetAttributeValue ( "name" ) . ToString ( ) == "get-image-jpeg" )
682- {
683- //MessageBox.Show("jpegHandlerMissing");
684- jpegHandlerMissing = false ;
685- }
686- if ( ce . GetAttributeValue ( "name" ) . ToString ( ) == "ExtensionlessUrlHandler-Integrated-4.0" )
687- {
688- add1Missing = true ;
689- }
690- if ( ce . GetAttributeValue ( "name" ) . ToString ( ) == "OPTIONSVerbHandler" )
691- {
692- remove2Missing = true ;
693- }
694- if ( ce . GetAttributeValue ( "name" ) . ToString ( ) == "TRACEVerbHandler" )
695- {
696- remove3Missing = true ;
697- }
671+ // if (ce.GetAttributeValue("name").ToString() == "get-image-png")
672+ // {
673+ // //MessageBox.Show("pngHandlerMissing");
674+ // pngHandlerMissing = false;
675+ // }
676+ // if (ce.GetAttributeValue("name").ToString() == "get-image-jpg")
677+ // {
678+ // //MessageBox.Show("jpgHandlerMissing");
679+ // jpgHandlerMissing = false;
680+ // }
681+ // if (ce.GetAttributeValue("name").ToString() == "get-image-jpeg")
682+ // {
683+ // //MessageBox.Show("jpegHandlerMissing");
684+ // jpegHandlerMissing = false;
685+ // }
686+ // if (ce.GetAttributeValue("name").ToString() == "ExtensionlessUrlHandler-Integrated-4.0")
687+ // {
688+ // add1Missing = false ;
689+ // }
690+ // if (ce.GetAttributeValue("name").ToString() == "OPTIONSVerbHandler")
691+ // {
692+ // remove2Missing = false ;
693+ // }
694+ // if (ce.GetAttributeValue("name").ToString() == "TRACEVerbHandler")
695+ // {
696+ // remove3Missing = false ;
697+ // }
698698
699699 //if (ce.GetAttributeValue("name").ToString() == "ExtensionlessUrlHandler-Integrated-4.0")
700700 //{
@@ -714,19 +714,19 @@ private static void AddImageHandlers(string siteName)
714714 }
715715 handlersCollection . Clear ( ) ;
716716
717- // if (remove1Missing)
718- // {
719- // try
720- // {
721- // ConfigurationElement ele = handlersCollection.CreateElement("remove");
722- // ele["name"] = "ExtensionlessUrlHandler-Integrated-4.0";
723- // handlersCollection.Add(ele);
724- // }
725- // catch (Exception ex)
726- // {
727- // //MessageBox.Show("ExtensionlessUrlHandler ex is : " + ex.Message + "stacktrace : " + ex.StackTrace);
728- // }
729- // }
717+ if ( remove1Missing )
718+ {
719+ try
720+ {
721+ ConfigurationElement ele = handlersCollection . CreateElement ( "remove" ) ;
722+ ele [ "name" ] = "ExtensionlessUrlHandler-Integrated-4.0" ;
723+ handlersCollection . Add ( ele ) ;
724+ }
725+ catch ( Exception ex )
726+ {
727+ //MessageBox.Show("ExtensionlessUrlHandler ex is : " + ex.Message + "stacktrace : " + ex.StackTrace);
728+ }
729+ }
730730
731731 if ( remove2Missing )
732732 {
0 commit comments