Remove workaround for moonlight now that System.dll's WebExceptionStatus is properly...
[mono.git] / mcs / class / System.ServiceModel / fixup-config2.cs
1 using System;
2 using System.Xml;
3
4 public class FixupXml
5 {
6         public static void Main (string [] args)
7         {
8                 if (args.Length == 0) {
9                         Console.WriteLine ("pass path-to-web.config.");
10                         return;
11                 }
12                 XmlDocument doc = new XmlDocument ();
13                 doc.Load (args [0]);
14                 XmlElement el = doc.SelectSingleNode ("/configuration/system.web/httpHandlers") as XmlElement;
15                 XmlElement old = el.SelectSingleNode ("add[@path='*.svc']") as XmlElement;
16                 XmlNode up = doc.ReadNode (new XmlTextReader ("fixup-config2.xml"));
17                 if (old != null)
18                         el.RemoveChild (old);
19                 el.InsertAfter (up, null);
20                 XmlTextWriter w = new XmlTextWriter (args [0], null);
21                 w.Formatting = Formatting.Indented;
22                 w.IndentChar = '\t';
23                 w.Indentation = 1;
24                 doc.Save (w);
25                 w.Close ();
26         }
27 }
28