private void CreateCache() { var name = HostName.Replace(':', '_'); CacheFolder = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Jexus Manager", "cache", name); FileName = Path.Combine(CacheFolder, "applicationHost.config"); if (!Directory.Exists(CacheFolder)) { Directory.CreateDirectory(CacheFolder); } SchemaFolder = Path.Combine(CacheFolder, "schema"); if (!Directory.Exists(SchemaFolder)) { Directory.CreateDirectory(SchemaFolder); } File.WriteAllText(FileName, Resources.original); File.WriteAllText(Path.Combine(SchemaFolder, "IIS_schema.xml"), Resources.IIS_schema); File.WriteAllText(Path.Combine(SchemaFolder, "FX_schema.xml"), Resources.FX_schema); File.WriteAllText(Path.Combine(SchemaFolder, "rewrite_schema.xml"), Resources.rewrite_schema); }