Код: Выделить всё
MyDomainName\\MyServiceAccount
Код: Выделить всё
MyDomainName\MyServiceAccount
Вот что у меня есть на данный момент:
Код: Выделить всё
XDocument xDocument = new XDocument(
new XDeclaration("1.0", "utf-8", null),
new XElement("MyAppsTable",
myApplications.Select(component => new XElement("MyApps",
new XElement("ChangeResult", string.Empty),
new XElement("ChangeRunAsName", serviceAccount.DomainServiceAccount.Replace("\\\\", "\\")
))
)
);
Код: Выделить всё
IEnumerable myApplications
ServiceAccount serviceAccount
Код: Выделить всё
serviceAccount.DomainServiceAccount.Replace("\\\\", "\\")
serviceAccount.DomainServiceAccount.Replace(@"\\", @"\")
Код: Выделить всё
MyDomainName\\MyServiceAccount
У меня есть это после кода выше:
Код: Выделить всё
string xml = xDocument.ToString();
Подробнее здесь: https://stackoverflow.com/questions/153 ... ot-working