private static void WriteFault(MessageFault messageFault, string file1, EnvelopeVersion soap11) { using (FileStream stream = new FileStream(file1, FileMode.Create, FileAccess.Write)) { using (XmlDictionaryWriter writer = XmlDictionaryWriter.CreateTextWriter(stream, Encoding.UTF8)) { messageFault.WriteTo(writer, soap11); //Process.Start(file1); } } }