From c2aee926e28faebbf93eecf811429a5d38558606 Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Wed, 21 Jan 2026 17:41:14 +0100 Subject: [PATCH 01/18] Migration: Replaced legacy .NET Framework with new .NET 8 --- .dockerignore | 30 + .gitattributes | 63 - ADWSProxy.sln | 25 - ADWSProxy/ADWS/ActiveDirectoryWebService.cs | 5176 ++++++++--------- ADWSProxy/ADWS/Connection.cs | 40 +- ADWSProxy/ADWS/Helpers.cs | 10 +- ADWSProxy/ADWS/Request/ADWSException.cs | 28 +- ADWSProxy/ADWS/Request/ADWSRequest.cs | 2 +- ADWSProxy/ADWS/Request/ADWSResponse.cs | 40 +- ADWSProxy/ADWS/Request/EnumerateRequest.cs | 25 +- ADWSProxy/ADWS/Request/EnumerateResponse.cs | 11 +- ADWSProxy/ADWS/Request/GetRequest.cs | 6 +- ADWSProxy/ADWS/Request/GetResponse.cs | 15 +- ADWSProxy/ADWS/Request/PullRequest.cs | 14 +- ADWSProxy/ADWS/Request/PullResponse.cs | 18 +- ADWSProxy/ADWS/Request/ReleaseRequest.cs | 3 +- ADWSProxy/ADWS/Request/RenewRequest.cs | 3 +- ADWSProxy/ADWS/Request/RenewResponse.cs | 11 +- ADWSProxy/ADWS/UserAccountControl.cs | 4 +- ADWSProxy/ADWSProxy.args.json | 62 - ADWSProxy/ADWSProxy.csproj | 175 +- ADWSProxy/App.config | 18 - ADWSProxy/CommandLineOptions.cs | 26 +- ADWSProxy/DNS/Resolver.cs | 8 +- ADWSProxy/Dockerfile | 29 + ADWSProxy/LDAP/DataHolder.cs | 16 +- ADWSProxy/LDAP/Helpers.cs | 48 +- .../LDAP/LdapResultRawMatchedDNAttribute.cs | 4 +- ADWSProxy/LDAP/Listener.cs | 139 +- ADWSProxy/LoggerConfig.cs | 1 - ADWSProxy/Program.cs | 38 +- ADWSProxy/Properties/AssemblyInfo.cs | 36 - ADWSProxy/Properties/launchSettings.json | 12 + ADWSProxy/packages.config | 13 - ADWSProxyCore.slnLaunch | 17 + ADWSProxyCore.slnx | 4 + Readme.md | 106 +- TestClient/Dockerfile | 34 + TestClient/Program.cs | 62 + TestClient/Properties/launchSettings.json | 10 + TestClient/TestClient.csproj | 16 + 41 files changed, 3048 insertions(+), 3350 deletions(-) create mode 100644 .dockerignore delete mode 100644 .gitattributes delete mode 100644 ADWSProxy.sln delete mode 100644 ADWSProxy/ADWSProxy.args.json delete mode 100644 ADWSProxy/App.config create mode 100644 ADWSProxy/Dockerfile delete mode 100644 ADWSProxy/Properties/AssemblyInfo.cs create mode 100644 ADWSProxy/Properties/launchSettings.json delete mode 100644 ADWSProxy/packages.config create mode 100644 ADWSProxyCore.slnLaunch create mode 100644 ADWSProxyCore.slnx create mode 100644 TestClient/Dockerfile create mode 100644 TestClient/Program.cs create mode 100644 TestClient/Properties/launchSettings.json create mode 100644 TestClient/TestClient.csproj diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..fe1152b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,30 @@ +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md +!**/.gitignore +!.git/HEAD +!.git/config +!.git/packed-refs +!.git/refs/heads/** \ No newline at end of file diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1ff0c42..0000000 --- a/.gitattributes +++ /dev/null @@ -1,63 +0,0 @@ -############################################################################### -# Set default behavior to automatically normalize line endings. -############################################################################### -* text=auto - -############################################################################### -# Set default behavior for command prompt diff. -# -# This is need for earlier builds of msysgit that does not have it on by -# default for csharp files. -# Note: This is only used by command line -############################################################################### -#*.cs diff=csharp - -############################################################################### -# Set the merge driver for project and solution files -# -# Merging from the command prompt will add diff markers to the files if there -# are conflicts (Merging from VS is not affected by the settings below, in VS -# the diff markers are never inserted). Diff markers may cause the following -# file extensions to fail to load in VS. An alternative would be to treat -# these files as binary and thus will always conflict and require user -# intervention with every merge. To do so, just uncomment the entries below -############################################################################### -#*.sln merge=binary -#*.csproj merge=binary -#*.vbproj merge=binary -#*.vcxproj merge=binary -#*.vcproj merge=binary -#*.dbproj merge=binary -#*.fsproj merge=binary -#*.lsproj merge=binary -#*.wixproj merge=binary -#*.modelproj merge=binary -#*.sqlproj merge=binary -#*.wwaproj merge=binary - -############################################################################### -# behavior for image files -# -# image files are treated as binary by default. -############################################################################### -#*.jpg binary -#*.png binary -#*.gif binary - -############################################################################### -# diff behavior for common document formats -# -# Convert binary document formats to text before diffing them. This feature -# is only available from the command line. Turn it on by uncommenting the -# entries below. -############################################################################### -#*.doc diff=astextplain -#*.DOC diff=astextplain -#*.docx diff=astextplain -#*.DOCX diff=astextplain -#*.dot diff=astextplain -#*.DOT diff=astextplain -#*.pdf diff=astextplain -#*.PDF diff=astextplain -#*.rtf diff=astextplain -#*.RTF diff=astextplain diff --git a/ADWSProxy.sln b/ADWSProxy.sln deleted file mode 100644 index 8892b25..0000000 --- a/ADWSProxy.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.8.34408.163 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ADWSProxy", "ADWSProxy\ADWSProxy.csproj", "{750E2653-08CF-4C6D-B82A-1E96FB256E63}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {750E2653-08CF-4C6D-B82A-1E96FB256E63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {750E2653-08CF-4C6D-B82A-1E96FB256E63}.Debug|Any CPU.Build.0 = Debug|Any CPU - {750E2653-08CF-4C6D-B82A-1E96FB256E63}.Release|Any CPU.ActiveCfg = Release|Any CPU - {750E2653-08CF-4C6D-B82A-1E96FB256E63}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8B749E2C-2B6B-4EE3-B64D-7ECCCE964DAD} - EndGlobalSection -EndGlobal diff --git a/ADWSProxy/ADWS/ActiveDirectoryWebService.cs b/ADWSProxy/ADWS/ActiveDirectoryWebService.cs index 6512775..31c5b4b 100644 --- a/ADWSProxy/ADWS/ActiveDirectoryWebService.cs +++ b/ADWSProxy/ADWS/ActiveDirectoryWebService.cs @@ -1,1626 +1,1567 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// +// dotnet --fx-version 8.0.23 "C:\Users\luc\.dotnet\tools\.store\dotnet-svcutil\8.0.0\dotnet-svcutil\8.0.0\tools\net8.0\any\dotnet-svcutil.dll" net.tcp://[...]:9389/ActiveDirectoryWebServices/mex --namespace "*,ADWSProxy.ADWS" --outputFile "ActiveDirectoryWebService.cs" --serializer XmlSerializer --targetFramework net8.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. -// // //------------------------------------------------------------------------------ namespace ADWSProxy.ADWS { - using System.Runtime.Serialization; - - + + + /// + [System.Xml.Serialization.XmlIncludeAttribute(typeof(RenewFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(PullFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(EnumerateFault))] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "FaultDetail", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.EnumerateFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.PullFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.RenewFault))] - public partial class FaultDetail : object, System.Runtime.Serialization.IExtensibleDataObject + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + public partial class FaultDetail { - - private System.Runtime.Serialization.ExtensionDataObject extensionDataField; - - private ADWSProxy.ADWS.ArgumentErrorDetail ArgumentErrorField; - - private string ErrorField; - - private ADWSProxy.ADWS.DirectoryErrorDetail DirectoryErrorField; - - private string InvalidAttributeTypeField; - - private string InvalidOperationField; - - private ADWSProxy.ADWS.ChangeType InvalidChangeField; - - private ADWSProxy.ADWS.AttributeTypeAndValue InvalidAttributeTypeOrValueField; - - private string ShortErrorField; - - private string UnknownAttributeField; - - public System.Runtime.Serialization.ExtensionDataObject ExtensionData - { - get - { - return this.extensionDataField; - } - set - { - this.extensionDataField = value; - } - } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false)] - public ADWSProxy.ADWS.ArgumentErrorDetail ArgumentError + + private ArgumentErrorDetail argumentErrorField; + + private string errorField; + + private DirectoryErrorDetail directoryErrorField; + + private string invalidAttributeTypeField; + + private string invalidOperationField; + + private ChangeType invalidChangeField; + + private AttributeTypeAndValue invalidAttributeTypeOrValueField; + + private string shortErrorField; + + private string unknownAttributeField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=0)] + public ArgumentErrorDetail ArgumentError { get { - return this.ArgumentErrorField; + return this.argumentErrorField; } set { - this.ArgumentErrorField = value; + this.argumentErrorField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false)] + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=1)] public string Error { get { - return this.ErrorField; + return this.errorField; } set { - this.ErrorField = value; + this.errorField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 2)] - public ADWSProxy.ADWS.DirectoryErrorDetail DirectoryError + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=2)] + public DirectoryErrorDetail DirectoryError { get { - return this.DirectoryErrorField; + return this.directoryErrorField; } set { - this.DirectoryErrorField = value; + this.directoryErrorField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 3)] + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=3)] public string InvalidAttributeType { get { - return this.InvalidAttributeTypeField; + return this.invalidAttributeTypeField; } set { - this.InvalidAttributeTypeField = value; + this.invalidAttributeTypeField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 4)] + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=4)] public string InvalidOperation { get { - return this.InvalidOperationField; + return this.invalidOperationField; } set { - this.InvalidOperationField = value; + this.invalidOperationField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 5)] - public ADWSProxy.ADWS.ChangeType InvalidChange + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=5)] + public ChangeType InvalidChange { get { - return this.InvalidChangeField; + return this.invalidChangeField; } set { - this.InvalidChangeField = value; + this.invalidChangeField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 6)] - public ADWSProxy.ADWS.AttributeTypeAndValue InvalidAttributeTypeOrValue + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=6)] + public AttributeTypeAndValue InvalidAttributeTypeOrValue { get { - return this.InvalidAttributeTypeOrValueField; + return this.invalidAttributeTypeOrValueField; } set { - this.InvalidAttributeTypeOrValueField = value; + this.invalidAttributeTypeOrValueField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 7)] + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=7)] public string ShortError { get { - return this.ShortErrorField; + return this.shortErrorField; } set { - this.ShortErrorField = value; + this.shortErrorField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 8)] + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=8)] public string UnknownAttribute { get { - return this.UnknownAttributeField; + return this.unknownAttributeField; } set { - this.UnknownAttributeField = value; + this.unknownAttributeField = value; } } } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "ArgumentErrorDetail", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] - public partial class ArgumentErrorDetail : object, System.Runtime.Serialization.IExtensibleDataObject + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + public partial class ArgumentErrorDetail { - - private System.Runtime.Serialization.ExtensionDataObject extensionDataField; - - private string MessageField; - - private string ParameterNameField; - - private string ShortMessageField; - - public System.Runtime.Serialization.ExtensionDataObject ExtensionData + + private string messageField; + + private string parameterNameField; + + private string shortMessageField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=0)] + public string Message { get { - return this.extensionDataField; + return this.messageField; } set { - this.extensionDataField = value; + this.messageField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false)] - public string Message + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=1)] + public string ParameterName { get { - return this.MessageField; + return this.parameterNameField; } set { - this.MessageField = value; + this.parameterNameField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false)] - public string ParameterName + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=2)] + public string ShortMessage { get { - return this.ParameterNameField; + return this.shortMessageField; } set { - this.ParameterNameField = value; + this.shortMessageField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false)] - public string ShortMessage + } + + /// + [System.Xml.Serialization.XmlIncludeAttribute(typeof(ChangeType))] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + public partial class AttributeTypeAndValue + { + + private ADWSProxy.ADWS.ArrayOfXElement attributeTypeField; + + private ADWSProxy.ADWS.ArrayOfXElement attributeValueField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=0)] + public ADWSProxy.ADWS.ArrayOfXElement AttributeType + { + get + { + return this.attributeTypeField; + } + set + { + this.attributeTypeField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=1)] + public ADWSProxy.ADWS.ArrayOfXElement AttributeValue { get { - return this.ShortMessageField; + return this.attributeValueField; } set { - this.ShortMessageField = value; + this.attributeValueField = value; } } } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "AttributeTypeAndValue", Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] - public partial class AttributeTypeAndValue : object, System.Runtime.Serialization.IExtensibleDataObject + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://www.w3.org/2001/XMLSchema")] + public partial class schema { - - private System.Runtime.Serialization.ExtensionDataObject extensionDataField; - - private ADWSProxy.ADWS.AttributeTypeAndValue.AttributeTypeType AttributeTypeField; - - private ADWSProxy.ADWS.AttributeTypeAndValue.AttributeValueType AttributeValueField; - - public System.Runtime.Serialization.ExtensionDataObject ExtensionData + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + public partial class ChangeType : AttributeTypeAndValue + { + + private string operationField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Operation { get { - return this.extensionDataField; + return this.operationField; } set { - this.extensionDataField = value; + this.operationField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false)] - public ADWSProxy.ADWS.AttributeTypeAndValue.AttributeTypeType AttributeType + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + public partial class DirectoryErrorDetail + { + + private string messageField; + + private string errorCodeField; + + private string extendedErrorMessageField; + + private string matchedDNField; + + private string[] referralField; + + private string win32ErrorCodeField; + + private string shortMessageField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=0)] + public string Message { get { - return this.AttributeTypeField; + return this.messageField; } set { - this.AttributeTypeField = value; + this.messageField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false)] - public ADWSProxy.ADWS.AttributeTypeAndValue.AttributeValueType AttributeValue + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=1)] + public string ErrorCode { get { - return this.AttributeValueField; + return this.errorCodeField; } set { - this.AttributeValueField = value; + this.errorCodeField = value; } } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Xml.Serialization.XmlSchemaProviderAttribute("ExportSchema")] - [System.Xml.Serialization.XmlRootAttribute(IsNullable = false)] - public partial class AttributeTypeType : object, System.Xml.Serialization.IXmlSerializable + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=2)] + public string ExtendedErrorMessage { - - private System.Xml.XmlNode[] nodesField; - - private static System.Xml.XmlQualifiedName typeName = new System.Xml.XmlQualifiedName("AttributeTypeAndValue.AttributeTypeType", "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess"); - - public System.Xml.XmlNode[] Nodes - { - get - { - return this.nodesField; - } - set - { - this.nodesField = value; - } - } - - public void ReadXml(System.Xml.XmlReader reader) + get { - this.nodesField = System.Runtime.Serialization.XmlSerializableServices.ReadNodes(reader); + return this.extendedErrorMessageField; } - - public void WriteXml(System.Xml.XmlWriter writer) + set { - System.Runtime.Serialization.XmlSerializableServices.WriteNodes(writer, this.Nodes); + this.extendedErrorMessageField = value; } - - public System.Xml.Schema.XmlSchema GetSchema() + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=3)] + public string MatchedDN + { + get { - return null; + return this.matchedDNField; } - - public static System.Xml.XmlQualifiedName ExportSchema(System.Xml.Schema.XmlSchemaSet schemas) + set { - System.Runtime.Serialization.XmlSerializableServices.AddDefaultSchema(schemas, typeName); - return typeName; + this.matchedDNField = value; } } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Xml.Serialization.XmlSchemaProviderAttribute("ExportSchema")] - [System.Xml.Serialization.XmlRootAttribute(IsNullable = false)] - public partial class AttributeValueType : object, System.Xml.Serialization.IXmlSerializable + + /// + [System.Xml.Serialization.XmlElementAttribute("Referral", Order=4)] + public string[] Referral { - - private System.Xml.XmlNode[] nodesField; - - private static System.Xml.XmlQualifiedName typeName = new System.Xml.XmlQualifiedName("AttributeTypeAndValue.AttributeValueType", "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess"); - - public System.Xml.XmlNode[] Nodes - { - get - { - return this.nodesField; - } - set - { - this.nodesField = value; - } - } - - public void ReadXml(System.Xml.XmlReader reader) + get { - this.nodesField = System.Runtime.Serialization.XmlSerializableServices.ReadNodes(reader); + return this.referralField; } - - public void WriteXml(System.Xml.XmlWriter writer) + set { - System.Runtime.Serialization.XmlSerializableServices.WriteNodes(writer, this.Nodes); + this.referralField = value; } - - public System.Xml.Schema.XmlSchema GetSchema() + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=5)] + public string Win32ErrorCode + { + get { - return null; + return this.win32ErrorCodeField; } - - public static System.Xml.XmlQualifiedName ExportSchema(System.Xml.Schema.XmlSchemaSet schemas) + set { - System.Runtime.Serialization.XmlSerializableServices.AddDefaultSchema(schemas, typeName); - return typeName; + this.win32ErrorCodeField = value; } } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "EnumerateFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] - public partial class EnumerateFault : ADWSProxy.ADWS.FaultDetail - { - - private string InvalidPropertyField; - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false)] - public string InvalidProperty + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=6)] + public string ShortMessage { get { - return this.InvalidPropertyField; + return this.shortMessageField; } set { - this.InvalidPropertyField = value; + this.shortMessageField = value; } } } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "PullFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] - public partial class PullFault : ADWSProxy.ADWS.FaultDetail + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + public partial class RenewFault : FaultDetail { } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "RenewFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] - public partial class RenewFault : ADWSProxy.ADWS.FaultDetail + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + public partial class PullFault : FaultDetail { } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Xml.Serialization.XmlSchemaProviderAttribute("ExportSchema")] - [System.Xml.Serialization.XmlRootAttribute(IsNullable = false)] - public partial class DirectoryErrorDetail : object, System.Xml.Serialization.IXmlSerializable + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + public partial class EnumerateFault : FaultDetail { - - private System.Xml.XmlNode[] nodesField; - - private static System.Xml.XmlQualifiedName typeName = new System.Xml.XmlQualifiedName("DirectoryErrorDetail", "http://schemas.microsoft.com/2008/1/ActiveDirectory"); - - public System.Xml.XmlNode[] Nodes + + private string invalidPropertyField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=0)] + public string InvalidProperty { get { - return this.nodesField; + return this.invalidPropertyField; } set { - this.nodesField = value; + this.invalidPropertyField = value; } } - - public void ReadXml(System.Xml.XmlReader reader) - { - this.nodesField = System.Runtime.Serialization.XmlSerializableServices.ReadNodes(reader); - } - - public void WriteXml(System.Xml.XmlWriter writer) - { - System.Runtime.Serialization.XmlSerializableServices.WriteNodes(writer, this.Nodes); - } - - public System.Xml.Schema.XmlSchema GetSchema() - { - return null; - } - - public static System.Xml.XmlQualifiedName ExportSchema(System.Xml.Schema.XmlSchemaSet schemas) - { - System.Runtime.Serialization.XmlSerializableServices.AddDefaultSchema(schemas, typeName); - return typeName; - } } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Xml.Serialization.XmlSchemaProviderAttribute("ExportSchema")] - [System.Xml.Serialization.XmlRootAttribute(IsNullable = false)] - public partial class ChangeType : object, System.Xml.Serialization.IXmlSerializable + [System.Xml.Serialization.XmlTypeAttribute(TypeName="FaultDetail", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + public partial class FaultDetail1 { - - private System.Xml.XmlNode[] nodesField; - - private static System.Xml.XmlQualifiedName typeName = new System.Xml.XmlQualifiedName("ChangeType", "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess"); - - public System.Xml.XmlNode[] Nodes + + private int sizeLimitField; + + private bool sizeLimitFieldSpecified; + + private string valueField; + + private System.Xml.Serialization.XmlSerializerNamespaces xmlnsField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + public int SizeLimit { get { - return this.nodesField; + return this.sizeLimitField; } set { - this.nodesField = value; + this.sizeLimitField = value; } } - - public void ReadXml(System.Xml.XmlReader reader) - { - this.nodesField = System.Runtime.Serialization.XmlSerializableServices.ReadNodes(reader); - } - - public void WriteXml(System.Xml.XmlWriter writer) - { - System.Runtime.Serialization.XmlSerializableServices.WriteNodes(writer, this.Nodes); - } - - public System.Xml.Schema.XmlSchema GetSchema() - { - return null; - } - - public static System.Xml.XmlQualifiedName ExportSchema(System.Xml.Schema.XmlSchemaSet schemas) - { - System.Runtime.Serialization.XmlSerializableServices.AddDefaultSchema(schemas, typeName); - return typeName; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Xml.Serialization.XmlSchemaProviderAttribute("ExportSchema")] - [System.Xml.Serialization.XmlRootAttribute(ElementName = "EncodingLimit", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", IsNullable = false)] - public partial class FaultDetail1 : object, System.Xml.Serialization.IXmlSerializable - { - - private System.Xml.XmlNode[] nodesField; - - private static System.Xml.XmlQualifiedName typeName = new System.Xml.XmlQualifiedName("FaultDetail", "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"); - - public System.Xml.XmlNode[] Nodes + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool SizeLimitSpecified { get { - return this.nodesField; + return this.sizeLimitFieldSpecified; } set { - this.nodesField = value; + this.sizeLimitFieldSpecified = value; } } - - public void ReadXml(System.Xml.XmlReader reader) - { - this.nodesField = System.Runtime.Serialization.XmlSerializableServices.ReadNodes(reader); - } - - public void WriteXml(System.Xml.XmlWriter writer) - { - System.Runtime.Serialization.XmlSerializableServices.WriteNodes(writer, this.Nodes); - } - - public System.Xml.Schema.XmlSchema GetSchema() + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public string Value { - return null; + get + { + return this.valueField; + } + set + { + this.valueField = value; + } } - - public static System.Xml.XmlQualifiedName ExportSchema(System.Xml.Schema.XmlSchemaSet schemas) + + /// + [System.Xml.Serialization.XmlNamespaceDeclarationsAttribute()] + public System.Xml.Serialization.XmlSerializerNamespaces xmlns { - System.Runtime.Serialization.XmlSerializableServices.AddDefaultSchema(schemas, typeName); - return typeName; + get + { + return this.xmlnsField; + } + set + { + this.xmlnsField = value; + } } } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Xml.Serialization.XmlSchemaProviderAttribute("ExportSchema")] - [System.Xml.Serialization.XmlRootAttribute(ElementName = "FragmentDialectNotSupported", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", IsNullable = false)] - public partial class FragmentDialect : object, System.Xml.Serialization.IXmlSerializable + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + public partial class FragmentDialect { - - private System.Xml.XmlNode[] nodesField; - - private static System.Xml.XmlQualifiedName typeName = new System.Xml.XmlQualifiedName("FragmentDialect", "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"); - - public System.Xml.XmlNode[] Nodes + + private string valueField; + + /// + [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")] + public string Value { get { - return this.nodesField; + return this.valueField; } set { - this.nodesField = value; + this.valueField = value; } } - - public void ReadXml(System.Xml.XmlReader reader) - { - this.nodesField = System.Runtime.Serialization.XmlSerializableServices.ReadNodes(reader); - } - - public void WriteXml(System.Xml.XmlWriter writer) - { - System.Runtime.Serialization.XmlSerializableServices.WriteNodes(writer, this.Nodes); - } - - public System.Xml.Schema.XmlSchema GetSchema() - { - return null; - } - - public static System.Xml.XmlQualifiedName ExportSchema(System.Xml.Schema.XmlSchemaSet schemas) - { - System.Runtime.Serialization.XmlSerializableServices.AddDefaultSchema(schemas, typeName); - return typeName; - } } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "AttributeTypeNotValid", Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] - public partial class AttributeTypeNotValid : object, System.Runtime.Serialization.IExtensibleDataObject + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + public partial class AttributeTypeNotValid { - - private System.Runtime.Serialization.ExtensionDataObject extensionDataField; - - private ADWSProxy.ADWS.AttributeTypeNotValidForDialect AttributeTypeNotValidForDialectField; - - private ADWSProxy.ADWS.AttributeTypeNotValidForEntry AttributeTypeNotValidForEntryField; - - public System.Runtime.Serialization.ExtensionDataObject ExtensionData + + private AttributeTypeNotValidForDialect attributeTypeNotValidForDialectField; + + private AttributeTypeNotValidForEntry attributeTypeNotValidForEntryField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=0)] + public AttributeTypeNotValidForDialect AttributeTypeNotValidForDialect { get { - return this.extensionDataField; + return this.attributeTypeNotValidForDialectField; } set { - this.extensionDataField = value; + this.attributeTypeNotValidForDialectField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false)] - public ADWSProxy.ADWS.AttributeTypeNotValidForDialect AttributeTypeNotValidForDialect + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=1)] + public AttributeTypeNotValidForEntry AttributeTypeNotValidForEntry { get { - return this.AttributeTypeNotValidForDialectField; + return this.attributeTypeNotValidForEntryField; } set { - this.AttributeTypeNotValidForDialectField = value; + this.attributeTypeNotValidForEntryField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false)] - public ADWSProxy.ADWS.AttributeTypeNotValidForEntry AttributeTypeNotValidForEntry + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + public partial class AttributeTypeNotValidForDialect + { + + private string attributeTypeField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=0)] + public string AttributeType { get { - return this.AttributeTypeNotValidForEntryField; + return this.attributeTypeField; } set { - this.AttributeTypeNotValidForEntryField = value; + this.attributeTypeField = value; } } } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "AttributeTypeNotValidForDialect", Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] - public partial class AttributeTypeNotValidForDialect : object, System.Runtime.Serialization.IExtensibleDataObject + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + public partial class AttributeTypeNotValidForEntry { - - private System.Runtime.Serialization.ExtensionDataObject extensionDataField; - - private string AttributeTypeField; - - public System.Runtime.Serialization.ExtensionDataObject ExtensionData - { - get - { - return this.extensionDataField; - } - set - { - this.extensionDataField = value; - } - } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false)] + + private string attributeTypeField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=0)] public string AttributeType { get { - return this.AttributeTypeField; + return this.attributeTypeField; } set { - this.AttributeTypeField = value; + this.attributeTypeField = value; } } } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "AttributeTypeNotValidForEntry", Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] - public partial class AttributeTypeNotValidForEntry : object, System.Runtime.Serialization.IExtensibleDataObject + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.xmlsoap.org/ws/2004/09/enumeration")] + public partial class SupportedDialect { - - private System.Runtime.Serialization.ExtensionDataObject extensionDataField; - - private string AttributeTypeField; - - public System.Runtime.Serialization.ExtensionDataObject ExtensionData - { - get - { - return this.extensionDataField; - } - set - { - this.extensionDataField = value; - } - } - - [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false)] - public string AttributeType + + private string valueField; + + /// + [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")] + public string Value { get { - return this.AttributeTypeField; + return this.valueField; } set { - this.AttributeTypeField = value; + this.valueField = value; } } } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Xml.Serialization.XmlSchemaProviderAttribute("ExportSchema")] - [System.Xml.Serialization.XmlRootAttribute(ElementName = "FilterDialectRequestedUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/09/enumeration", IsNullable = false)] - public partial class SupportedDialect : object, System.Xml.Serialization.IXmlSerializable + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + public partial class SupportedSelectOrSortDialect { - - private System.Xml.XmlNode[] nodesField; - - private static System.Xml.XmlQualifiedName typeName = new System.Xml.XmlQualifiedName("SupportedDialect", "http://schemas.xmlsoap.org/ws/2004/09/enumeration"); - - public System.Xml.XmlNode[] Nodes + + private string valueField; + + /// + [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")] + public string Value { get { - return this.nodesField; + return this.valueField; } set { - this.nodesField = value; + this.valueField = value; } } - - public void ReadXml(System.Xml.XmlReader reader) - { - this.nodesField = System.Runtime.Serialization.XmlSerializableServices.ReadNodes(reader); - } - - public void WriteXml(System.Xml.XmlWriter writer) - { - System.Runtime.Serialization.XmlSerializableServices.WriteNodes(writer, this.Nodes); - } - - public System.Xml.Schema.XmlSchema GetSchema() - { - return null; - } - - public static System.Xml.XmlQualifiedName ExportSchema(System.Xml.Schema.XmlSchemaSet schemas) - { - System.Runtime.Serialization.XmlSerializableServices.AddDefaultSchema(schemas, typeName); - return typeName; - } } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Xml.Serialization.XmlSchemaProviderAttribute("ExportSchema")] - [System.Xml.Serialization.XmlRootAttribute(ElementName = "UnsupportedSelectOrSortDialectFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory", IsNullable = false)] - public partial class SupportedSelectOrSortDialect : object, System.Xml.Serialization.IXmlSerializable + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class GetADGroupMemberFault : CustomActionFault { - - private System.Xml.XmlNode[] nodesField; - - private static System.Xml.XmlQualifiedName typeName = new System.Xml.XmlQualifiedName("SupportedSelectOrSortDialect", "http://schemas.microsoft.com/2008/1/ActiveDirectory"); - - public System.Xml.XmlNode[] Nodes - { - get - { - return this.nodesField; - } - set - { - this.nodesField = value; - } - } - - public void ReadXml(System.Xml.XmlReader reader) - { - this.nodesField = System.Runtime.Serialization.XmlSerializableServices.ReadNodes(reader); - } - - public void WriteXml(System.Xml.XmlWriter writer) - { - System.Runtime.Serialization.XmlSerializableServices.WriteNodes(writer, this.Nodes); - } - - public System.Xml.Schema.XmlSchema GetSchema() - { - return null; - } - - public static System.Xml.XmlQualifiedName ExportSchema(System.Xml.Schema.XmlSchemaSet schemas) - { - System.Runtime.Serialization.XmlSerializableServices.AddDefaultSchema(schemas, typeName); - return typeName; - } } - + + /// + [System.Xml.Serialization.XmlIncludeAttribute(typeof(GetVersionFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(ChangeOptionalFeatureFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(GetADForestFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(MoveADOperationMasterRoleFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(GetADDomainFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(GetADDomainControllerFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(TranslateNameFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(GetADPrincipalAuthorizationGroupFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(ChangePasswordFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(SetPasswordFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(GetADPrincipalGroupMembershipFault))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(GetADGroupMemberFault))] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "CustomActionFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.GetADPrincipalGroupMembershipFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.SetPasswordFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.ChangePasswordFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.TranslateNameFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.GetADDomainControllerFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.GetADDomainFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.MoveADOperationMasterRoleFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.GetADForestFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.ChangeOptionalFeatureFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.GetVersionFault))] - [System.Runtime.Serialization.KnownTypeAttribute(typeof(ADWSProxy.ADWS.GetADGroupMemberFault))] - public partial class CustomActionFault : object, System.Runtime.Serialization.IExtensibleDataObject + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class CustomActionFault { - - private System.Runtime.Serialization.ExtensionDataObject extensionDataField; - - private ADWSProxy.ADWS.ArgumentErrorDetailCA ArgumentErrorField; - - private ADWSProxy.ADWS.DirectoryErrorDetailCA DirectoryErrorField; - - private string ErrorField; - - private string ShortErrorField; - - public System.Runtime.Serialization.ExtensionDataObject ExtensionData - { - get - { - return this.extensionDataField; - } - set - { - this.extensionDataField = value; - } - } - - [System.Runtime.Serialization.DataMemberAttribute()] - public ADWSProxy.ADWS.ArgumentErrorDetailCA ArgumentError + + private ArgumentErrorDetailCA argumentErrorField; + + private DirectoryErrorDetailCA directoryErrorField; + + private string errorField; + + private string shortErrorField; + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] + public ArgumentErrorDetailCA ArgumentError { get { - return this.ArgumentErrorField; + return this.argumentErrorField; } set { - this.ArgumentErrorField = value; + this.argumentErrorField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute()] - public ADWSProxy.ADWS.DirectoryErrorDetailCA DirectoryError + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] + public DirectoryErrorDetailCA DirectoryError { get { - return this.DirectoryErrorField; + return this.directoryErrorField; } set { - this.DirectoryErrorField = value; + this.directoryErrorField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute()] + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)] public string Error { get { - return this.ErrorField; + return this.errorField; } set { - this.ErrorField = value; + this.errorField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute()] + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=3)] public string ShortError { get { - return this.ShortErrorField; + return this.shortErrorField; } set { - this.ShortErrorField = value; + this.shortErrorField = value; } } } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "ArgumentErrorDetailCA", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class ArgumentErrorDetailCA : object, System.Runtime.Serialization.IExtensibleDataObject + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class ArgumentErrorDetailCA { - - private System.Runtime.Serialization.ExtensionDataObject extensionDataField; - - private string MessageField; - - private string ParameterNameField; - - private string ShortMessageField; - - public System.Runtime.Serialization.ExtensionDataObject ExtensionData - { - get - { - return this.extensionDataField; - } - set - { - this.extensionDataField = value; - } - } - - [System.Runtime.Serialization.DataMemberAttribute()] + + private string messageField; + + private string parameterNameField; + + private string shortMessageField; + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] public string Message { get { - return this.MessageField; + return this.messageField; } set { - this.MessageField = value; + this.messageField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute()] + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] public string ParameterName { get { - return this.ParameterNameField; + return this.parameterNameField; } set { - this.ParameterNameField = value; + this.parameterNameField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute()] + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)] public string ShortMessage { get { - return this.ShortMessageField; + return this.shortMessageField; } set { - this.ShortMessageField = value; + this.shortMessageField = value; } } } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "DirectoryErrorDetailCA", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class DirectoryErrorDetailCA : object, System.Runtime.Serialization.IExtensibleDataObject - { - - private System.Runtime.Serialization.ExtensionDataObject extensionDataField; - - private string ErrorCodeField; - - private string ExtendedErrorMessageField; - - private string MatchedDNField; - - private string MessageField; - - private string[] ReferralField; - - private string ShortMessageField; - - private string Win32ErrorCodeField; - - public System.Runtime.Serialization.ExtensionDataObject ExtensionData - { - get - { - return this.extensionDataField; - } - set - { - this.extensionDataField = value; - } - } - - [System.Runtime.Serialization.DataMemberAttribute()] + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class DirectoryErrorDetailCA + { + + private string errorCodeField; + + private string extendedErrorMessageField; + + private string matchedDNField; + + private string messageField; + + private string[] referralField; + + private string shortMessageField; + + private string win32ErrorCodeField; + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] public string ErrorCode { get { - return this.ErrorCodeField; + return this.errorCodeField; } set { - this.ErrorCodeField = value; + this.errorCodeField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute()] + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] public string ExtendedErrorMessage { get { - return this.ExtendedErrorMessageField; + return this.extendedErrorMessageField; } set { - this.ExtendedErrorMessageField = value; + this.extendedErrorMessageField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute()] + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)] public string MatchedDN { get { - return this.MatchedDNField; + return this.matchedDNField; } set { - this.MatchedDNField = value; + this.matchedDNField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute()] + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=3)] public string Message { get { - return this.MessageField; + return this.messageField; } set { - this.MessageField = value; + this.messageField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute()] + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=4)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] Referral { get { - return this.ReferralField; + return this.referralField; } set { - this.ReferralField = value; + this.referralField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute()] + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=5)] public string ShortMessage { get { - return this.ShortMessageField; + return this.shortMessageField; } set { - this.ShortMessageField = value; + this.shortMessageField = value; } } - - [System.Runtime.Serialization.DataMemberAttribute()] + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=6)] public string Win32ErrorCode { get { - return this.Win32ErrorCodeField; + return this.win32ErrorCodeField; } set { - this.Win32ErrorCodeField = value; + this.win32ErrorCodeField = value; } } } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "GetADPrincipalGroupMembershipFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class GetADPrincipalGroupMembershipFault : ADWSProxy.ADWS.CustomActionFault - { - } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "SetPasswordFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class SetPasswordFault : ADWSProxy.ADWS.CustomActionFault + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class GetVersionFault : CustomActionFault { } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "ChangePasswordFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class ChangePasswordFault : ADWSProxy.ADWS.CustomActionFault + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class ChangeOptionalFeatureFault : CustomActionFault { } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "GetADPrincipalAuthorizationGroupFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class GetADPrincipalAuthorizationGroupFault : ADWSProxy.ADWS.CustomActionFault + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class GetADForestFault : CustomActionFault { } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "TranslateNameFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class TranslateNameFault : ADWSProxy.ADWS.CustomActionFault + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class MoveADOperationMasterRoleFault : CustomActionFault { } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "GetADDomainControllerFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class GetADDomainControllerFault : ADWSProxy.ADWS.CustomActionFault + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class GetADDomainFault : CustomActionFault { } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "GetADDomainFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class GetADDomainFault : ADWSProxy.ADWS.CustomActionFault + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class GetADDomainControllerFault : CustomActionFault { } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "MoveADOperationMasterRoleFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class MoveADOperationMasterRoleFault : ADWSProxy.ADWS.CustomActionFault + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class TranslateNameFault : CustomActionFault { } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "GetADForestFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class GetADForestFault : ADWSProxy.ADWS.CustomActionFault + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class GetADPrincipalAuthorizationGroupFault : CustomActionFault { } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "ChangeOptionalFeatureFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class ChangeOptionalFeatureFault : ADWSProxy.ADWS.CustomActionFault + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class ChangePasswordFault : CustomActionFault { } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "GetVersionFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class GetVersionFault : ADWSProxy.ADWS.CustomActionFault + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class SetPasswordFault : CustomActionFault { } - + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] - [System.Runtime.Serialization.DataContractAttribute(Name = "GetADGroupMemberFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class GetADGroupMemberFault : ADWSProxy.ADWS.CustomActionFault + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class GetADPrincipalGroupMembershipFault : CustomActionFault { } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "http://schemas.xmlsoap.org/ws/2004/09/transfer", ConfigurationName = "ADWSProxy.ADWS.Resource", SessionMode = System.ServiceModel.SessionMode.Required)] + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ServiceModel.ServiceContractAttribute(Namespace="http://schemas.xmlsoap.org/ws/2004/09/transfer", ConfigurationName="ADWSProxy.ADWS.Resource")] public interface Resource { - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Get", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "DestinationUnreachable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail1), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "EncodingLimit", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FragmentDialect), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "FragmentDialectNotSupported", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.AttributeTypeNotValid), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "CannotProcessFilter", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "SchemaValidationError", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "AccessDenied", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name = "UnwillingToPerform", Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - System.ServiceModel.Channels.Message Get(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Get", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse")] + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/Get", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="DestinationUnreachable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail1), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="EncodingLimit", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FragmentDialect), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="FragmentDialectNotSupported", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.AttributeTypeNotValid), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="CannotProcessFilter", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="SchemaValidationError", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="AccessDenied", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name="UnwillingToPerform", Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task GetAsync(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Put", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/PutResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "DestinationUnreachable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail1), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "EncodingLimit", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FragmentDialect), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "FragmentDialectNotSupported", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.AttributeTypeNotValid), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "CannotProcessFilter", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/fault", Name = "InvalidRepresentation")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "SchemaValidationError", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "ActionNotSupportedFault", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "AccessDenied", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name = "UnwillingToPerform", Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - System.ServiceModel.Channels.Message Put(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Put", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/PutResponse")] + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/transfer/PutResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="DestinationUnreachable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail1), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="EncodingLimit", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FragmentDialect), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="FragmentDialectNotSupported", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.AttributeTypeNotValid), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="CannotProcessFilter", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/fault", Name="InvalidRepresentation")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="SchemaValidationError", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="ActionNotSupportedFault", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="AccessDenied", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name="UnwillingToPerform", Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task PutAsync(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/DeleteResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "DestinationUnreachable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "AccessDenied", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "SchemaValidationError", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name = "UnwillingToPerform", Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - System.ServiceModel.Channels.Message Delete(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/DeleteResponse")] + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/transfer/DeleteResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="DestinationUnreachable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="AccessDenied", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="SchemaValidationError", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name="UnwillingToPerform", Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task DeleteAsync(System.ServiceModel.Channels.Message request); } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public interface ResourceChannel : ADWSProxy.ADWS.Resource, System.ServiceModel.IClientChannel { } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public partial class ResourceClient : System.ServiceModel.ClientBase, ADWSProxy.ADWS.Resource { - - public ResourceClient() + + /// + /// Implement this partial method to configure the service endpoint. + /// + /// The endpoint to configure + /// The client credentials + static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); + + public ResourceClient(EndpointConfiguration endpointConfiguration) : + base(ResourceClient.GetBindingForEndpoint(endpointConfiguration), ResourceClient.GetEndpointAddress(endpointConfiguration)) { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public ResourceClient(string endpointConfigurationName) : - base(endpointConfigurationName) + + public ResourceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : + base(ResourceClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public ResourceClient(string endpointConfigurationName, string remoteAddress) : - base(endpointConfigurationName, remoteAddress) + + public ResourceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : + base(ResourceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public ResourceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : - base(endpointConfigurationName, remoteAddress) + + public ResourceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + base(binding, remoteAddress) { } - - public ResourceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : - base(binding, remoteAddress) + + public System.Threading.Tasks.Task GetAsync(System.ServiceModel.Channels.Message request) { + return base.Channel.GetAsync(request); } - - public System.ServiceModel.Channels.Message Get(System.ServiceModel.Channels.Message request) + + public System.Threading.Tasks.Task PutAsync(System.ServiceModel.Channels.Message request) { - return base.Channel.Get(request); + return base.Channel.PutAsync(request); } - - public System.Threading.Tasks.Task GetAsync(System.ServiceModel.Channels.Message request) + + public System.Threading.Tasks.Task DeleteAsync(System.ServiceModel.Channels.Message request) { - return base.Channel.GetAsync(request); + return base.Channel.DeleteAsync(request); } - - public System.ServiceModel.Channels.Message Put(System.ServiceModel.Channels.Message request) + + public virtual System.Threading.Tasks.Task OpenAsync() { - return base.Channel.Put(request); + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } - - public System.Threading.Tasks.Task PutAsync(System.ServiceModel.Channels.Message request) + + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() { - return base.Channel.PutAsync(request); + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); } - - public System.ServiceModel.Channels.Message Delete(System.ServiceModel.Channels.Message request) + #endif + + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { - return base.Channel.Delete(request); + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_Resource)) + { + System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding(); + result.MaxBufferSize = int.MaxValue; + result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; + result.MaxReceivedMessageSize = int.MaxValue; + return result; + } + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_Resource1)) + { + System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding(); + result.MaxBufferSize = int.MaxValue; + result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; + result.MaxReceivedMessageSize = int.MaxValue; + result.Security.Mode = System.ServiceModel.SecurityMode.TransportWithMessageCredential; + result.Security.Message.ClientCredentialType = System.ServiceModel.MessageCredentialType.UserName; + return result; + } + throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } - - public System.Threading.Tasks.Task DeleteAsync(System.ServiceModel.Channels.Message request) + + private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) { - return base.Channel.DeleteAsync(request); + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_Resource)) + { + return new System.ServiceModel.EndpointAddress("net.tcp://localhost:9389/ActiveDirectoryWebServices/Windows/Resource"); + } + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_Resource1)) + { + return new System.ServiceModel.EndpointAddress(new System.Uri("net.tcp://localhost:9389/ActiveDirectoryWebServices/UserName/Resource"), new System.ServiceModel.DnsEndpointIdentity("DC01.kolen.xyz")); + } + throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); + } + + public enum EndpointConfiguration + { + + NetTcpBinding_Resource, + + NetTcpBinding_Resource1, } } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "http://schemas.xmlsoap.org/ws/2004/09/transfer", ConfigurationName = "ADWSProxy.ADWS.ResourceFactory", SessionMode = System.ServiceModel.SessionMode.Required)] + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ServiceModel.ServiceContractAttribute(Namespace="http://schemas.xmlsoap.org/ws/2004/09/transfer", ConfigurationName="ADWSProxy.ADWS.ResourceFactory")] public interface ResourceFactory { - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Create", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "DestinationUnreachable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail1), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "EncodingLimit", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FragmentDialect), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "FragmentDialectNotSupported", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/fault", Name = "InvalidRepresentation")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.AttributeTypeNotValid), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "CannotProcessFilter", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "ActionNotSupportedFault", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "SchemaValidationError", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "AlreadyExists", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "AccessDenied", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name = "UnwillingToPerform", Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - System.ServiceModel.Channels.Message Create(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Create", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse")] + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="DestinationUnreachable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail1), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="EncodingLimit", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FragmentDialect), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="FragmentDialectNotSupported", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/fault", Name="InvalidRepresentation")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.AttributeTypeNotValid), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="CannotProcessFilter", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="ActionNotSupportedFault", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="SchemaValidationError", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="AlreadyExists", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="AccessDenied", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name="UnwillingToPerform", Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task CreateAsync(System.ServiceModel.Channels.Message request); } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public interface ResourceFactoryChannel : ADWSProxy.ADWS.ResourceFactory, System.ServiceModel.IClientChannel { } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public partial class ResourceFactoryClient : System.ServiceModel.ClientBase, ADWSProxy.ADWS.ResourceFactory { - - public ResourceFactoryClient() + + /// + /// Implement this partial method to configure the service endpoint. + /// + /// The endpoint to configure + /// The client credentials + static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); + + public ResourceFactoryClient(EndpointConfiguration endpointConfiguration) : + base(ResourceFactoryClient.GetBindingForEndpoint(endpointConfiguration), ResourceFactoryClient.GetEndpointAddress(endpointConfiguration)) { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public ResourceFactoryClient(string endpointConfigurationName) : - base(endpointConfigurationName) + + public ResourceFactoryClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : + base(ResourceFactoryClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public ResourceFactoryClient(string endpointConfigurationName, string remoteAddress) : - base(endpointConfigurationName, remoteAddress) + + public ResourceFactoryClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : + base(ResourceFactoryClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public ResourceFactoryClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : - base(endpointConfigurationName, remoteAddress) + + public ResourceFactoryClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + base(binding, remoteAddress) { } - - public ResourceFactoryClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : - base(binding, remoteAddress) + + public System.Threading.Tasks.Task CreateAsync(System.ServiceModel.Channels.Message request) { + return base.Channel.CreateAsync(request); } - - public System.ServiceModel.Channels.Message Create(System.ServiceModel.Channels.Message request) + + public virtual System.Threading.Tasks.Task OpenAsync() { - return base.Channel.Create(request); + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } - - public System.Threading.Tasks.Task CreateAsync(System.ServiceModel.Channels.Message request) + + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() { - return base.Channel.CreateAsync(request); + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) + { + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_ResourceFactory)) + { + System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding(); + result.MaxBufferSize = int.MaxValue; + result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; + result.MaxReceivedMessageSize = int.MaxValue; + return result; + } + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_ResourceFactory1)) + { + System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding(); + result.MaxBufferSize = int.MaxValue; + result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; + result.MaxReceivedMessageSize = int.MaxValue; + result.Security.Mode = System.ServiceModel.SecurityMode.TransportWithMessageCredential; + result.Security.Message.ClientCredentialType = System.ServiceModel.MessageCredentialType.UserName; + return result; + } + throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); + } + + private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) + { + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_ResourceFactory)) + { + return new System.ServiceModel.EndpointAddress("net.tcp://localhost:9389/ActiveDirectoryWebServices/Windows/ResourceFactory"); + } + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_ResourceFactory1)) + { + return new System.ServiceModel.EndpointAddress(new System.Uri("net.tcp://localhost:9389/ActiveDirectoryWebServices/UserName/ResourceFactory"), new System.ServiceModel.DnsEndpointIdentity("DC01.kolen.xyz")); + } + throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); + } + + public enum EndpointConfiguration + { + + NetTcpBinding_ResourceFactory, + + NetTcpBinding_ResourceFactory1, } } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "http://schemas.xmlsoap.org/ws/2004/09/enumeration", ConfigurationName = "ADWSProxy.ADWS.Search", SessionMode = System.ServiceModel.SessionMode.Required)] + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ServiceModel.ServiceContractAttribute(Namespace="http://schemas.xmlsoap.org/ws/2004/09/enumeration", ConfigurationName="ADWSProxy.ADWS.Search")] public interface Search { - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "CannotProcessFilter")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.SupportedDialect), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "FilterDialectRequestedUnavailable")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "InvalidExpirationTime")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "DestinationUnreachable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "InvalidSortKey", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "EnumerationContextLimitExceeded", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.SupportedSelectOrSortDialect), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "UnsupportedSelectOrSortDialectFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "InvalidPropertyFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - System.ServiceModel.Channels.Message Enumerate(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse")] + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="CannotProcessFilter")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.SupportedDialect), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="FilterDialectRequestedUnavailable")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="InvalidExpirationTime")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="DestinationUnreachable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="InvalidSortKey", Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="EnumerationContextLimitExceeded", Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.SupportedSelectOrSortDialect), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="UnsupportedSelectOrSortDialectFault", Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="InvalidPropertyFault", Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task EnumerateAsync(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "DestinationUnreachable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "InvalidEnumerationContext")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.PullFault), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "TimedOut")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.PullFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "MaxCharsNotSupported", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.PullFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "MaxTimeExceedsLimit", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - System.ServiceModel.Channels.Message Pull(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse")] + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="DestinationUnreachable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="InvalidEnumerationContext")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.PullFault), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="TimedOut")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.PullFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="MaxCharsNotSupported", Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.PullFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="MaxTimeExceedsLimit", Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task PullAsync(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Renew", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/RenewResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "InvalidEnumerationContext")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.RenewFault), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "UnableToRenew")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - System.ServiceModel.Channels.Message Renew(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Renew", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/RenewResponse")] + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/Renew", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/enumeration/RenewResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="InvalidEnumerationContext")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.RenewFault), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="UnableToRenew")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task RenewAsync(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/GetStatus", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/GetStatusResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "InvalidEnumerationContext")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - System.ServiceModel.Channels.Message GetStatus(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/GetStatus", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/GetStatusResponse")] + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/GetStatus", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/enumeration/GetStatusResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="InvalidEnumerationContext")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task GetStatusAsync(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Release", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/ReleaseResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - System.ServiceModel.Channels.Message Release(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Release", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/ReleaseResponse")] + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/Release", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/enumeration/ReleaseResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task ReleaseAsync(System.ServiceModel.Channels.Message request); } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public interface SearchChannel : ADWSProxy.ADWS.Search, System.ServiceModel.IClientChannel { } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public partial class SearchClient : System.ServiceModel.ClientBase, ADWSProxy.ADWS.Search { - - public SearchClient() - { - } - - public SearchClient(string endpointConfigurationName) : - base(endpointConfigurationName) + + /// + /// Implement this partial method to configure the service endpoint. + /// + /// The endpoint to configure + /// The client credentials + static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); + + public SearchClient(EndpointConfiguration endpointConfiguration) : + base(SearchClient.GetBindingForEndpoint(endpointConfiguration), SearchClient.GetEndpointAddress(endpointConfiguration)) { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public SearchClient(string endpointConfigurationName, string remoteAddress) : - base(endpointConfigurationName, remoteAddress) + + public SearchClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : + base(SearchClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public SearchClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : - base(endpointConfigurationName, remoteAddress) + + public SearchClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : + base(SearchClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public SearchClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + + public SearchClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } - - public System.ServiceModel.Channels.Message Enumerate(System.ServiceModel.Channels.Message request) - { - return base.Channel.Enumerate(request); - } - + public System.Threading.Tasks.Task EnumerateAsync(System.ServiceModel.Channels.Message request) { return base.Channel.EnumerateAsync(request); } - - public System.ServiceModel.Channels.Message Pull(System.ServiceModel.Channels.Message request) - { - return base.Channel.Pull(request); - } - + public System.Threading.Tasks.Task PullAsync(System.ServiceModel.Channels.Message request) { return base.Channel.PullAsync(request); } - - public System.ServiceModel.Channels.Message Renew(System.ServiceModel.Channels.Message request) - { - return base.Channel.Renew(request); - } - + public System.Threading.Tasks.Task RenewAsync(System.ServiceModel.Channels.Message request) { return base.Channel.RenewAsync(request); } - - public System.ServiceModel.Channels.Message GetStatus(System.ServiceModel.Channels.Message request) - { - return base.Channel.GetStatus(request); - } - + public System.Threading.Tasks.Task GetStatusAsync(System.ServiceModel.Channels.Message request) { return base.Channel.GetStatusAsync(request); } - - public System.ServiceModel.Channels.Message Release(System.ServiceModel.Channels.Message request) - { - return base.Channel.Release(request); - } - + public System.Threading.Tasks.Task ReleaseAsync(System.ServiceModel.Channels.Message request) { return base.Channel.ReleaseAsync(request); } + + public virtual System.Threading.Tasks.Task OpenAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); + } + + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) + { + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_Search)) + { + System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding(); + result.MaxBufferSize = int.MaxValue; + result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; + result.MaxReceivedMessageSize = int.MaxValue; + return result; + } + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_Search1)) + { + System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding(); + result.MaxBufferSize = int.MaxValue; + result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; + result.MaxReceivedMessageSize = int.MaxValue; + result.Security.Mode = System.ServiceModel.SecurityMode.TransportWithMessageCredential; + result.Security.Message.ClientCredentialType = System.ServiceModel.MessageCredentialType.UserName; + return result; + } + throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); + } + + private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) + { + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_Search)) + { + return new System.ServiceModel.EndpointAddress("net.tcp://localhost:9389/ActiveDirectoryWebServices/Windows/Enumeration"); + } + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_Search1)) + { + return new System.ServiceModel.EndpointAddress(new System.Uri("net.tcp://localhost:9389/ActiveDirectoryWebServices/UserName/Enumeration"), new System.ServiceModel.DnsEndpointIdentity("DC01.kolen.xyz")); + } + throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); + } + + public enum EndpointConfiguration + { + + NetTcpBinding_Search, + + NetTcpBinding_Search1, + } } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", ConfigurationName = "ADWSProxy.ADWS.AccountManagement", SessionMode = System.ServiceModel.SessionMode.Required)] + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ServiceModel.ServiceContractAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", ConfigurationName="ADWSProxy.ADWS.AccountManagement")] public interface AccountManagement { - - // CODEGEN: Generating message contract since the wrapper name (GetADGroupMemberRequest) of message GetADGroupMemberRequest does not match the default value (GetADGroupMember) - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/GetADGroupMember", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/GetADGroupMemberResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADGroupMemberFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetADGroupMemberFault")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryDirectoryServer))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryObject))] - ADWSProxy.ADWS.GetADGroupMemberResponse GetADGroupMember(ADWSProxy.ADWS.GetADGroupMemberRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/GetADGroupMember", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/GetADGroupMember", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + "nt/GetADGroupMemberResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADGroupMemberFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetADGroupMemberFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task GetADGroupMemberAsync(ADWSProxy.ADWS.GetADGroupMemberRequest request); - - // CODEGEN: Generating message contract since the wrapper name (GetADPrincipalGroupMembershipRequest) of message GetADPrincipalGroupMembershipRequest does not match the default value (GetADPrincipalGroupMembership) - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/GetADPrincipalGroupMembership", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/GetADPrincipalGroupMembershipResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADPrincipalGroupMembershipFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetADPrincipalGroupMembershipFault")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryDirectoryServer))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryObject))] - ADWSProxy.ADWS.GetADPrincipalGroupMembershipResponse GetADPrincipalGroupMembership(ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/GetADPrincipalGroupMembership", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/GetADPrincipalGroupMembership", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + "nt/GetADPrincipalGroupMembershipResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADPrincipalGroupMembershipFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetADPrincipalGroupMembershipFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task GetADPrincipalGroupMembershipAsync(ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest request); - - // CODEGEN: Generating message contract since the wrapper name (SetPasswordRequest) of message SetPasswordRequest does not match the default value (SetPassword) - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/SetPassword", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/SetPasswordResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.SetPasswordFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "SetPasswordFault")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryDirectoryServer))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryObject))] - ADWSProxy.ADWS.SetPasswordResponse SetPassword(ADWSProxy.ADWS.SetPasswordRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/SetPassword", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/SetPassword", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + "nt/SetPasswordResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.SetPasswordFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="SetPasswordFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task SetPasswordAsync(ADWSProxy.ADWS.SetPasswordRequest request); - - // CODEGEN: Generating message contract since the wrapper name (ChangePasswordRequest) of message ChangePasswordRequest does not match the default value (ChangePassword) - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/ChangePassword", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/ChangePasswordResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.ChangePasswordFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "ChangePasswordFault")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryDirectoryServer))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryObject))] - ADWSProxy.ADWS.ChangePasswordResponse ChangePassword(ADWSProxy.ADWS.ChangePasswordRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/ChangePassword", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/ChangePassword", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + "nt/ChangePasswordResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.ChangePasswordFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="ChangePasswordFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task ChangePasswordAsync(ADWSProxy.ADWS.ChangePasswordRequest request); - - // CODEGEN: Generating message contract since the wrapper name (GetADPrincipalAuthorizationGroupRequest) of message GetADPrincipalAuthorizationGroupRequest does not match the default value (GetADPrincipalAuthorizationGroup) - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/GetADPrincipalAuthorizationGroup", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/GetADPrincipalAuthorizationGroupResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetADPrincipalAuthorizationGroupFault")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryDirectoryServer))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryObject))] - ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupResponse GetADPrincipalAuthorizationGroup(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/GetADPrincipalAuthorizationGroup", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/GetADPrincipalAuthorizationGroup", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + "nt/GetADPrincipalAuthorizationGroupResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetADPrincipalAuthorizationGroupFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task GetADPrincipalAuthorizationGroupAsync(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest request); - - // CODEGEN: Generating message contract since the wrapper name (TranslateNameRequest) of message TranslateNameRequest does not match the default value (TranslateName) - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/TranslateName", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/TranslateNameResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.TranslateNameFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "TranslateNameFault")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryDirectoryServer))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryObject))] - ADWSProxy.ADWS.TranslateNameResponse TranslateName(ADWSProxy.ADWS.TranslateNameRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/TranslateName", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/TranslateName", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + "nt/TranslateNameResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.TranslateNameFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="TranslateNameFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task TranslateNameAsync(ADWSProxy.ADWS.TranslateNameRequest request); } - + /// [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryGroup))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ActiveDirectoryPrincipal : ActiveDirectoryObject { - + private byte[] sIDField; - + private string samAccountNameField; - + /// - [System.Xml.Serialization.XmlElementAttribute(DataType = "base64Binary", IsNullable = true, Order = 0)] + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary", IsNullable=true, Order=0)] public byte[] SID { get @@ -1632,9 +1573,9 @@ public byte[] SID this.sIDField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] public string SamAccountName { get @@ -1647,34 +1588,32 @@ public string SamAccountName } } } - + /// [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryPartition))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryDomain))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryPrincipal))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryGroup))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ActiveDirectoryObject { - + private string distinguishedNameField; - + private string nameField; - + private string objectClassField; - + private string objectGuidField; - + private string[] objectTypesField; - + private string referenceServerField; - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] public string DistinguishedName { get @@ -1686,9 +1625,9 @@ public string DistinguishedName this.distinguishedNameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] public string Name { get @@ -1700,9 +1639,9 @@ public string Name this.nameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)] public string ObjectClass { get @@ -1714,9 +1653,9 @@ public string ObjectClass this.objectClassField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] + [System.Xml.Serialization.XmlElementAttribute(Order=3)] public string ObjectGuid { get @@ -1728,10 +1667,10 @@ public string ObjectGuid this.objectGuidField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 4)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=4)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] ObjectTypes { get @@ -1743,9 +1682,9 @@ public string[] ObjectTypes this.objectTypesField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 5)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=5)] public string ReferenceServer { get @@ -1758,628 +1697,802 @@ public string ReferenceServer } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryDomain))] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class ActiveDirectoryForest + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class ActiveDirectoryPartition : ActiveDirectoryObject { - - private string[] applicationPartitionsField; - - private string[] crossForestReferencesField; - - private string domainNamingMasterField; - - private string[] domainsField; - - private int forestModeField; - - private string[] globalCatalogsField; - - private string nameField; - - private string rootDomainField; - - private string[] sPNSuffixesField; - - private string schemaMasterField; - - private string[] sitesField; - - private string[] uPNSuffixesField; - + + private string dNSRootField; + + private string deletedObjectsContainerField; + + private string lostAndFoundContainerField; + + private string quotasContainerField; + + private string[] readOnlyReplicaDirectoryServerField; + + private string[] replicaDirectoryServerField; + + private string[] subordinateReferencesField; + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 0)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] ApplicationPartitions + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] + public string DNSRoot { get { - return this.applicationPartitionsField; + return this.dNSRootField; } set { - this.applicationPartitionsField = value; + this.dNSRootField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 1)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] CrossForestReferences + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] + public string DeletedObjectsContainer { get { - return this.crossForestReferencesField; + return this.deletedObjectsContainerField; } set { - this.crossForestReferencesField = value; + this.deletedObjectsContainerField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 2)] - public string DomainNamingMaster + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)] + public string LostAndFoundContainer { get { - return this.domainNamingMasterField; + return this.lostAndFoundContainerField; } set { - this.domainNamingMasterField = value; + this.lostAndFoundContainerField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 3)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] Domains + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=3)] + public string QuotasContainer { get { - return this.domainsField; + return this.quotasContainerField; } set { - this.domainsField = value; + this.quotasContainerField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public int ForestMode + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=4)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] ReadOnlyReplicaDirectoryServer { get { - return this.forestModeField; + return this.readOnlyReplicaDirectoryServerField; } set { - this.forestModeField = value; + this.readOnlyReplicaDirectoryServerField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 5)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] GlobalCatalogs + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=5)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] ReplicaDirectoryServer { get { - return this.globalCatalogsField; + return this.replicaDirectoryServerField; } set { - this.globalCatalogsField = value; + this.replicaDirectoryServerField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 6)] - public string Name + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=6)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] SubordinateReferences { get { - return this.nameField; + return this.subordinateReferencesField; } set { - this.nameField = value; + this.subordinateReferencesField = value; } } - + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class ActiveDirectoryDomain : ActiveDirectoryPartition + { + + private string[] allowedDNSSuffixesField; + + private string[] appliedGroupPoliciesField; + + private string[] childDomainsField; + + private string computersContainerField; + + private string domainControllersContainerField; + + private int domainModeField; + + private byte[] domainSIDField; + + private string foreignSecurityPrincipalsContainerField; + + private string forestField; + + private string infrastructureMasterField; + + private string lastLogonReplicationIntervalField; + + private string managedByField; + + private string netBIOSNameField; + + private string pDCEmulatorField; + + private string parentDomainField; + + private string rIDMasterField; + + private string systemsContainerField; + + private string usersContainerField; + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 7)] - public string RootDomain + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=0)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] AllowedDNSSuffixes { get { - return this.rootDomainField; + return this.allowedDNSSuffixesField; } set { - this.rootDomainField = value; + this.allowedDNSSuffixesField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 8)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] SPNSuffixes + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=1)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] AppliedGroupPolicies { get { - return this.sPNSuffixesField; + return this.appliedGroupPoliciesField; } set { - this.sPNSuffixesField = value; + this.appliedGroupPoliciesField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 9)] - public string SchemaMaster + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=2)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] ChildDomains { get { - return this.schemaMasterField; + return this.childDomainsField; } set { - this.schemaMasterField = value; + this.childDomainsField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 10)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] Sites + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=3)] + public string ComputersContainer { get { - return this.sitesField; + return this.computersContainerField; } set { - this.sitesField = value; + this.computersContainerField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 11)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] UPNSuffixes + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=4)] + public string DomainControllersContainer { get { - return this.uPNSuffixesField; + return this.domainControllersContainerField; } set { - this.uPNSuffixesField = value; + this.domainControllersContainerField = value; } } - } - - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryDomainController))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class ActiveDirectoryDirectoryServer - { - - private string defaultPartitionField; - - private string hostNameField; - - private string invocationIdField; - - private int ldapPortField; - - private string nTDSSettingsObjectDNField; - - private string nameField; - - private ActiveDirectoryOperationMasterRole[] operationMasterRoleField; - - private string[] partitionsField; - - private string serverObjectDNField; - - private string serverObjectGuidField; - - private string siteField; - - private int sslPortField; - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] - public string DefaultPartition + [System.Xml.Serialization.XmlElementAttribute(Order=5)] + public int DomainMode { get { - return this.defaultPartitionField; + return this.domainModeField; } set { - this.defaultPartitionField = value; + this.domainModeField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] - public string HostName + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary", IsNullable=true, Order=6)] + public byte[] DomainSID { get { - return this.hostNameField; + return this.domainSIDField; } set { - this.hostNameField = value; + this.domainSIDField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public string InvocationId + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=7)] + public string ForeignSecurityPrincipalsContainer { get { - return this.invocationIdField; + return this.foreignSecurityPrincipalsContainerField; } set { - this.invocationIdField = value; + this.foreignSecurityPrincipalsContainerField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order = 3)] - public int LdapPort + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=8)] + public string Forest { get { - return this.ldapPortField; + return this.forestField; } set { - this.ldapPortField = value; + this.forestField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 4)] - public string NTDSSettingsObjectDN + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=9)] + public string InfrastructureMaster { get { - return this.nTDSSettingsObjectDNField; + return this.infrastructureMasterField; } set { - this.nTDSSettingsObjectDNField = value; + this.infrastructureMasterField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 5)] - public string Name + [System.Xml.Serialization.XmlElementAttribute(DataType="duration", IsNullable=true, Order=10)] + public string LastLogonReplicationInterval { get { - return this.nameField; + return this.lastLogonReplicationIntervalField; } set { - this.nameField = value; + this.lastLogonReplicationIntervalField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 6)] - public ActiveDirectoryOperationMasterRole[] OperationMasterRole + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=11)] + public string ManagedBy { get { - return this.operationMasterRoleField; + return this.managedByField; } set { - this.operationMasterRoleField = value; + this.managedByField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 7)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] Partitions + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=12)] + public string NetBIOSName { get { - return this.partitionsField; + return this.netBIOSNameField; } set { - this.partitionsField = value; + this.netBIOSNameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 8)] - public string ServerObjectDN + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=13)] + public string PDCEmulator { get { - return this.serverObjectDNField; + return this.pDCEmulatorField; } set { - this.serverObjectDNField = value; + this.pDCEmulatorField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order = 9)] - public string ServerObjectGuid + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=14)] + public string ParentDomain { get { - return this.serverObjectGuidField; + return this.parentDomainField; } set { - this.serverObjectGuidField = value; + this.parentDomainField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 10)] - public string Site + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=15)] + public string RIDMaster { get { - return this.siteField; + return this.rIDMasterField; } set { - this.siteField = value; + this.rIDMasterField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order = 11)] - public int SslPort + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=16)] + public string SystemsContainer { get { - return this.sslPortField; + return this.systemsContainerField; } set { - this.sslPortField = value; + this.systemsContainerField = value; } } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public enum ActiveDirectoryOperationMasterRole - { - - /// - PDCEmulator, - - /// - RIDMaster, - - /// - InfrastructureMaster, - - /// - SchemaMaster, - - /// - DomainNamingMaster, - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class ActiveDirectoryDomainController : ActiveDirectoryDirectoryServer - { - - private string computerDNField; - - private string domainField; - - private bool enabledField; - - private string forestField; - - private bool isGlobalCatalogField; - - private bool isReadOnlyField; - - private string oSHotFixField; - - private string oSNameField; - - private string oSServicepackField; - - private string oSVersionField; - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] - public string ComputerDN + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=17)] + public string UsersContainer { get { - return this.computerDNField; + return this.usersContainerField; } set { - this.computerDNField = value; + this.usersContainerField = value; } } - + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class ActiveDirectoryGroup : ActiveDirectoryPrincipal + { + + private ActiveDirectoryGroupScope groupScopeField; + + private ActiveDirectoryGroupType groupTypeField; + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] - public string Domain + [System.Xml.Serialization.XmlElementAttribute(Order=0)] + public ActiveDirectoryGroupScope GroupScope { get { - return this.domainField; + return this.groupScopeField; } set { - this.domainField = value; + this.groupScopeField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order = 2)] - public bool Enabled + [System.Xml.Serialization.XmlElementAttribute(Order=1)] + public ActiveDirectoryGroupType GroupType { get { - return this.enabledField; + return this.groupTypeField; } set { - this.enabledField = value; + this.groupTypeField = value; } } - + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public enum ActiveDirectoryGroupScope + { + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 3)] - public string Forest + Unknown, + + /// + DomainLocal, + + /// + Global, + + /// + Universal, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public enum ActiveDirectoryGroupType + { + + /// + Unknown, + + /// + Distribution, + + /// + Security, + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetADGroupMemberRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class GetADGroupMemberRequest + { + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string Server; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string GroupDN; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string PartitionDN; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] + public bool Recursive; + + public GetADGroupMemberRequest() { - get - { - return this.forestField; - } - set - { - this.forestField = value; - } } - - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 4)] - public bool IsGlobalCatalog + + public GetADGroupMemberRequest(string Server, string GroupDN, string PartitionDN, bool Recursive) { - get - { - return this.isGlobalCatalogField; - } - set - { - this.isGlobalCatalogField = value; - } + this.Server = Server; + this.GroupDN = GroupDN; + this.PartitionDN = PartitionDN; + this.Recursive = Recursive; } - - /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public bool IsReadOnly + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetADGroupMemberResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class GetADGroupMemberResponse + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + public ADWSProxy.ADWS.ActiveDirectoryPrincipal[] Members; + + public GetADGroupMemberResponse() { - get - { - return this.isReadOnlyField; - } - set - { - this.isReadOnlyField = value; - } } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 6)] - public string OSHotFix + + public GetADGroupMemberResponse(ADWSProxy.ADWS.ActiveDirectoryPrincipal[] Members) { - get - { - return this.oSHotFixField; - } - set - { - this.oSHotFixField = value; - } + this.Members = Members; } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 7)] - public string OSName + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetADPrincipalGroupMembershipRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class GetADPrincipalGroupMembershipRequest + { + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string Server; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string PartitionDN; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string PrincipalDN; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string ResourceContextPartition; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=3)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string ResourceContextServer; + + public GetADPrincipalGroupMembershipRequest() { - get - { - return this.oSNameField; - } - set - { - this.oSNameField = value; - } } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 8)] - public string OSServicepack + + public GetADPrincipalGroupMembershipRequest(string Server, string PartitionDN, string PrincipalDN, string ResourceContextPartition, string ResourceContextServer) { - get - { - return this.oSServicepackField; - } - set - { - this.oSServicepackField = value; - } + this.Server = Server; + this.PartitionDN = PartitionDN; + this.PrincipalDN = PrincipalDN; + this.ResourceContextPartition = ResourceContextPartition; + this.ResourceContextServer = ResourceContextServer; } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 9)] - public string OSVersion + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetADPrincipalGroupMembershipResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class GetADPrincipalGroupMembershipResponse + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + public ADWSProxy.ADWS.ActiveDirectoryGroup[] MemberOf; + + public GetADPrincipalGroupMembershipResponse() { - get - { - return this.oSVersionField; - } - set - { - this.oSVersionField = value; - } + } + + public GetADPrincipalGroupMembershipResponse(ADWSProxy.ADWS.ActiveDirectoryGroup[] MemberOf) + { + this.MemberOf = MemberOf; } } - + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="SetPasswordRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class SetPasswordRequest + { + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string Server; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string AccountDN; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string NewPassword; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string PartitionDN; + + public SetPasswordRequest() + { + } + + public SetPasswordRequest(string Server, string AccountDN, string NewPassword, string PartitionDN) + { + this.Server = Server; + this.AccountDN = AccountDN; + this.NewPassword = NewPassword; + this.PartitionDN = PartitionDN; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="SetPasswordResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class SetPasswordResponse + { + + public SetPasswordResponse() + { + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="ChangePasswordRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class ChangePasswordRequest + { + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string Server; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string AccountDN; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string NewPassword; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string OldPassword; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=3)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string PartitionDN; + + public ChangePasswordRequest() + { + } + + public ChangePasswordRequest(string Server, string AccountDN, string NewPassword, string OldPassword, string PartitionDN) + { + this.Server = Server; + this.AccountDN = AccountDN; + this.NewPassword = NewPassword; + this.OldPassword = OldPassword; + this.PartitionDN = PartitionDN; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="ChangePasswordResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class ChangePasswordResponse + { + + public ChangePasswordResponse() + { + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetADPrincipalAuthorizationGroupRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class GetADPrincipalAuthorizationGroupRequest + { + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string Server; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string PartitionDN; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string PrincipalDN; + + public GetADPrincipalAuthorizationGroupRequest() + { + } + + public GetADPrincipalAuthorizationGroupRequest(string Server, string PartitionDN, string PrincipalDN) + { + this.Server = Server; + this.PartitionDN = PartitionDN; + this.PrincipalDN = PrincipalDN; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetADPrincipalAuthorizationGroupResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class GetADPrincipalAuthorizationGroupResponse + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + public ADWSProxy.ADWS.ActiveDirectoryGroup[] MemberOf; + + public GetADPrincipalAuthorizationGroupResponse() + { + } + + public GetADPrincipalAuthorizationGroupResponse(ADWSProxy.ADWS.ActiveDirectoryGroup[] MemberOf) + { + this.MemberOf = MemberOf; + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public enum ActiveDirectoryNameFormat + { + + /// + DistinguishedName, + + /// + CanonicalName, + } + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ActiveDirectoryNameTranslateResult { - + private string nameField; - + private uint resultField; - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] public string Name { get @@ -2391,9 +2504,9 @@ public string Name this.nameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] + [System.Xml.Serialization.XmlElementAttribute(Order=1)] public uint Result { get @@ -2406,1389 +2519,1114 @@ public uint Result } } } - - /// - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryDomain))] - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class ActiveDirectoryPartition : ActiveDirectoryObject + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="TranslateNameRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class TranslateNameRequest { - - private string dNSRootField; - - private string deletedObjectsContainerField; - - private string lostAndFoundContainerField; - - private string quotasContainerField; - - private string[] readOnlyReplicaDirectoryServerField; - - private string[] replicaDirectoryServerField; - - private string[] subordinateReferencesField; - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] - public string DNSRoot + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string Server; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + public ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatDesired; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] + public ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatOffered; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] Names; + + public TranslateNameRequest() { - get - { - return this.dNSRootField; - } - set - { - this.dNSRootField = value; - } } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] - public string DeletedObjectsContainer + + public TranslateNameRequest(string Server, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatDesired, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatOffered, string[] Names) { - get - { - return this.deletedObjectsContainerField; - } - set - { - this.deletedObjectsContainerField = value; - } + this.Server = Server; + this.FormatDesired = FormatDesired; + this.FormatOffered = FormatOffered; + this.Names = Names; } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 2)] - public string LostAndFoundContainer + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="TranslateNameResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class TranslateNameResponse + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + public ADWSProxy.ADWS.ActiveDirectoryNameTranslateResult[] NameTranslateResult; + + public TranslateNameResponse() { - get - { - return this.lostAndFoundContainerField; - } - set - { - this.lostAndFoundContainerField = value; - } } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 3)] - public string QuotasContainer + + public TranslateNameResponse(ADWSProxy.ADWS.ActiveDirectoryNameTranslateResult[] NameTranslateResult) { - get - { - return this.quotasContainerField; - } - set - { - this.quotasContainerField = value; - } + this.NameTranslateResult = NameTranslateResult; } - - /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 4)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] ReadOnlyReplicaDirectoryServer + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + public interface AccountManagementChannel : ADWSProxy.ADWS.AccountManagement, System.ServiceModel.IClientChannel + { + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + public partial class AccountManagementClient : System.ServiceModel.ClientBase, ADWSProxy.ADWS.AccountManagement + { + + /// + /// Implement this partial method to configure the service endpoint. + /// + /// The endpoint to configure + /// The client credentials + static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); + + public AccountManagementClient(EndpointConfiguration endpointConfiguration) : + base(AccountManagementClient.GetBindingForEndpoint(endpointConfiguration), AccountManagementClient.GetEndpointAddress(endpointConfiguration)) { - get - { - return this.readOnlyReplicaDirectoryServerField; - } - set - { - this.readOnlyReplicaDirectoryServerField = value; - } + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 5)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] ReplicaDirectoryServer + + public AccountManagementClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : + base(AccountManagementClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { - get + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); + } + + public AccountManagementClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : + base(AccountManagementClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) + { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); + } + + public AccountManagementClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + base(binding, remoteAddress) + { + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.GetADGroupMemberAsync(ADWSProxy.ADWS.GetADGroupMemberRequest request) + { + return base.Channel.GetADGroupMemberAsync(request); + } + + public System.Threading.Tasks.Task GetADGroupMemberAsync(string Server, string GroupDN, string PartitionDN, bool Recursive) + { + ADWSProxy.ADWS.GetADGroupMemberRequest inValue = new ADWSProxy.ADWS.GetADGroupMemberRequest(); + inValue.Server = Server; + inValue.GroupDN = GroupDN; + inValue.PartitionDN = PartitionDN; + inValue.Recursive = Recursive; + return ((ADWSProxy.ADWS.AccountManagement)(this)).GetADGroupMemberAsync(inValue); + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.GetADPrincipalGroupMembershipAsync(ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest request) + { + return base.Channel.GetADPrincipalGroupMembershipAsync(request); + } + + public System.Threading.Tasks.Task GetADPrincipalGroupMembershipAsync(string Server, string PartitionDN, string PrincipalDN, string ResourceContextPartition, string ResourceContextServer) + { + ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest inValue = new ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest(); + inValue.Server = Server; + inValue.PartitionDN = PartitionDN; + inValue.PrincipalDN = PrincipalDN; + inValue.ResourceContextPartition = ResourceContextPartition; + inValue.ResourceContextServer = ResourceContextServer; + return ((ADWSProxy.ADWS.AccountManagement)(this)).GetADPrincipalGroupMembershipAsync(inValue); + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.SetPasswordAsync(ADWSProxy.ADWS.SetPasswordRequest request) + { + return base.Channel.SetPasswordAsync(request); + } + + public System.Threading.Tasks.Task SetPasswordAsync(string Server, string AccountDN, string NewPassword, string PartitionDN) + { + ADWSProxy.ADWS.SetPasswordRequest inValue = new ADWSProxy.ADWS.SetPasswordRequest(); + inValue.Server = Server; + inValue.AccountDN = AccountDN; + inValue.NewPassword = NewPassword; + inValue.PartitionDN = PartitionDN; + return ((ADWSProxy.ADWS.AccountManagement)(this)).SetPasswordAsync(inValue); + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.ChangePasswordAsync(ADWSProxy.ADWS.ChangePasswordRequest request) + { + return base.Channel.ChangePasswordAsync(request); + } + + public System.Threading.Tasks.Task ChangePasswordAsync(string Server, string AccountDN, string NewPassword, string OldPassword, string PartitionDN) + { + ADWSProxy.ADWS.ChangePasswordRequest inValue = new ADWSProxy.ADWS.ChangePasswordRequest(); + inValue.Server = Server; + inValue.AccountDN = AccountDN; + inValue.NewPassword = NewPassword; + inValue.OldPassword = OldPassword; + inValue.PartitionDN = PartitionDN; + return ((ADWSProxy.ADWS.AccountManagement)(this)).ChangePasswordAsync(inValue); + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.GetADPrincipalAuthorizationGroupAsync(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest request) + { + return base.Channel.GetADPrincipalAuthorizationGroupAsync(request); + } + + public System.Threading.Tasks.Task GetADPrincipalAuthorizationGroupAsync(string Server, string PartitionDN, string PrincipalDN) + { + ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest inValue = new ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest(); + inValue.Server = Server; + inValue.PartitionDN = PartitionDN; + inValue.PrincipalDN = PrincipalDN; + return ((ADWSProxy.ADWS.AccountManagement)(this)).GetADPrincipalAuthorizationGroupAsync(inValue); + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.TranslateNameAsync(ADWSProxy.ADWS.TranslateNameRequest request) + { + return base.Channel.TranslateNameAsync(request); + } + + public System.Threading.Tasks.Task TranslateNameAsync(string Server, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatDesired, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatOffered, string[] Names) + { + ADWSProxy.ADWS.TranslateNameRequest inValue = new ADWSProxy.ADWS.TranslateNameRequest(); + inValue.Server = Server; + inValue.FormatDesired = FormatDesired; + inValue.FormatOffered = FormatOffered; + inValue.Names = Names; + return ((ADWSProxy.ADWS.AccountManagement)(this)).TranslateNameAsync(inValue); + } + + public virtual System.Threading.Tasks.Task OpenAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); + } + + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) + { + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_AccountManagement)) { - return this.replicaDirectoryServerField; + System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding(); + result.MaxBufferSize = int.MaxValue; + result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; + result.MaxReceivedMessageSize = int.MaxValue; + return result; } - set + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_AccountManagement1)) { - this.replicaDirectoryServerField = value; + System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding(); + result.MaxBufferSize = int.MaxValue; + result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; + result.MaxReceivedMessageSize = int.MaxValue; + result.Security.Mode = System.ServiceModel.SecurityMode.TransportWithMessageCredential; + result.Security.Message.ClientCredentialType = System.ServiceModel.MessageCredentialType.UserName; + return result; } + throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } - - /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 6)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] SubordinateReferences + + private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) { - get + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_AccountManagement)) { - return this.subordinateReferencesField; + return new System.ServiceModel.EndpointAddress("net.tcp://localhost:9389/ActiveDirectoryWebServices/Windows/AccountManagement"); } - set + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_AccountManagement1)) { - this.subordinateReferencesField = value; + return new System.ServiceModel.EndpointAddress(new System.Uri("net.tcp://localhost:9389/ActiveDirectoryWebServices/UserName/AccountManagement"), new System.ServiceModel.DnsEndpointIdentity("DC01.kolen.xyz")); } + throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); + } + + public enum EndpointConfiguration + { + + NetTcpBinding_AccountManagement, + + NetTcpBinding_AccountManagement1, } } - + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ServiceModel.ServiceContractAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", ConfigurationName="ADWSProxy.ADWS.TopologyManagement")] + public interface TopologyManagement + { + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADDomainController", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADDomainControllerResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADDomainControllerFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetADDomainControllerFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + System.Threading.Tasks.Task GetADDomainControllerAsync(ADWSProxy.ADWS.GetADDomainControllerRequest request); + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADDomain", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADDomainResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADDomainFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetADDomainFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + System.Threading.Tasks.Task GetADDomainAsync(ADWSProxy.ADWS.GetADDomainRequest request); + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/MoveADOperationMasterRole", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/MoveADOperationMasterRoleResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.MoveADOperationMasterRoleFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="MoveADOperationMasterRoleFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + System.Threading.Tasks.Task MoveADOperationMasterRoleAsync(ADWSProxy.ADWS.MoveADOperationMasterRoleRequest request); + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADForest", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADForestResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADForestFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetADForestFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + System.Threading.Tasks.Task GetADForestAsync(ADWSProxy.ADWS.GetADForestRequest request); + + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/ChangeOptionalFeature", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/ChangeOptionalFeatureResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.ChangeOptionalFeatureFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="ChangeOptionalFeatureFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + System.Threading.Tasks.Task ChangeOptionalFeatureAsync(ADWSProxy.ADWS.ChangeOptionalFeatureRequest request); + + // CODEGEN: Generating message contract since the operation has multiple return values. + [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetVersion", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetVersionResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetVersionFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetVersionFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + System.Threading.Tasks.Task GetVersionAsync(ADWSProxy.ADWS.GetVersionRequest request); + } + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class ActiveDirectoryDomain : ActiveDirectoryPartition + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class ActiveDirectoryDomainController : ActiveDirectoryDirectoryServer { - - private string[] allowedDNSSuffixesField; - - private string[] appliedGroupPoliciesField; - - private string[] childDomainsField; - - private string computersContainerField; - - private string domainControllersContainerField; - - private int domainModeField; - - private byte[] domainSIDField; - - private string foreignSecurityPrincipalsContainerField; - + + private string computerDNField; + + private string domainField; + + private bool enabledField; + private string forestField; - - private string infrastructureMasterField; - - private string lastLogonReplicationIntervalField; - - private string managedByField; - - private string netBIOSNameField; - - private string pDCEmulatorField; - - private string parentDomainField; - - private string rIDMasterField; - - private string systemsContainerField; - - private string usersContainerField; - + + private bool isGlobalCatalogField; + + private bool isReadOnlyField; + + private string oSHotFixField; + + private string oSNameField; + + private string oSServicepackField; + + private string oSVersionField; + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 0)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] AllowedDNSSuffixes + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] + public string ComputerDN { get { - return this.allowedDNSSuffixesField; + return this.computerDNField; } set { - this.allowedDNSSuffixesField = value; + this.computerDNField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 1)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] AppliedGroupPolicies + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] + public string Domain { get { - return this.appliedGroupPoliciesField; + return this.domainField; } set { - this.appliedGroupPoliciesField = value; + this.domainField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 2)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] ChildDomains + [System.Xml.Serialization.XmlElementAttribute(Order=2)] + public bool Enabled { get { - return this.childDomainsField; + return this.enabledField; } set { - this.childDomainsField = value; + this.enabledField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 3)] - public string ComputersContainer + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=3)] + public string Forest { get { - return this.computersContainerField; + return this.forestField; } set { - this.computersContainerField = value; + this.forestField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 4)] - public string DomainControllersContainer + [System.Xml.Serialization.XmlElementAttribute(Order=4)] + public bool IsGlobalCatalog { get { - return this.domainControllersContainerField; + return this.isGlobalCatalogField; } set { - this.domainControllersContainerField = value; + this.isGlobalCatalogField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order = 5)] - public int DomainMode + [System.Xml.Serialization.XmlElementAttribute(Order=5)] + public bool IsReadOnly { get { - return this.domainModeField; + return this.isReadOnlyField; } set { - this.domainModeField = value; + this.isReadOnlyField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(DataType = "base64Binary", IsNullable = true, Order = 6)] - public byte[] DomainSID + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=6)] + public string OSHotFix { get { - return this.domainSIDField; + return this.oSHotFixField; } set { - this.domainSIDField = value; + this.oSHotFixField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 7)] - public string ForeignSecurityPrincipalsContainer + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=7)] + public string OSName { get { - return this.foreignSecurityPrincipalsContainerField; + return this.oSNameField; } set { - this.foreignSecurityPrincipalsContainerField = value; + this.oSNameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 8)] - public string Forest + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=8)] + public string OSServicepack { get { - return this.forestField; + return this.oSServicepackField; } set { - this.forestField = value; + this.oSServicepackField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 9)] - public string InfrastructureMaster + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=9)] + public string OSVersion { get { - return this.infrastructureMasterField; + return this.oSVersionField; } set { - this.infrastructureMasterField = value; + this.oSVersionField = value; } } - - /// - [System.Xml.Serialization.XmlElementAttribute(DataType = "duration", IsNullable = true, Order = 10)] - public string LastLogonReplicationInterval - { - get - { - return this.lastLogonReplicationIntervalField; - } - set - { - this.lastLogonReplicationIntervalField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 11)] - public string ManagedBy - { - get - { - return this.managedByField; - } - set - { - this.managedByField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 12)] - public string NetBIOSName - { - get - { - return this.netBIOSNameField; - } - set - { - this.netBIOSNameField = value; - } - } - + } + + /// + [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryDomainController))] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class ActiveDirectoryDirectoryServer + { + + private string defaultPartitionField; + + private string hostNameField; + + private string invocationIdField; + + private int ldapPortField; + + private string nTDSSettingsObjectDNField; + + private string nameField; + + private ActiveDirectoryOperationMasterRole[] operationMasterRoleField; + + private string[] partitionsField; + + private string serverObjectDNField; + + private string serverObjectGuidField; + + private string siteField; + + private int sslPortField; + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 13)] - public string PDCEmulator + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] + public string DefaultPartition { get { - return this.pDCEmulatorField; + return this.defaultPartitionField; } set { - this.pDCEmulatorField = value; + this.defaultPartitionField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 14)] - public string ParentDomain + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] + public string HostName { get { - return this.parentDomainField; + return this.hostNameField; } set { - this.parentDomainField = value; + this.hostNameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 15)] - public string RIDMaster + [System.Xml.Serialization.XmlElementAttribute(Order=2)] + public string InvocationId { get { - return this.rIDMasterField; + return this.invocationIdField; } set { - this.rIDMasterField = value; + this.invocationIdField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 16)] - public string SystemsContainer + [System.Xml.Serialization.XmlElementAttribute(Order=3)] + public int LdapPort { get { - return this.systemsContainerField; + return this.ldapPortField; } set { - this.systemsContainerField = value; + this.ldapPortField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 17)] - public string UsersContainer + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=4)] + public string NTDSSettingsObjectDN { get { - return this.usersContainerField; + return this.nTDSSettingsObjectDNField; } set { - this.usersContainerField = value; + this.nTDSSettingsObjectDNField = value; } } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public partial class ActiveDirectoryGroup : ActiveDirectoryPrincipal - { - - private ActiveDirectoryGroupScope groupScopeField; - - private ActiveDirectoryGroupType groupTypeField; - + /// - [System.Xml.Serialization.XmlElementAttribute(Order = 0)] - public ActiveDirectoryGroupScope GroupScope + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=5)] + public string Name { get { - return this.groupScopeField; + return this.nameField; } set { - this.groupScopeField = value; + this.nameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order = 1)] - public ActiveDirectoryGroupType GroupType + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=6)] + public ActiveDirectoryOperationMasterRole[] OperationMasterRole { get { - return this.groupTypeField; + return this.operationMasterRoleField; } set { - this.groupTypeField = value; + this.operationMasterRoleField = value; } } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public enum ActiveDirectoryGroupScope - { - - /// - Unknown, - - /// - DomainLocal, - - /// - Global, - - /// - Universal, - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public enum ActiveDirectoryGroupType - { - - /// - Unknown, - - /// - Distribution, - - /// - Security, - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADGroupMemberRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class GetADGroupMemberRequest - { - - [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string GroupDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string PartitionDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] - public bool Recursive; - - public GetADGroupMemberRequest() - { - } - - public GetADGroupMemberRequest(string Server, string GroupDN, string PartitionDN, bool Recursive) - { - this.Server = Server; - this.GroupDN = GroupDN; - this.PartitionDN = PartitionDN; - this.Recursive = Recursive; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADGroupMemberResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class GetADGroupMemberResponse - { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] - public ADWSProxy.ADWS.ActiveDirectoryPrincipal[] Members; - - public GetADGroupMemberResponse() - { - } - - public GetADGroupMemberResponse(ADWSProxy.ADWS.ActiveDirectoryPrincipal[] Members) - { - this.Members = Members; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADPrincipalGroupMembershipRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class GetADPrincipalGroupMembershipRequest - { - - [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string PartitionDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string PrincipalDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string ResourceContextPartition; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 3)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string ResourceContextServer; - - public GetADPrincipalGroupMembershipRequest() - { - } - - public GetADPrincipalGroupMembershipRequest(string Server, string PartitionDN, string PrincipalDN, string ResourceContextPartition, string ResourceContextServer) - { - this.Server = Server; - this.PartitionDN = PartitionDN; - this.PrincipalDN = PrincipalDN; - this.ResourceContextPartition = ResourceContextPartition; - this.ResourceContextServer = ResourceContextServer; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADPrincipalGroupMembershipResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class GetADPrincipalGroupMembershipResponse - { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] - public ADWSProxy.ADWS.ActiveDirectoryGroup[] MemberOf; - - public GetADPrincipalGroupMembershipResponse() - { - } - - public GetADPrincipalGroupMembershipResponse(ADWSProxy.ADWS.ActiveDirectoryGroup[] MemberOf) - { - this.MemberOf = MemberOf; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "SetPasswordRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class SetPasswordRequest - { - - [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string AccountDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string NewPassword; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string PartitionDN; - - public SetPasswordRequest() - { - } - - public SetPasswordRequest(string Server, string AccountDN, string NewPassword, string PartitionDN) - { - this.Server = Server; - this.AccountDN = AccountDN; - this.NewPassword = NewPassword; - this.PartitionDN = PartitionDN; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "SetPasswordResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class SetPasswordResponse - { - - public SetPasswordResponse() - { - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "ChangePasswordRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class ChangePasswordRequest - { - - [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string AccountDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string NewPassword; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string OldPassword; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 3)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string PartitionDN; - - public ChangePasswordRequest() - { - } - - public ChangePasswordRequest(string Server, string AccountDN, string NewPassword, string OldPassword, string PartitionDN) - { - this.Server = Server; - this.AccountDN = AccountDN; - this.NewPassword = NewPassword; - this.OldPassword = OldPassword; - this.PartitionDN = PartitionDN; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "ChangePasswordResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class ChangePasswordResponse - { - - public ChangePasswordResponse() - { - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADPrincipalAuthorizationGroupRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class GetADPrincipalAuthorizationGroupRequest - { - - [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string PartitionDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string PrincipalDN; - - public GetADPrincipalAuthorizationGroupRequest() - { - } - - public GetADPrincipalAuthorizationGroupRequest(string Server, string PartitionDN, string PrincipalDN) - { - this.Server = Server; - this.PartitionDN = PartitionDN; - this.PrincipalDN = PrincipalDN; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADPrincipalAuthorizationGroupResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class GetADPrincipalAuthorizationGroupResponse - { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] - public ADWSProxy.ADWS.ActiveDirectoryGroup[] MemberOf; - - public GetADPrincipalAuthorizationGroupResponse() - { - } - - public GetADPrincipalAuthorizationGroupResponse(ADWSProxy.ADWS.ActiveDirectoryGroup[] MemberOf) - { - this.MemberOf = MemberOf; - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "4.8.3928.0")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - public enum ActiveDirectoryNameFormat - { - - /// - DistinguishedName, - - /// - CanonicalName, - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "TranslateNameRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class TranslateNameRequest - { - - [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - public ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatDesired; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] - public ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatOffered; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] - public string[] Names; - - public TranslateNameRequest() - { - } - - public TranslateNameRequest(string Server, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatDesired, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatOffered, string[] Names) - { - this.Server = Server; - this.FormatDesired = FormatDesired; - this.FormatOffered = FormatOffered; - this.Names = Names; - } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "TranslateNameResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class TranslateNameResponse - { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] - public ADWSProxy.ADWS.ActiveDirectoryNameTranslateResult[] NameTranslateResult; - - public TranslateNameResponse() - { - } - - public TranslateNameResponse(ADWSProxy.ADWS.ActiveDirectoryNameTranslateResult[] NameTranslateResult) - { - this.NameTranslateResult = NameTranslateResult; - } - } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public interface AccountManagementChannel : ADWSProxy.ADWS.AccountManagement, System.ServiceModel.IClientChannel - { - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - public partial class AccountManagementClient : System.ServiceModel.ClientBase, ADWSProxy.ADWS.AccountManagement - { - - public AccountManagementClient() - { - } - - public AccountManagementClient(string endpointConfigurationName) : - base(endpointConfigurationName) - { - } - - public AccountManagementClient(string endpointConfigurationName, string remoteAddress) : - base(endpointConfigurationName, remoteAddress) - { - } - - public AccountManagementClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : - base(endpointConfigurationName, remoteAddress) - { - } - - public AccountManagementClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : - base(binding, remoteAddress) - { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ADWSProxy.ADWS.GetADGroupMemberResponse ADWSProxy.ADWS.AccountManagement.GetADGroupMember(ADWSProxy.ADWS.GetADGroupMemberRequest request) - { - return base.Channel.GetADGroupMember(request); - } - - public ADWSProxy.ADWS.ActiveDirectoryPrincipal[] GetADGroupMember(string Server, string GroupDN, string PartitionDN, bool Recursive) - { - ADWSProxy.ADWS.GetADGroupMemberRequest inValue = new ADWSProxy.ADWS.GetADGroupMemberRequest(); - inValue.Server = Server; - inValue.GroupDN = GroupDN; - inValue.PartitionDN = PartitionDN; - inValue.Recursive = Recursive; - ADWSProxy.ADWS.GetADGroupMemberResponse retVal = ((ADWSProxy.ADWS.AccountManagement)(this)).GetADGroupMember(inValue); - return retVal.Members; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.GetADGroupMemberAsync(ADWSProxy.ADWS.GetADGroupMemberRequest request) - { - return base.Channel.GetADGroupMemberAsync(request); - } - - public System.Threading.Tasks.Task GetADGroupMemberAsync(string Server, string GroupDN, string PartitionDN, bool Recursive) - { - ADWSProxy.ADWS.GetADGroupMemberRequest inValue = new ADWSProxy.ADWS.GetADGroupMemberRequest(); - inValue.Server = Server; - inValue.GroupDN = GroupDN; - inValue.PartitionDN = PartitionDN; - inValue.Recursive = Recursive; - return ((ADWSProxy.ADWS.AccountManagement)(this)).GetADGroupMemberAsync(inValue); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ADWSProxy.ADWS.GetADPrincipalGroupMembershipResponse ADWSProxy.ADWS.AccountManagement.GetADPrincipalGroupMembership(ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest request) - { - return base.Channel.GetADPrincipalGroupMembership(request); - } - - public ADWSProxy.ADWS.ActiveDirectoryGroup[] GetADPrincipalGroupMembership(string Server, string PartitionDN, string PrincipalDN, string ResourceContextPartition, string ResourceContextServer) - { - ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest inValue = new ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest(); - inValue.Server = Server; - inValue.PartitionDN = PartitionDN; - inValue.PrincipalDN = PrincipalDN; - inValue.ResourceContextPartition = ResourceContextPartition; - inValue.ResourceContextServer = ResourceContextServer; - ADWSProxy.ADWS.GetADPrincipalGroupMembershipResponse retVal = ((ADWSProxy.ADWS.AccountManagement)(this)).GetADPrincipalGroupMembership(inValue); - return retVal.MemberOf; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.GetADPrincipalGroupMembershipAsync(ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest request) - { - return base.Channel.GetADPrincipalGroupMembershipAsync(request); - } - - public System.Threading.Tasks.Task GetADPrincipalGroupMembershipAsync(string Server, string PartitionDN, string PrincipalDN, string ResourceContextPartition, string ResourceContextServer) - { - ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest inValue = new ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest(); - inValue.Server = Server; - inValue.PartitionDN = PartitionDN; - inValue.PrincipalDN = PrincipalDN; - inValue.ResourceContextPartition = ResourceContextPartition; - inValue.ResourceContextServer = ResourceContextServer; - return ((ADWSProxy.ADWS.AccountManagement)(this)).GetADPrincipalGroupMembershipAsync(inValue); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ADWSProxy.ADWS.SetPasswordResponse ADWSProxy.ADWS.AccountManagement.SetPassword(ADWSProxy.ADWS.SetPasswordRequest request) - { - return base.Channel.SetPassword(request); - } - - public void SetPassword(string Server, string AccountDN, string NewPassword, string PartitionDN) - { - ADWSProxy.ADWS.SetPasswordRequest inValue = new ADWSProxy.ADWS.SetPasswordRequest(); - inValue.Server = Server; - inValue.AccountDN = AccountDN; - inValue.NewPassword = NewPassword; - inValue.PartitionDN = PartitionDN; - ADWSProxy.ADWS.SetPasswordResponse retVal = ((ADWSProxy.ADWS.AccountManagement)(this)).SetPassword(inValue); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.SetPasswordAsync(ADWSProxy.ADWS.SetPasswordRequest request) - { - return base.Channel.SetPasswordAsync(request); - } - - public System.Threading.Tasks.Task SetPasswordAsync(string Server, string AccountDN, string NewPassword, string PartitionDN) - { - ADWSProxy.ADWS.SetPasswordRequest inValue = new ADWSProxy.ADWS.SetPasswordRequest(); - inValue.Server = Server; - inValue.AccountDN = AccountDN; - inValue.NewPassword = NewPassword; - inValue.PartitionDN = PartitionDN; - return ((ADWSProxy.ADWS.AccountManagement)(this)).SetPasswordAsync(inValue); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ADWSProxy.ADWS.ChangePasswordResponse ADWSProxy.ADWS.AccountManagement.ChangePassword(ADWSProxy.ADWS.ChangePasswordRequest request) - { - return base.Channel.ChangePassword(request); - } - - public void ChangePassword(string Server, string AccountDN, string NewPassword, string OldPassword, string PartitionDN) - { - ADWSProxy.ADWS.ChangePasswordRequest inValue = new ADWSProxy.ADWS.ChangePasswordRequest(); - inValue.Server = Server; - inValue.AccountDN = AccountDN; - inValue.NewPassword = NewPassword; - inValue.OldPassword = OldPassword; - inValue.PartitionDN = PartitionDN; - ADWSProxy.ADWS.ChangePasswordResponse retVal = ((ADWSProxy.ADWS.AccountManagement)(this)).ChangePassword(inValue); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.ChangePasswordAsync(ADWSProxy.ADWS.ChangePasswordRequest request) - { - return base.Channel.ChangePasswordAsync(request); - } - - public System.Threading.Tasks.Task ChangePasswordAsync(string Server, string AccountDN, string NewPassword, string OldPassword, string PartitionDN) - { - ADWSProxy.ADWS.ChangePasswordRequest inValue = new ADWSProxy.ADWS.ChangePasswordRequest(); - inValue.Server = Server; - inValue.AccountDN = AccountDN; - inValue.NewPassword = NewPassword; - inValue.OldPassword = OldPassword; - inValue.PartitionDN = PartitionDN; - return ((ADWSProxy.ADWS.AccountManagement)(this)).ChangePasswordAsync(inValue); - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupResponse ADWSProxy.ADWS.AccountManagement.GetADPrincipalAuthorizationGroup(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest request) - { - return base.Channel.GetADPrincipalAuthorizationGroup(request); - } - - public ADWSProxy.ADWS.ActiveDirectoryGroup[] GetADPrincipalAuthorizationGroup(string Server, string PartitionDN, string PrincipalDN) - { - ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest inValue = new ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest(); - inValue.Server = Server; - inValue.PartitionDN = PartitionDN; - inValue.PrincipalDN = PrincipalDN; - ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupResponse retVal = ((ADWSProxy.ADWS.AccountManagement)(this)).GetADPrincipalAuthorizationGroup(inValue); - return retVal.MemberOf; - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.GetADPrincipalAuthorizationGroupAsync(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest request) - { - return base.Channel.GetADPrincipalAuthorizationGroupAsync(request); - } - - public System.Threading.Tasks.Task GetADPrincipalAuthorizationGroupAsync(string Server, string PartitionDN, string PrincipalDN) + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=7)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] Partitions { - ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest inValue = new ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest(); - inValue.Server = Server; - inValue.PartitionDN = PartitionDN; - inValue.PrincipalDN = PrincipalDN; - return ((ADWSProxy.ADWS.AccountManagement)(this)).GetADPrincipalAuthorizationGroupAsync(inValue); + get + { + return this.partitionsField; + } + set + { + this.partitionsField = value; + } } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ADWSProxy.ADWS.TranslateNameResponse ADWSProxy.ADWS.AccountManagement.TranslateName(ADWSProxy.ADWS.TranslateNameRequest request) + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=8)] + public string ServerObjectDN { - return base.Channel.TranslateName(request); + get + { + return this.serverObjectDNField; + } + set + { + this.serverObjectDNField = value; + } } - - public ADWSProxy.ADWS.ActiveDirectoryNameTranslateResult[] TranslateName(string Server, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatDesired, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatOffered, string[] Names) + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=9)] + public string ServerObjectGuid { - ADWSProxy.ADWS.TranslateNameRequest inValue = new ADWSProxy.ADWS.TranslateNameRequest(); - inValue.Server = Server; - inValue.FormatDesired = FormatDesired; - inValue.FormatOffered = FormatOffered; - inValue.Names = Names; - ADWSProxy.ADWS.TranslateNameResponse retVal = ((ADWSProxy.ADWS.AccountManagement)(this)).TranslateName(inValue); - return retVal.NameTranslateResult; + get + { + return this.serverObjectGuidField; + } + set + { + this.serverObjectGuidField = value; + } } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.TranslateNameAsync(ADWSProxy.ADWS.TranslateNameRequest request) + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=10)] + public string Site { - return base.Channel.TranslateNameAsync(request); + get + { + return this.siteField; + } + set + { + this.siteField = value; + } } - - public System.Threading.Tasks.Task TranslateNameAsync(string Server, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatDesired, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatOffered, string[] Names) + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=11)] + public int SslPort { - ADWSProxy.ADWS.TranslateNameRequest inValue = new ADWSProxy.ADWS.TranslateNameRequest(); - inValue.Server = Server; - inValue.FormatDesired = FormatDesired; - inValue.FormatOffered = FormatOffered; - inValue.Names = Names; - return ((ADWSProxy.ADWS.AccountManagement)(this)).TranslateNameAsync(inValue); + get + { + return this.sslPortField; + } + set + { + this.sslPortField = value; + } } } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", ConfigurationName = "ADWSProxy.ADWS.TopologyManagement", SessionMode = System.ServiceModel.SessionMode.Required)] - public interface TopologyManagement + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public enum ActiveDirectoryOperationMasterRole { - - // CODEGEN: Generating message contract since the wrapper name (GetADDomainControllerRequest) of message GetADDomainControllerRequest does not match the default value (GetADDomainController) - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADDomainController", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADDomainControllerResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADDomainControllerFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetADDomainControllerFault")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryDirectoryServer))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryObject))] - ADWSProxy.ADWS.GetADDomainControllerResponse GetADDomainController(ADWSProxy.ADWS.GetADDomainControllerRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADDomainController", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADDomainControllerResponse")] - System.Threading.Tasks.Task GetADDomainControllerAsync(ADWSProxy.ADWS.GetADDomainControllerRequest request); - - // CODEGEN: Generating message contract since the wrapper name (GetADDomainRequest) of message GetADDomainRequest does not match the default value (GetADDomain) - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADDomain", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADDomainResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADDomainFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetADDomainFault")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryDirectoryServer))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryObject))] - ADWSProxy.ADWS.GetADDomainResponse GetADDomain(ADWSProxy.ADWS.GetADDomainRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADDomain", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADDomainResponse")] - System.Threading.Tasks.Task GetADDomainAsync(ADWSProxy.ADWS.GetADDomainRequest request); - - // CODEGEN: Generating message contract since the wrapper name (MoveADOperationMasterRoleRequest) of message MoveADOperationMasterRoleRequest does not match the default value (MoveADOperationMasterRole) - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/MoveADOperationMasterRole", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/MoveADOperationMasterRoleResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.MoveADOperationMasterRoleFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "MoveADOperationMasterRoleFault")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryDirectoryServer))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryObject))] - ADWSProxy.ADWS.MoveADOperationMasterRoleResponse MoveADOperationMasterRole(ADWSProxy.ADWS.MoveADOperationMasterRoleRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/MoveADOperationMasterRole", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/MoveADOperationMasterRoleResponse")] - System.Threading.Tasks.Task MoveADOperationMasterRoleAsync(ADWSProxy.ADWS.MoveADOperationMasterRoleRequest request); - - // CODEGEN: Generating message contract since the wrapper name (GetADForestRequest) of message GetADForestRequest does not match the default value (GetADForest) - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADForest", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADForestResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADForestFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetADForestFault")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryDirectoryServer))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryObject))] - ADWSProxy.ADWS.GetADForestResponse GetADForest(ADWSProxy.ADWS.GetADForestRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADForest", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADForestResponse")] - System.Threading.Tasks.Task GetADForestAsync(ADWSProxy.ADWS.GetADForestRequest request); - - // CODEGEN: Generating message contract since the wrapper name (ChangeOptionalFeatureRequest) of message ChangeOptionalFeatureRequest does not match the default value (ChangeOptionalFeature) - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/ChangeOptionalFeature", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/ChangeOptionalFeatureResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.ChangeOptionalFeatureFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "ChangeOptionalFeatureFault")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryDirectoryServer))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryObject))] - ADWSProxy.ADWS.ChangeOptionalFeatureResponse ChangeOptionalFeature(ADWSProxy.ADWS.ChangeOptionalFeatureRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/ChangeOptionalFeature", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/ChangeOptionalFeatureResponse")] - System.Threading.Tasks.Task ChangeOptionalFeatureAsync(ADWSProxy.ADWS.ChangeOptionalFeatureRequest request); - - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetVersion", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetVersionResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetVersionFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetVersionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute()] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryDirectoryServer))] - [System.ServiceModel.ServiceKnownTypeAttribute(typeof(ActiveDirectoryObject))] - ADWSProxy.ADWS.GetVersionResponse GetVersion(ADWSProxy.ADWS.GetVersionRequest request); - - // CODEGEN: Generating message contract since the operation has multiple return values. - [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetVersion", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetVersionResponse")] - System.Threading.Tasks.Task GetVersionAsync(ADWSProxy.ADWS.GetVersionRequest request); + + /// + PDCEmulator, + + /// + RIDMaster, + + /// + InfrastructureMaster, + + /// + SchemaMaster, + + /// + DomainNamingMaster, } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADDomainControllerRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetADDomainControllerRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] public partial class GetADDomainControllerRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] NtdsSettingsDN; - + public GetADDomainControllerRequest() { } - + public GetADDomainControllerRequest(string Server, string[] NtdsSettingsDN) { this.Server = Server; this.NtdsSettingsDN = NtdsSettingsDN; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADDomainControllerResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetADDomainControllerResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] public partial class GetADDomainControllerResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] public ADWSProxy.ADWS.ActiveDirectoryDomainController[] DomainControllers; - + public GetADDomainControllerResponse() { } - + public GetADDomainControllerResponse(ADWSProxy.ADWS.ActiveDirectoryDomainController[] DomainControllers) { this.DomainControllers = DomainControllers; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADDomainRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetADDomainRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] public partial class GetADDomainRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] public string Server; - + public GetADDomainRequest() { } - + public GetADDomainRequest(string Server) { - this.Server = Server; + this.Server = Server; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetADDomainResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class GetADDomainResponse + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public ADWSProxy.ADWS.ActiveDirectoryDomain Domain; + + public GetADDomainResponse() + { + } + + public GetADDomainResponse(ADWSProxy.ADWS.ActiveDirectoryDomain Domain) + { + this.Domain = Domain; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="MoveADOperationMasterRoleRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class MoveADOperationMasterRoleRequest + { + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string Server; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + public ADWSProxy.ADWS.ActiveDirectoryOperationMasterRole OperationMasterRole; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] + public bool Seize; + + public MoveADOperationMasterRoleRequest() + { + } + + public MoveADOperationMasterRoleRequest(string Server, ADWSProxy.ADWS.ActiveDirectoryOperationMasterRole OperationMasterRole, bool Seize) + { + this.Server = Server; + this.OperationMasterRole = OperationMasterRole; + this.Seize = Seize; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="MoveADOperationMasterRoleResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + public partial class MoveADOperationMasterRoleResponse + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + public bool WasSeized; + + public MoveADOperationMasterRoleResponse() + { + } + + public MoveADOperationMasterRoleResponse(bool WasSeized) + { + this.WasSeized = WasSeized; + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + public partial class ActiveDirectoryForest + { + + private string[] applicationPartitionsField; + + private string[] crossForestReferencesField; + + private string domainNamingMasterField; + + private string[] domainsField; + + private int forestModeField; + + private string[] globalCatalogsField; + + private string nameField; + + private string rootDomainField; + + private string[] sPNSuffixesField; + + private string schemaMasterField; + + private string[] sitesField; + + private string[] uPNSuffixesField; + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=0)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] ApplicationPartitions + { + get + { + return this.applicationPartitionsField; + } + set + { + this.applicationPartitionsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=1)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] CrossForestReferences + { + get + { + return this.crossForestReferencesField; + } + set + { + this.crossForestReferencesField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)] + public string DomainNamingMaster + { + get + { + return this.domainNamingMasterField; + } + set + { + this.domainNamingMasterField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=3)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] Domains + { + get + { + return this.domainsField; + } + set + { + this.domainsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Order=4)] + public int ForestMode + { + get + { + return this.forestModeField; + } + set + { + this.forestModeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=5)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] GlobalCatalogs + { + get + { + return this.globalCatalogsField; + } + set + { + this.globalCatalogsField = value; + } } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADDomainResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class GetADDomainResponse - { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public ADWSProxy.ADWS.ActiveDirectoryDomain Domain; - - public GetADDomainResponse() + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=6)] + public string Name { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } } - - public GetADDomainResponse(ADWSProxy.ADWS.ActiveDirectoryDomain Domain) + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=7)] + public string RootDomain { - this.Domain = Domain; + get + { + return this.rootDomainField; + } + set + { + this.rootDomainField = value; + } } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "MoveADOperationMasterRoleRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class MoveADOperationMasterRoleRequest - { - - [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - public ADWSProxy.ADWS.ActiveDirectoryOperationMasterRole OperationMasterRole; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] - public bool Seize; - - public MoveADOperationMasterRoleRequest() + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=8)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] SPNSuffixes { + get + { + return this.sPNSuffixesField; + } + set + { + this.sPNSuffixesField = value; + } } - - public MoveADOperationMasterRoleRequest(string Server, ADWSProxy.ADWS.ActiveDirectoryOperationMasterRole OperationMasterRole, bool Seize) + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=9)] + public string SchemaMaster { - this.Server = Server; - this.OperationMasterRole = OperationMasterRole; - this.Seize = Seize; + get + { + return this.schemaMasterField; + } + set + { + this.schemaMasterField = value; + } } - } - - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "MoveADOperationMasterRoleResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] - public partial class MoveADOperationMasterRoleResponse - { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - public bool WasSeized; - - public MoveADOperationMasterRoleResponse() + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=10)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] Sites { + get + { + return this.sitesField; + } + set + { + this.sitesField = value; + } } - - public MoveADOperationMasterRoleResponse(bool WasSeized) + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=11)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public string[] UPNSuffixes { - this.WasSeized = WasSeized; + get + { + return this.uPNSuffixesField; + } + set + { + this.uPNSuffixesField = value; + } } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADForestRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetADForestRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] public partial class GetADForestRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] public string Server; - + public GetADForestRequest() { } - + public GetADForestRequest(string Server) { this.Server = Server; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADForestResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetADForestResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] public partial class GetADForestResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] public ADWSProxy.ADWS.ActiveDirectoryForest Forest; - + public GetADForestResponse() { } - + public GetADForestResponse(ADWSProxy.ADWS.ActiveDirectoryForest Forest) { this.Forest = Forest; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "ChangeOptionalFeatureRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] + [System.ServiceModel.MessageContractAttribute(WrapperName="ChangeOptionalFeatureRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] public partial class ChangeOptionalFeatureRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] public string DistinguishedName; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] public bool Enable; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] public string FeatureId; - + public ChangeOptionalFeatureRequest() { } - + public ChangeOptionalFeatureRequest(string Server, string DistinguishedName, bool Enable, string FeatureId) { this.Server = Server; @@ -3797,50 +3635,50 @@ public ChangeOptionalFeatureRequest(string Server, string DistinguishedName, boo this.FeatureId = FeatureId; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName = "ChangeOptionalFeatureResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] + [System.ServiceModel.MessageContractAttribute(WrapperName="ChangeOptionalFeatureResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] public partial class ChangeOptionalFeatureResponse { - + public ChangeOptionalFeatureResponse() { } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetVersionRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetVersionRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] public partial class GetVersionRequest { - + public GetVersionRequest() { } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] - [System.ServiceModel.MessageContractAttribute(WrapperName = "GetVersionResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] + [System.ServiceModel.MessageContractAttribute(WrapperName="GetVersionResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] public partial class GetVersionResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] public int VersionMajor; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] public int VersionMinor; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] public string VersionString; - + public GetVersionResponse() { } - + public GetVersionResponse(int VersionMajor, int VersionMinor, string VersionString) { this.VersionMajor = VersionMajor; @@ -3848,62 +3686,56 @@ public GetVersionResponse(int VersionMajor, int VersionMinor, string VersionStri this.VersionString = VersionString; } } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public interface TopologyManagementChannel : ADWSProxy.ADWS.TopologyManagement, System.ServiceModel.IClientChannel { } - + [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public partial class TopologyManagementClient : System.ServiceModel.ClientBase, ADWSProxy.ADWS.TopologyManagement { - - public TopologyManagementClient() + + /// + /// Implement this partial method to configure the service endpoint. + /// + /// The endpoint to configure + /// The client credentials + static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); + + public TopologyManagementClient(EndpointConfiguration endpointConfiguration) : + base(TopologyManagementClient.GetBindingForEndpoint(endpointConfiguration), TopologyManagementClient.GetEndpointAddress(endpointConfiguration)) { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public TopologyManagementClient(string endpointConfigurationName) : - base(endpointConfigurationName) - { - } - - public TopologyManagementClient(string endpointConfigurationName, string remoteAddress) : - base(endpointConfigurationName, remoteAddress) + + public TopologyManagementClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : + base(TopologyManagementClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public TopologyManagementClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : - base(endpointConfigurationName, remoteAddress) + + public TopologyManagementClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : + base(TopologyManagementClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public TopologyManagementClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + + public TopologyManagementClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ADWSProxy.ADWS.GetADDomainControllerResponse ADWSProxy.ADWS.TopologyManagement.GetADDomainController(ADWSProxy.ADWS.GetADDomainControllerRequest request) - { - return base.Channel.GetADDomainController(request); - } - - public ADWSProxy.ADWS.ActiveDirectoryDomainController[] GetADDomainController(string Server, string[] NtdsSettingsDN) - { - ADWSProxy.ADWS.GetADDomainControllerRequest inValue = new ADWSProxy.ADWS.GetADDomainControllerRequest(); - inValue.Server = Server; - inValue.NtdsSettingsDN = NtdsSettingsDN; - ADWSProxy.ADWS.GetADDomainControllerResponse retVal = ((ADWSProxy.ADWS.TopologyManagement)(this)).GetADDomainController(inValue); - return retVal.DomainControllers; - } - + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.TopologyManagement.GetADDomainControllerAsync(ADWSProxy.ADWS.GetADDomainControllerRequest request) { return base.Channel.GetADDomainControllerAsync(request); } - + public System.Threading.Tasks.Task GetADDomainControllerAsync(string Server, string[] NtdsSettingsDN) { ADWSProxy.ADWS.GetADDomainControllerRequest inValue = new ADWSProxy.ADWS.GetADDomainControllerRequest(); @@ -3911,56 +3743,26 @@ public ADWSProxy.ADWS.ActiveDirectoryDomainController[] GetADDomainController(st inValue.NtdsSettingsDN = NtdsSettingsDN; return ((ADWSProxy.ADWS.TopologyManagement)(this)).GetADDomainControllerAsync(inValue); } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ADWSProxy.ADWS.GetADDomainResponse ADWSProxy.ADWS.TopologyManagement.GetADDomain(ADWSProxy.ADWS.GetADDomainRequest request) - { - return base.Channel.GetADDomain(request); - } - - public ADWSProxy.ADWS.ActiveDirectoryDomain GetADDomain(string Server) - { - ADWSProxy.ADWS.GetADDomainRequest inValue = new ADWSProxy.ADWS.GetADDomainRequest(); - inValue.Server = Server; - ADWSProxy.ADWS.GetADDomainResponse retVal = ((ADWSProxy.ADWS.TopologyManagement)(this)).GetADDomain(inValue); - return retVal.Domain; - } - + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.TopologyManagement.GetADDomainAsync(ADWSProxy.ADWS.GetADDomainRequest request) { return base.Channel.GetADDomainAsync(request); } - + public System.Threading.Tasks.Task GetADDomainAsync(string Server) { ADWSProxy.ADWS.GetADDomainRequest inValue = new ADWSProxy.ADWS.GetADDomainRequest(); inValue.Server = Server; return ((ADWSProxy.ADWS.TopologyManagement)(this)).GetADDomainAsync(inValue); } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ADWSProxy.ADWS.MoveADOperationMasterRoleResponse ADWSProxy.ADWS.TopologyManagement.MoveADOperationMasterRole(ADWSProxy.ADWS.MoveADOperationMasterRoleRequest request) - { - return base.Channel.MoveADOperationMasterRole(request); - } - - public bool MoveADOperationMasterRole(string Server, ADWSProxy.ADWS.ActiveDirectoryOperationMasterRole OperationMasterRole, bool Seize) - { - ADWSProxy.ADWS.MoveADOperationMasterRoleRequest inValue = new ADWSProxy.ADWS.MoveADOperationMasterRoleRequest(); - inValue.Server = Server; - inValue.OperationMasterRole = OperationMasterRole; - inValue.Seize = Seize; - ADWSProxy.ADWS.MoveADOperationMasterRoleResponse retVal = ((ADWSProxy.ADWS.TopologyManagement)(this)).MoveADOperationMasterRole(inValue); - return retVal.WasSeized; - } - + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.TopologyManagement.MoveADOperationMasterRoleAsync(ADWSProxy.ADWS.MoveADOperationMasterRoleRequest request) { return base.Channel.MoveADOperationMasterRoleAsync(request); } - + public System.Threading.Tasks.Task MoveADOperationMasterRoleAsync(string Server, ADWSProxy.ADWS.ActiveDirectoryOperationMasterRole OperationMasterRole, bool Seize) { ADWSProxy.ADWS.MoveADOperationMasterRoleRequest inValue = new ADWSProxy.ADWS.MoveADOperationMasterRoleRequest(); @@ -3969,56 +3771,26 @@ public bool MoveADOperationMasterRole(string Server, ADWSProxy.ADWS.ActiveDirect inValue.Seize = Seize; return ((ADWSProxy.ADWS.TopologyManagement)(this)).MoveADOperationMasterRoleAsync(inValue); } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ADWSProxy.ADWS.GetADForestResponse ADWSProxy.ADWS.TopologyManagement.GetADForest(ADWSProxy.ADWS.GetADForestRequest request) - { - return base.Channel.GetADForest(request); - } - - public ADWSProxy.ADWS.ActiveDirectoryForest GetADForest(string Server) - { - ADWSProxy.ADWS.GetADForestRequest inValue = new ADWSProxy.ADWS.GetADForestRequest(); - inValue.Server = Server; - ADWSProxy.ADWS.GetADForestResponse retVal = ((ADWSProxy.ADWS.TopologyManagement)(this)).GetADForest(inValue); - return retVal.Forest; - } - + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.TopologyManagement.GetADForestAsync(ADWSProxy.ADWS.GetADForestRequest request) { return base.Channel.GetADForestAsync(request); } - + public System.Threading.Tasks.Task GetADForestAsync(string Server) { ADWSProxy.ADWS.GetADForestRequest inValue = new ADWSProxy.ADWS.GetADForestRequest(); inValue.Server = Server; return ((ADWSProxy.ADWS.TopologyManagement)(this)).GetADForestAsync(inValue); } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ADWSProxy.ADWS.ChangeOptionalFeatureResponse ADWSProxy.ADWS.TopologyManagement.ChangeOptionalFeature(ADWSProxy.ADWS.ChangeOptionalFeatureRequest request) - { - return base.Channel.ChangeOptionalFeature(request); - } - - public void ChangeOptionalFeature(string Server, string DistinguishedName, bool Enable, string FeatureId) - { - ADWSProxy.ADWS.ChangeOptionalFeatureRequest inValue = new ADWSProxy.ADWS.ChangeOptionalFeatureRequest(); - inValue.Server = Server; - inValue.DistinguishedName = DistinguishedName; - inValue.Enable = Enable; - inValue.FeatureId = FeatureId; - ADWSProxy.ADWS.ChangeOptionalFeatureResponse retVal = ((ADWSProxy.ADWS.TopologyManagement)(this)).ChangeOptionalFeature(inValue); - } - + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.TopologyManagement.ChangeOptionalFeatureAsync(ADWSProxy.ADWS.ChangeOptionalFeatureRequest request) { return base.Channel.ChangeOptionalFeatureAsync(request); } - + public System.Threading.Tasks.Task ChangeOptionalFeatureAsync(string Server, string DistinguishedName, bool Enable, string FeatureId) { ADWSProxy.ADWS.ChangeOptionalFeatureRequest inValue = new ADWSProxy.ADWS.ChangeOptionalFeatureRequest(); @@ -4028,25 +3800,121 @@ public void ChangeOptionalFeature(string Server, string DistinguishedName, bool inValue.FeatureId = FeatureId; return ((ADWSProxy.ADWS.TopologyManagement)(this)).ChangeOptionalFeatureAsync(inValue); } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - ADWSProxy.ADWS.GetVersionResponse ADWSProxy.ADWS.TopologyManagement.GetVersion(ADWSProxy.ADWS.GetVersionRequest request) + + public System.Threading.Tasks.Task GetVersionAsync(ADWSProxy.ADWS.GetVersionRequest request) { - return base.Channel.GetVersion(request); + return base.Channel.GetVersionAsync(request); } - - public int GetVersion(out int VersionMinor, out string VersionString) + + public virtual System.Threading.Tasks.Task OpenAsync() { - ADWSProxy.ADWS.GetVersionRequest inValue = new ADWSProxy.ADWS.GetVersionRequest(); - ADWSProxy.ADWS.GetVersionResponse retVal = ((ADWSProxy.ADWS.TopologyManagement)(this)).GetVersion(inValue); - VersionMinor = retVal.VersionMinor; - VersionString = retVal.VersionString; - return retVal.VersionMajor; + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } - - public System.Threading.Tasks.Task GetVersionAsync(ADWSProxy.ADWS.GetVersionRequest request) + + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() { - return base.Channel.GetVersionAsync(request); + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) + { + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_TopologyManagement)) + { + System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding(); + result.MaxBufferSize = int.MaxValue; + result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; + result.MaxReceivedMessageSize = int.MaxValue; + return result; + } + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_TopologyManagement1)) + { + System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding(); + result.MaxBufferSize = int.MaxValue; + result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; + result.MaxReceivedMessageSize = int.MaxValue; + result.Security.Mode = System.ServiceModel.SecurityMode.TransportWithMessageCredential; + result.Security.Message.ClientCredentialType = System.ServiceModel.MessageCredentialType.UserName; + return result; + } + throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); + } + + private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) + { + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_TopologyManagement)) + { + return new System.ServiceModel.EndpointAddress("net.tcp://localhost:9389/ActiveDirectoryWebServices/Windows/TopologyManagement"); + } + if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_TopologyManagement1)) + { + return new System.ServiceModel.EndpointAddress(new System.Uri("net.tcp://localhost:9389/ActiveDirectoryWebServices/UserName/TopologyManagement"), new System.ServiceModel.DnsEndpointIdentity("DC01.kolen.xyz")); + } + throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); + } + + public enum EndpointConfiguration + { + + NetTcpBinding_TopologyManagement, + + NetTcpBinding_TopologyManagement1, + } + } + + [System.Xml.Serialization.XmlSchemaProviderAttribute(null, IsAny=true)] + [System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil-lib", "8.0.0.0")] + public partial class ArrayOfXElement : object, System.Xml.Serialization.IXmlSerializable + { + + private System.Collections.Generic.List nodesList = new System.Collections.Generic.List(); + + public ArrayOfXElement() + { + } + + public virtual System.Collections.Generic.List Nodes + { + get + { + return this.nodesList; + } + } + + public virtual System.Xml.Schema.XmlSchema GetSchema() + { + throw new System.NotImplementedException(); + } + + public virtual void WriteXml(System.Xml.XmlWriter writer) + { + System.Collections.Generic.IEnumerator e = nodesList.GetEnumerator(); + for ( + ; e.MoveNext(); + ) + { + ((System.Xml.Serialization.IXmlSerializable)(e.Current)).WriteXml(writer); + } + } + + public virtual void ReadXml(System.Xml.XmlReader reader) + { + for ( + ; (reader.NodeType != System.Xml.XmlNodeType.EndElement); + ) + { + if ((reader.NodeType == System.Xml.XmlNodeType.Element)) + { + System.Xml.Linq.XElement elem = new System.Xml.Linq.XElement("default"); + ((System.Xml.Serialization.IXmlSerializable)(elem)).ReadXml(reader); + Nodes.Add(elem); + } + else + { + reader.Skip(); + } + } } } } diff --git a/ADWSProxy/ADWS/Connection.cs b/ADWSProxy/ADWS/Connection.cs index 9e8b2c8..fc06125 100644 --- a/ADWSProxy/ADWS/Connection.cs +++ b/ADWSProxy/ADWS/Connection.cs @@ -1,9 +1,7 @@ using ADWSProxy.ADWS.Request; using ADWSProxy.LDAP; using Flexinets.Ldap.Core; -using System; -using System.Collections.Generic; -using System.Linq; +using log4net; using System.Net; using System.Reflection; using System.ServiceModel; @@ -12,15 +10,15 @@ namespace ADWSProxy.ADWS { internal class Connection { - private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog logger = LogManager.GetLogger(type: MethodBase.GetCurrentMethod()?.DeclaringType ?? throw new ArgumentNullException()); - private NetTcpBinding _binding = null; + private NetTcpBinding? _binding = null; - private ResourceClient _resource = null; + private ResourceClient? _resource = null; - private SearchClient _search = null; + private SearchClient? _search = null; - public Connection(string server, int port, string instance, bool useWindowsAuth, NetworkCredential credential = null) + public Connection(string server, int port, string instance, bool useWindowsAuth, NetworkCredential? credential = null) { logger.Info($"Constructing new {GetType().FullName}"); @@ -74,7 +72,7 @@ private NetTcpBinding Binding } } - private NetworkCredential Credential { get; } + private NetworkCredential? Credential { get; } private string Instance { get; } private int Port { get; } @@ -86,7 +84,7 @@ private ResourceClient ResourceClient { logger.Debug($"Constructing new {typeof(ResourceClient).FullName}"); - UriBuilder uriBuilder = new UriBuilder + UriBuilder uriBuilder = new() { Scheme = "net.tcp", Host = Server, @@ -126,7 +124,7 @@ private SearchClient SearchClient { logger.Debug($"Constructing new {typeof(SearchClient).FullName}"); - UriBuilder uriBuilder = new UriBuilder + UriBuilder uriBuilder = new() { Scheme = "net.tcp", Host = Server, @@ -168,7 +166,7 @@ public List GetRootDSE() var messageBuffer = new GetRequest(Instance).CreateBufferedCopy(); messageBuffer.WriteMessageToDebug(logger); - var rootDSEResponse = ResourceClient.Get(messageBuffer.CreateMessage()); + var rootDSEResponse = ResourceClient.GetAsync(messageBuffer.CreateMessage()).Result; var rootDSEResponseBuffer = rootDSEResponse.CreateBufferedCopy(); rootDSEResponseBuffer.WriteMessageToDebug(logger); @@ -230,7 +228,7 @@ internal void Enumerate(string dn, string filter, List fields, string sc fields.Add("distinguishedname"); } - string enumerateContext = null; + string? enumerateContext = null; DateTime? enumerateContextExpires = null; int pageNumber = 0; try @@ -238,7 +236,7 @@ internal void Enumerate(string dn, string filter, List fields, string sc var enumerateRequest = new EnumerateRequest(Instance, filter, dn, scope, fields).CreateBufferedCopy(); enumerateRequest.WriteMessageToDebug(logger); - var enumerateResponse = SearchClient.Enumerate(enumerateRequest.CreateMessage()); + var enumerateResponse = SearchClient.EnumerateAsync(enumerateRequest.CreateMessage()).Result; var enumerateResponseBuffer = enumerateResponse.CreateBufferedCopy(); enumerateResponseBuffer.WriteMessageToDebug(logger); @@ -259,10 +257,10 @@ internal void Enumerate(string dn, string filter, List fields, string sc { logger.Info($"Renewing expiration for {enumerateContext}"); - var renewRequestBuffer = new RenewRequest(Instance, enumerateContext, DateTime.Now.AddMinutes(25)).CreateBufferedCopy(); + var renewRequestBuffer = new RenewRequest(Instance, enumerateContext!, DateTime.Now.AddMinutes(25)).CreateBufferedCopy(); renewRequestBuffer.WriteMessageToDebug(logger); - var renewResponse = SearchClient.Renew(renewRequestBuffer.CreateMessage()); + var renewResponse = SearchClient.RenewAsync(renewRequestBuffer.CreateMessage()).Result; var renewResponseBuffer = renewResponse.CreateBufferedCopy(); renewResponseBuffer.WriteMessageToDebug(logger); @@ -272,18 +270,18 @@ internal void Enumerate(string dn, string filter, List fields, string sc } var parsedRenewResponse = new RenewResponse(renewResponseBuffer.CreateMessage()); - string newEnumerateContext = parsedRenewResponse.EnumerateContext; + string newEnumerateContext = parsedRenewResponse.EnumerateContext!; DateTime newEnumerateContextExpires = parsedRenewResponse.Expiration; - logger.Debug($"Completed Search.Renew, old context: {enumerateContext} would expire at {enumerateContextExpires?.ToShortDateString()} and new context: {newEnumerateContext} which expires at {newEnumerateContextExpires.ToShortDateString()}"); + logger.Debug($"Completed Search.Renew, old context: {enumerateContext} would expire at {enumerateContextExpires?.ToShortDateString()} and new context: {newEnumerateContext} which expires at {newEnumerateContextExpires:d}"); enumerateContext = newEnumerateContext; enumerateContextExpires = newEnumerateContextExpires; } - var pullRequest = new PullRequest(Instance, parsedResponse.EnumerateContext).CreateBufferedCopy(); + var pullRequest = new PullRequest(Instance, parsedResponse.EnumerateContext!).CreateBufferedCopy(); pullRequest.WriteMessageToDebug(logger); - var pullResponse = SearchClient.Pull(pullRequest.CreateMessage()); + var pullResponse = SearchClient.PullAsync(pullRequest.CreateMessage()).Result; var pullResponseBuffer = pullResponse.CreateBufferedCopy(); pullResponseBuffer.WriteMessageToDebug(logger); @@ -312,7 +310,7 @@ internal void Enumerate(string dn, string filter, List fields, string sc logger.Info($"Releasing enumerateContext: {enumerateContext}"); var releaseRequest = new ReleaseRequest(Instance, enumerateContext).CreateBufferedCopy(); releaseRequest.WriteMessageToDebug(logger); - var releaseResponse = SearchClient.Release(releaseRequest.CreateMessage()); + var releaseResponse = SearchClient.ReleaseAsync(releaseRequest.CreateMessage()).Result; var releaseResponseBuffer = releaseResponse.CreateBufferedCopy(); releaseResponseBuffer.WriteMessageToDebug(logger); if (releaseResponse.IsFault) diff --git a/ADWSProxy/ADWS/Helpers.cs b/ADWSProxy/ADWS/Helpers.cs index 199f677..1854723 100644 --- a/ADWSProxy/ADWS/Helpers.cs +++ b/ADWSProxy/ADWS/Helpers.cs @@ -20,18 +20,16 @@ public static MessageBuffer CreateBufferedCopy(this Message message) public static string GetMessageString(MessageBuffer messageBuffer) { - XmlWriterSettings settings = new XmlWriterSettings() + XmlWriterSettings settings = new() { Indent = true, NewLineOnAttributes = false }; - StringBuilder output = new StringBuilder(); + StringBuilder output = new(); using (XmlWriter writer = XmlWriter.Create(output, settings)) { - using (XmlDictionaryWriter dictionaryWriter = XmlDictionaryWriter.CreateDictionaryWriter(writer)) - { - messageBuffer.CreateMessage().WriteMessage(dictionaryWriter); - } + using XmlDictionaryWriter dictionaryWriter = XmlDictionaryWriter.CreateDictionaryWriter(writer); + messageBuffer.CreateMessage().WriteMessage(dictionaryWriter); } return output.ToString(); diff --git a/ADWSProxy/ADWS/Request/ADWSException.cs b/ADWSProxy/ADWS/Request/ADWSException.cs index 95f9d7a..c1ae09e 100644 --- a/ADWSProxy/ADWS/Request/ADWSException.cs +++ b/ADWSProxy/ADWS/Request/ADWSException.cs @@ -1,43 +1,31 @@ using Newtonsoft.Json; -using System; -using System.Collections.Generic; using System.ServiceModel; using System.ServiceModel.Channels; using System.Xml; namespace ADWSProxy.ADWS.Request { - internal class ADWSException : FaultException + internal class ADWSException(MessageFault fault, FaultReason reason, FaultCode code, string action, string? ErrorType, Dictionary Errors) : FaultException(reason, code, action) { - public ADWSException(MessageFault fault, FaultReason reason, FaultCode code, string ErrorType, Dictionary Errors) : base(reason, code) - { - Fault = fault ?? throw new ArgumentNullException(nameof(fault)); - this.ErrorType = ErrorType; - this.Errors = Errors; - } - - public MessageFault Fault { get; private set; } + public MessageFault Fault { get; private set; } = fault ?? throw new ArgumentNullException(nameof(fault)); public override string Message => $"ADWS Encountered '{ErrorType}', {JsonConvert.SerializeObject(Errors)}"; - public string ErrorType { get; private set; } = null; - public Dictionary Errors { get; private set; } = new Dictionary(); + public string? ErrorType { get; private set; } = ErrorType; + public Dictionary Errors { get; private set; } = Errors; public static ADWSException FromMessageBuffer(MessageBuffer messageBuffer) { - if (messageBuffer is null) - { - throw new ArgumentNullException(nameof(messageBuffer)); - } + ArgumentNullException.ThrowIfNull(messageBuffer); var message = messageBuffer.CreateMessage(); if (!message.IsFault) { - return null; + throw new Exception("Tried to throw an ADWSException for a non faulted message"); } var fault = MessageFault.CreateFault(message, Helpers.BufferSize); - string errorType = null; + string? errorType = null; var errors = new Dictionary(); if (fault.HasDetail) { @@ -69,7 +57,7 @@ public static ADWSException FromMessageBuffer(MessageBuffer messageBuffer) } } - return new ADWSException(fault, fault.Reason, fault.Code, errorType, errors); + return new ADWSException(fault, fault.Reason, fault.Code, message.Headers.Action, errorType, errors); } } } \ No newline at end of file diff --git a/ADWSProxy/ADWS/Request/ADWSRequest.cs b/ADWSProxy/ADWS/Request/ADWSRequest.cs index 011b06a..8e3dfda 100644 --- a/ADWSProxy/ADWS/Request/ADWSRequest.cs +++ b/ADWSProxy/ADWS/Request/ADWSRequest.cs @@ -26,7 +26,7 @@ protected ADWSRequest(string instance, string objectReferenceProperty) : this(in public override MessageProperties Properties => MessageProperties; public override MessageVersion Version => MessageVersion.Soap12WSAddressing10; private MessageHeaders MessageHeaders { get; } - private MessageProperties MessageProperties { get; } = new MessageProperties(); + private MessageProperties MessageProperties { get; } = []; protected abstract override void OnWriteBodyContents(XmlDictionaryWriter writer); diff --git a/ADWSProxy/ADWS/Request/ADWSResponse.cs b/ADWSProxy/ADWS/Request/ADWSResponse.cs index be95f9a..012e1fe 100644 --- a/ADWSProxy/ADWS/Request/ADWSResponse.cs +++ b/ADWSProxy/ADWS/Request/ADWSResponse.cs @@ -1,5 +1,4 @@ -using System; -using System.ServiceModel.Channels; +using System.ServiceModel.Channels; using System.Xml; namespace ADWSProxy.ADWS.Request @@ -12,26 +11,18 @@ public override MessageHeaders Headers { get { - if (Response == null) - { - throw new ObjectDisposedException(nameof(Response)); - } - return Response.Headers; + return Response == null ? throw new ObjectDisposedException(nameof(Response)) : Response.Headers; } } - public override bool IsEmpty => Response.IsEmpty; - public override bool IsFault => Response.IsFault; + public override bool IsEmpty => Response?.IsEmpty ?? throw new NullReferenceException(); + public override bool IsFault => Response?.IsFault ?? throw new NullReferenceException(); public override MessageProperties Properties { get { - if (Response == null) - { - throw new ObjectDisposedException(nameof(Response)); - } - return Response.Properties; + return Response == null ? throw new ObjectDisposedException(nameof(Response)) : Response.Properties; } } @@ -39,26 +30,20 @@ public override MessageVersion Version { get { - if (Response == null) - { - throw new ObjectDisposedException(nameof(Response)); - } - return Response.Version; + return Response == null ? throw new ObjectDisposedException(nameof(Response)) : Response.Version; } } - internal string ObjectReference { get; private set; } = null; - private Message Response { get; set; } + internal string? ObjectReference { get; private set; } = null; + private Message? Response { get; set; } protected void DeserializeMessage(Message response) { this.OnReadHeaders(response.Headers); if (!response.IsEmpty) { - using (XmlDictionaryReader reader = response.GetReaderAtBodyContents()) - { - OnReadBodyContents(reader); - } + using XmlDictionaryReader reader = response.GetReaderAtBodyContents(); + OnReadBodyContents(reader); } Response = response; } @@ -66,8 +51,7 @@ protected void DeserializeMessage(Message response) protected override void OnClose() { base.OnClose(); - Response.Close(); - Response = null; + Response?.Close(); } protected abstract void OnReadBodyContents(XmlDictionaryReader reader); @@ -81,4 +65,4 @@ protected virtual void OnReadHeaders(MessageHeaders headers) } } } -} \ No newline at end of file +} diff --git a/ADWSProxy/ADWS/Request/EnumerateRequest.cs b/ADWSProxy/ADWS/Request/EnumerateRequest.cs index bb1e889..6f60cca 100644 --- a/ADWSProxy/ADWS/Request/EnumerateRequest.cs +++ b/ADWSProxy/ADWS/Request/EnumerateRequest.cs @@ -1,25 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Xml; +using System.Xml; namespace ADWSProxy.ADWS.Request { - internal class EnumerateRequest : ADWSRequest + internal class EnumerateRequest(string instance, string filter, string searchBase, string searchScope, IList attributes) : ADWSRequest(instance: instance) { - public EnumerateRequest(string instance, string filter, string searchBase, string searchScope, IList attributes) : base(instance: instance) - { - Filter = filter; - SearchBase = searchBase; - SearchScope = searchScope; - Attributes = attributes; - } - public override string Action => "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate"; - private IList Attributes { get; } - private string Filter { get; } - private string SearchBase { get; } - private string SearchScope { get; } + private IList Attributes { get; } = attributes; + private string Filter { get; } = filter; + private string SearchBase { get; } = searchBase; + private string SearchScope { get; } = searchScope; protected override void OnWriteBodyContents(XmlDictionaryWriter writer) { @@ -39,7 +28,7 @@ protected override void OnWriteBodyContents(XmlDictionaryWriter writer) writer.WriteEndElement(); writer.WriteEndElement(); - if (Attributes != null && Attributes.Count() > 0) + if (Attributes != null && Attributes.Count > 0) { writer.WriteStartElement("Selection", "http://schemas.microsoft.com/2008/1/ActiveDirectory"); writer.WriteAttributeString("Dialect", "http://schemas.microsoft.com/2008/1/ActiveDirectory/Dialect/XPath-Level-1"); diff --git a/ADWSProxy/ADWS/Request/EnumerateResponse.cs b/ADWSProxy/ADWS/Request/EnumerateResponse.cs index f8e3e39..0d37675 100644 --- a/ADWSProxy/ADWS/Request/EnumerateResponse.cs +++ b/ADWSProxy/ADWS/Request/EnumerateResponse.cs @@ -1,16 +1,11 @@ -using System; -using System.ServiceModel.Channels; +using System.ServiceModel.Channels; using System.Xml; namespace ADWSProxy.ADWS.Request { - internal class EnumerateResponse : ADWSResponse + internal class EnumerateResponse(Message response) : ADWSResponse(response) { - public EnumerateResponse(Message response) : base(response) - { - } - - public string EnumerateContext { get; set; } + public string? EnumerateContext { get; set; } public DateTime Expiration { get; set; } protected override void OnReadBodyContents(XmlDictionaryReader reader) diff --git a/ADWSProxy/ADWS/Request/GetRequest.cs b/ADWSProxy/ADWS/Request/GetRequest.cs index a76e326..64af399 100644 --- a/ADWSProxy/ADWS/Request/GetRequest.cs +++ b/ADWSProxy/ADWS/Request/GetRequest.cs @@ -2,12 +2,8 @@ namespace ADWSProxy.ADWS.Request { - internal class GetRequest : ADWSRequest + internal class GetRequest(string instance) : ADWSRequest(instance: instance, objectReferenceProperty: "11111111-1111-1111-1111-111111111111") { - public GetRequest(string instance) : base(instance: instance, objectReferenceProperty: "11111111-1111-1111-1111-111111111111") - { - } - public override string Action => "http://schemas.xmlsoap.org/ws/2004/09/transfer/Get"; protected override void OnWriteBodyContents(XmlDictionaryWriter writer) diff --git a/ADWSProxy/ADWS/Request/GetResponse.cs b/ADWSProxy/ADWS/Request/GetResponse.cs index 4ef713a..06c6e95 100644 --- a/ADWSProxy/ADWS/Request/GetResponse.cs +++ b/ADWSProxy/ADWS/Request/GetResponse.cs @@ -1,16 +1,11 @@ -using System.Collections.Generic; -using System.ServiceModel.Channels; +using System.ServiceModel.Channels; using System.Xml; namespace ADWSProxy.ADWS.Request { - internal class GetResponse : ADWSResponse + internal class GetResponse(Message response) : ADWSResponse(response) { - public GetResponse(Message response) : base(response) - { - } - - public Dictionary> Items { get; set; } = new Dictionary> { }; + public Dictionary> Items { get; set; } = []; protected override void OnReadBodyContents(XmlDictionaryReader reader) { @@ -24,14 +19,16 @@ protected override void OnReadBodyContents(XmlDictionaryReader reader) if (reader.NodeType == XmlNodeType.Text) { var nodeValue = reader.Value; +#pragma warning disable CA1854 // Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method if (Items.ContainsKey(elementName)) { Items[elementName].Add(nodeValue); } else { - Items.Add(elementName, new List() { nodeValue }); + Items.Add(elementName, [nodeValue]); } +#pragma warning restore CA1854 // Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method } if (reader.NodeType == XmlNodeType.EndElement && reader.LocalName != "value") { diff --git a/ADWSProxy/ADWS/Request/PullRequest.cs b/ADWSProxy/ADWS/Request/PullRequest.cs index 79cac7a..643c774 100644 --- a/ADWSProxy/ADWS/Request/PullRequest.cs +++ b/ADWSProxy/ADWS/Request/PullRequest.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.DirectoryServices.Protocols; +using System.DirectoryServices.Protocols; using System.Xml; namespace ADWSProxy.ADWS.Request @@ -18,10 +16,10 @@ public PullRequest(string instance, string enumerationContext) : base(instance: public override string Action => "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull"; - private List Controls { get; } = new List() - { - new DirectoryControl("1.2.840.113556.1.4.801", new byte[] { 0x30, 0x84, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x07 }, true, true) - }; + private List Controls { get; } = + [ + new("1.2.840.113556.1.4.801", [0x30, 0x84, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0x07], true, true) + ]; private string EnumerationContext { get; } @@ -53,7 +51,7 @@ protected override void OnWriteBodyContents(XmlDictionaryWriter writer) if (buffer != null && buffer.Length > 0) { writer.WriteStartElement("controlValue", "http://schemas.microsoft.com/2008/1/ActiveDirectory"); - string prefix = writer.LookupPrefix("http://www.w3.org/2001/XMLSchema"); + string? prefix = writer.LookupPrefix("http://www.w3.org/2001/XMLSchema"); writer.WriteAttributeString("type", "http://www.w3.org/2001/XMLSchema-instance", $"{prefix}:base64Binary"); writer.WriteBase64(buffer, 0, buffer.Length); writer.WriteEndElement(); diff --git a/ADWSProxy/ADWS/Request/PullResponse.cs b/ADWSProxy/ADWS/Request/PullResponse.cs index 35d8151..324b831 100644 --- a/ADWSProxy/ADWS/Request/PullResponse.cs +++ b/ADWSProxy/ADWS/Request/PullResponse.cs @@ -1,22 +1,16 @@ using ADWSProxy.LDAP; using Flexinets.Ldap.Core; -using System; -using System.Collections.Generic; using System.ServiceModel.Channels; using System.Xml; namespace ADWSProxy.ADWS.Request { - internal class PullResponse : ADWSResponse + internal class PullResponse(Message response) : ADWSResponse(response) { - public PullResponse(Message response) : base(response) - { - } - public bool EndOfSequence { get; private set; } = false; - public string EnumerateContext { get; private set; } + public string? EnumerateContext { get; private set; } - public Dictionary> Items { get; set; } = new Dictionary>(); + public Dictionary> Items { get; set; } = []; protected override void OnReadBodyContents(XmlDictionaryReader reader) { @@ -37,7 +31,7 @@ protected override void OnReadBodyContents(XmlDictionaryReader reader) reader.Read(); var item = new List(); - string dn = null; + string? dn = null; do { if (reader.NodeType == XmlNodeType.Element) @@ -56,7 +50,7 @@ protected override void OnReadBodyContents(XmlDictionaryReader reader) reader.Read(); if (reader.NodeType == XmlNodeType.Element) { - string type = reader.GetAttribute("type", "http://www.w3.org/2001/XMLSchema-instance"); + string? type = reader.GetAttribute("type", "http://www.w3.org/2001/XMLSchema-instance"); reader.Read(); string contentString = reader.ReadContentAsString(); @@ -85,7 +79,7 @@ protected override void OnReadBodyContents(XmlDictionaryReader reader) { Items.Add(dn, item); } - item = new List(); + item = []; dn = null; reader.Read(); if (reader.NodeType == XmlNodeType.EndElement && reader.LocalName.Equals("items", StringComparison.InvariantCultureIgnoreCase)) diff --git a/ADWSProxy/ADWS/Request/ReleaseRequest.cs b/ADWSProxy/ADWS/Request/ReleaseRequest.cs index 5cbd5b5..3694d7a 100644 --- a/ADWSProxy/ADWS/Request/ReleaseRequest.cs +++ b/ADWSProxy/ADWS/Request/ReleaseRequest.cs @@ -1,5 +1,4 @@ -using System; -using System.Xml; +using System.Xml; namespace ADWSProxy.ADWS.Request { diff --git a/ADWSProxy/ADWS/Request/RenewRequest.cs b/ADWSProxy/ADWS/Request/RenewRequest.cs index 35d9aee..1359d6a 100644 --- a/ADWSProxy/ADWS/Request/RenewRequest.cs +++ b/ADWSProxy/ADWS/Request/RenewRequest.cs @@ -1,5 +1,4 @@ -using System; -using System.Xml; +using System.Xml; namespace ADWSProxy.ADWS.Request { diff --git a/ADWSProxy/ADWS/Request/RenewResponse.cs b/ADWSProxy/ADWS/Request/RenewResponse.cs index 535b716..a597ab0 100644 --- a/ADWSProxy/ADWS/Request/RenewResponse.cs +++ b/ADWSProxy/ADWS/Request/RenewResponse.cs @@ -1,16 +1,11 @@ -using System; -using System.ServiceModel.Channels; +using System.ServiceModel.Channels; using System.Xml; namespace ADWSProxy.ADWS.Request { - internal class RenewResponse : ADWSResponse + internal class RenewResponse(Message response) : ADWSResponse(response) { - public RenewResponse(Message response) : base(response) - { - } - - public string EnumerateContext { get; set; } + public string? EnumerateContext { get; set; } public DateTime Expiration { get; set; } protected override void OnReadBodyContents(XmlDictionaryReader reader) diff --git a/ADWSProxy/ADWS/UserAccountControl.cs b/ADWSProxy/ADWS/UserAccountControl.cs index 36af156..910a638 100644 --- a/ADWSProxy/ADWS/UserAccountControl.cs +++ b/ADWSProxy/ADWS/UserAccountControl.cs @@ -1,6 +1,4 @@ -using System; - -namespace ADWSProxy.ADWS +namespace ADWSProxy.ADWS { /// /// Flags that control the behavior of the user account. diff --git a/ADWSProxy/ADWSProxy.args.json b/ADWSProxy/ADWSProxy.args.json deleted file mode 100644 index e37036f..0000000 --- a/ADWSProxy/ADWSProxy.args.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "FileVersion": 2, - "Id": "750e2653-08cf-4c6d-b82a-1e96fb256e63", - "Items": [ - { - "Id": "d5ce77d0-fd22-4514-8497-ed6246a442ec", - "Command": "--adwsdcport 9389" - }, - { - "Id": "d306ec98-350a-4314-acb7-461accd39423", - "Command": "--adwsgcport 9389" - }, - { - "Id": "4c13d48e-6abf-4626-90da-e532e0f1f1c1", - "Command": "--ldapport 389" - }, - { - "Id": "f149c078-062f-4429-bb0c-d2e736250c09", - "Command": "--gcport 3268" - }, - { - "Id": "5684100b-345a-4807-a16c-598cf6fc1549", - "Command": "--consoleloglevel DEBUG" - }, - { - "Id": "7ef4b711-3487-4467-a52b-ffa0afb7c88e", - "Command": "--logdirectory ." - }, - { - "Id": "a07ed351-3c06-4ac9-9ce4-e1687cef7ac8", - "Command": "--exitondnsstarterror true" - }, - { - "Id": "ef0010fa-8c50-41fc-b0da-04c5e6019e33", - "Command": "--usewindowsauth false" - }, - { - "Id": "f0dc762e-2490-4244-9146-91da156b7106", - "Command": "--dnsport 53" - }, - { - "Id": "eb845389-cea1-4fa3-96c1-03c52b1796c8", - "Command": "--domain XXX" - }, - { - "Id": "b707a127-33c5-4f3c-91e8-e585f10ce05b", - "Command": "--username XXX" - }, - { - "Id": "cd389b20-a824-4458-b6d9-8eedd134e593", - "Command": "--password XXX" - }, - { - "Id": "872ebef8-9a73-439d-9795-3259cacd6bc9", - "Command": "--domaincontroller dc01" - }, - { - "Id": "f7a74587-565f-4d03-aa6b-229e0119fc56", - "Command": "--globalcatalog dc01" - } - ] -} \ No newline at end of file diff --git a/ADWSProxy/ADWSProxy.csproj b/ADWSProxy/ADWSProxy.csproj index a94a54c..8b1593b 100644 --- a/ADWSProxy/ADWSProxy.csproj +++ b/ADWSProxy/ADWSProxy.csproj @@ -1,143 +1,32 @@ - - - - - Debug - AnyCPU - {750E2653-08CF-4C6D-B82A-1E96FB256E63} - Exe - ADWSProxy - ADWSProxy - v4.8 - 512 - true - true - - false - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\CommandLineParser.2.9.1\lib\net461\CommandLine.dll - - - ..\packages\DNS.7.0.0\lib\netstandard2.0\DNS.dll - - - ..\packages\Flexinets.Ldap.Core.1.0.86\lib\net471\Flexinets.Ldap.Core.dll - - - ..\packages\log4net.2.0.15\lib\net45\log4net.dll - - - ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll - - - - - - - - ..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll - True - True - - - ..\packages\System.Reflection.TypeExtensions.4.7.0\lib\net461\System.Reflection.TypeExtensions.dll - - - - ..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll - True - True - - - ..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - Microsoft .NET Framework 4.8 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - - \ No newline at end of file + + + + Exe + net8.0 + enable + enable + Linux + 1.0.1 + 1.0.1.0 + 1.0.1.0 + 1.0.1-beta + + + + + + + + + + + + + + + + + + + + diff --git a/ADWSProxy/App.config b/ADWSProxy/App.config deleted file mode 100644 index c43a35d..0000000 --- a/ADWSProxy/App.config +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ADWSProxy/CommandLineOptions.cs b/ADWSProxy/CommandLineOptions.cs index 63d0722..e150d82 100644 --- a/ADWSProxy/CommandLineOptions.cs +++ b/ADWSProxy/CommandLineOptions.cs @@ -12,54 +12,54 @@ internal class CommandLineOptions public int ADWSGCPort { get; set; } [Option("consoleloglevel", Required = false, Default = "INFO", HelpText = "Set the log level for the console output")] - public string ConsoleLogLevel { get; set; } + public string? ConsoleLogLevel { get; set; } [Option("dnsport", Required = false, Default = 53, HelpText = "The DNS port to proxy from")] public int DnsPort { get; set; } [Option('D', "domain", Required = false, Default = null, HelpText = "The domain to authenticate to ADWS")] - public string Domain { get; set; } + public string? Domain { get; set; } [Option("domaincontroller", Required = true, HelpText = "The domain controller to proxy to")] - public string DomainController { get; set; } + public string? DomainController { get; set; } [Option("exitondnsstarterror", Required = false, Default = true, HelpText = "Exit the application if the DNS port is already in use")] public bool? ExitOnDNSStartError { get; set; } [Option("gcinstance", Required = false, Default = "ldap:3268", HelpText = "The GC instance within ADWS")] - public string GCInstance { get; set; } + public string? GCInstance { get; set; } [Option("gcport", Required = false, Default = (ushort)3268, HelpText = "The GC port to proxy from")] public ushort GCPort { get; set; } [Option("globalcatalog", Required = false, HelpText = "The global catalog to proxy to")] - public string GlobalCatalog { get; set; } + public string? GlobalCatalog { get; set; } [Option("ldapinstance", Required = false, Default = "ldap:389", HelpText = "The LDAP instance within ADWS")] - public string LDAPInstance { get; set; } + public string? LDAPInstance { get; set; } [Option("ldapport", Required = false, Default = (ushort)389, HelpText = "The LDAP port to proxy from")] public ushort LDAPPort { get; set; } [Option("logdirectory", Required = false, Default = ".", HelpText = "The log directory to output runtime logs. Defaults to the current working directory.")] - public string LogDirectory { get; set; } + public string? LogDirectory { get; set; } [Option('p', "password", Required = false, Default = null, HelpText = "The password to authenticate to ADWS")] - public string Password { get; set; } + public string? Password { get; set; } [Option('u', "username", Required = false, Default = null, HelpText = "The username to authenticate to ADWS")] - public string Username { get; set; } + public string? Username { get; set; } [Option("usewindowsauth", Required = false, Default = true, HelpText = "Use Windows Authentication (default) or Username/Password with TLS")] public bool? UseWindowsAuth { get; set; } - public NetworkCredential GetNetworkCredential() + public NetworkCredential? GetNetworkCredential() { if (Username == null && Password == null && Domain == null) return null; - if (Username == null || Password == null || Domain == null) throw new System.ArgumentException("Username, Password and Domain all need to be used when one value is entered"); - - return new NetworkCredential(Username, Password, Domain); + return Username == null || Password == null || Domain == null + ? throw new ArgumentException("Username, Password and Domain all need to be used when one value is entered") + : new NetworkCredential(Username, Password, Domain); } } } \ No newline at end of file diff --git a/ADWSProxy/DNS/Resolver.cs b/ADWSProxy/DNS/Resolver.cs index f129b62..41e7eb2 100644 --- a/ADWSProxy/DNS/Resolver.cs +++ b/ADWSProxy/DNS/Resolver.cs @@ -1,17 +1,15 @@ using DNS.Client.RequestResolver; using DNS.Protocol; using DNS.Protocol.ResourceRecords; -using System; using System.Net; using System.Net.Sockets; -using System.Threading; -using System.Threading.Tasks; +using System.Reflection; namespace ADWSProxy.DNS { internal class Resolver : IRequestResolver { - private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(type: MethodBase.GetCurrentMethod()!.DeclaringType!); public Resolver(ushort ldapPort, ushort gcport) { @@ -35,7 +33,9 @@ public Task Resolve(IRequest request, CancellationToken cancellationT { logger.Info("Resolving new DNS request"); +#pragma warning disable CA1859 // Use concrete types when possible for improved performance IResponse response = Response.FromRequest(request); +#pragma warning restore CA1859 // Use concrete types when possible for improved performance foreach (Question question in response.Questions) { diff --git a/ADWSProxy/Dockerfile b/ADWSProxy/Dockerfile new file mode 100644 index 0000000..b708aba --- /dev/null +++ b/ADWSProxy/Dockerfile @@ -0,0 +1,29 @@ +# See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. + +# This stage is used when running from VS in fast mode (Default for Debug configuration) +FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base +USER $APP_UID +WORKDIR /app +EXPOSE 389 +EXPOSE 3268 + +# This stage is used to build the service project +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG BUILD_CONFIGURATION=Release +WORKDIR /src +COPY ["ADWSProxy/ADWSProxy.csproj", "ADWSProxy/"] +RUN dotnet restore "./ADWSProxy/ADWSProxy.csproj" +COPY . . +WORKDIR "/src/ADWSProxy" +RUN dotnet build "./ADWSProxy.csproj" -c $BUILD_CONFIGURATION -o /app/build + +# This stage is used to publish the service project to be copied to the final stage +FROM build AS publish +ARG BUILD_CONFIGURATION=Release +RUN dotnet publish "./ADWSProxy.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false + +# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration) +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "ADWSProxy.dll"] \ No newline at end of file diff --git a/ADWSProxy/LDAP/DataHolder.cs b/ADWSProxy/LDAP/DataHolder.cs index 6ff4735..bfe9681 100644 --- a/ADWSProxy/LDAP/DataHolder.cs +++ b/ADWSProxy/LDAP/DataHolder.cs @@ -1,19 +1,11 @@ using Flexinets.Ldap.Core; -using System; namespace ADWSProxy.LDAP { - internal class DataHolder + internal class DataHolder(string name, object data, UniversalDataType? dataType) { - public DataHolder(string name, object data, UniversalDataType? dataType) - { - Name = name ?? throw new ArgumentNullException(nameof(name)); - Data = data ?? throw new ArgumentNullException(nameof(data)); - DataType = dataType ?? throw new ArgumentNullException(nameof(DataType)); - } - - public object Data { get; } - public UniversalDataType DataType { get; } - public string Name { get; } + public object Data { get; } = data; + public UniversalDataType DataType { get; } = dataType ?? throw new ArgumentNullException(nameof(dataType)); + public string Name { get; } = name; } } \ No newline at end of file diff --git a/ADWSProxy/LDAP/Helpers.cs b/ADWSProxy/LDAP/Helpers.cs index e8eb09a..de25ece 100644 --- a/ADWSProxy/LDAP/Helpers.cs +++ b/ADWSProxy/LDAP/Helpers.cs @@ -1,12 +1,47 @@ using Flexinets.Ldap.Core; -using System.Collections.Generic; -using System.Linq; using System.Reflection; +using System.Text; namespace ADWSProxy.LDAP { internal static class Helpers { + public static string ConvertByteSidToStringSid(byte[] bytes) + { + if (bytes == null || bytes.Length < 8) + return string.Empty; + + // 1. Get Revision (Byte 0) + byte revision = bytes[0]; + + // 2. Get Sub-Authority Count (Byte 1) + int count = bytes[1]; + + // 3. Get Identifier Authority (Bytes 2 through 7) + // This is a big-endian 48-bit integer + long authority = 0; + for (int i = 2; i <= 7; i++) + { + authority = (authority << 8) | bytes[i]; + } + + // 4. Build the prefix + StringBuilder sb = new(); + sb.Append($"S-{revision}-{authority}"); + + // 5. Get Sub-Authorities (4 bytes each, little-endian) + for (int i = 0; i < count; i++) + { + int offset = 8 + (i * 4); + if (offset + 4 > bytes.Length) break; + + uint subAuthority = BitConverter.ToUInt32(bytes, offset); + sb.Append($"-{subAuthority}"); + } + + return sb.ToString(); + } + public static LdapAttribute AddItemsToResponse(this LdapAttribute response, List items) { var list = new LdapAttribute(UniversalDataType.Sequence); @@ -31,9 +66,9 @@ public static LdapAttribute AddItemsToResponse(this LdapAttribute response, List return response; } - public static byte[] GetRawValue(this LdapAttribute ldapAttribute) + public static byte[]? GetRawValue(this LdapAttribute ldapAttribute) { - return (byte[])typeof(LdapAttribute).GetField("Value", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ldapAttribute); + return typeof(LdapAttribute).GetField("Value", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(ldapAttribute) as byte[]; } /// @@ -42,8 +77,7 @@ public static byte[] GetRawValue(this LdapAttribute ldapAttribute) public static IEnumerable NTLMMatchedDN() { return - new List - { + [ 0x4e,0x54,0x4c,0x4d,0x53,0x53,0x50,0x00, // NTLMSSP\0 0x02,0x00,0x00,0x00, // NTLMSSP_CHALLENGE // Target Name: @@ -104,7 +138,7 @@ public static IEnumerable NTLMMatchedDN() 0x00,0x00, // Item Length: 0 // End attribute 0x04,0x00 // End of bind response - }; + ]; } } } \ No newline at end of file diff --git a/ADWSProxy/LDAP/LdapResultRawMatchedDNAttribute.cs b/ADWSProxy/LDAP/LdapResultRawMatchedDNAttribute.cs index a335120..e2d27ec 100644 --- a/ADWSProxy/LDAP/LdapResultRawMatchedDNAttribute.cs +++ b/ADWSProxy/LDAP/LdapResultRawMatchedDNAttribute.cs @@ -1,6 +1,4 @@ using Flexinets.Ldap.Core; -using System.Collections.Generic; -using System.Linq; namespace ADWSProxy.LDAP { @@ -9,7 +7,7 @@ internal class LdapResultRawMatchedDNAttribute : LdapAttribute /// /// This is a copy of LdapResultAttribute. However, for that class it was only possible to set the MatchedDN as a string. This resulted in changes to the data compared to sending a byte array directly. /// - internal LdapResultRawMatchedDNAttribute(LdapOperation operation, LdapResult result, IEnumerable matchedDN = null, string diagnosticMessage = "") : base(operation) + internal LdapResultRawMatchedDNAttribute(LdapOperation operation, LdapResult result, IEnumerable? matchedDN = null, string diagnosticMessage = "") : base(operation) { ChildAttributes.Add(new LdapAttribute(UniversalDataType.Enumerated, (byte)result)); if (matchedDN != null) diff --git a/ADWSProxy/LDAP/Listener.cs b/ADWSProxy/LDAP/Listener.cs index 1078042..cce5e09 100644 --- a/ADWSProxy/LDAP/Listener.cs +++ b/ADWSProxy/LDAP/Listener.cs @@ -1,22 +1,16 @@ using ADWSProxy.ADWS; using Flexinets.Ldap.Core; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; using System.Net; using System.Net.Sockets; -using System.Security.Principal; using System.Text; -using System.Threading.Tasks; namespace ADWSProxy.LDAP { internal class Listener : IDisposable { - private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod()!.DeclaringType!); - public Listener(IPEndPoint endpoint, string domainController, int adwsPort, string instance, bool useWindowsAuth, NetworkCredential credential = null) + public Listener(IPEndPoint endpoint, string domainController, int adwsPort, string instance, bool useWindowsAuth, NetworkCredential? credential = null) { logger.Info($"Constructing new {GetType().FullName}"); @@ -48,20 +42,20 @@ public void Stop() /// Handle bindrequests /// /// - private bool HandleBindRequest(Stream stream, LdapPacket requestPacket) + private static bool HandleBindRequest(Stream stream, LdapPacket requestPacket) { logger.Info($"Handling bind request"); var bindrequest = requestPacket.ChildAttributes.SingleOrDefault(o => o.LdapOperation == LdapOperation.BindRequest); - var passwordAttribute = bindrequest.ChildAttributes[2]; + var passwordAttribute = bindrequest?.ChildAttributes[2]; - LdapAttribute ldapResultPacket = null; + LdapAttribute? ldapResultPacket = null; - switch (passwordAttribute.ContextType) + switch (passwordAttribute?.ContextType) { case 0: logger.Debug("Simple authentication"); - var username = bindrequest.ChildAttributes[1].GetValue(); + var username = bindrequest?.ChildAttributes[1].GetValue(); var password = passwordAttribute.GetValue(); logger.Debug($"Credentials: {username}:{password}"); ldapResultPacket = new LdapResultAttribute(LdapOperation.BindResponse, LdapResult.success); @@ -83,7 +77,7 @@ private bool HandleBindRequest(Stream stream, LdapPacket requestPacket) break; default: - logger.Error($"Unknown authentication type: '{passwordAttribute.ContextType}'"); + logger.Error($"Unknown authentication type: '{passwordAttribute?.ContextType}'"); ldapResultPacket = new LdapResultAttribute(LdapOperation.BindResponse, LdapResult.success, matchedDN: string.Empty); break; } @@ -93,7 +87,7 @@ private bool HandleBindRequest(Stream stream, LdapPacket requestPacket) responsePacket.ChildAttributes.Add(ldapResultPacket); var responseBytes = responsePacket.GetBytes(); stream.Write(responseBytes, 0, responseBytes.Length); - return ldapResultPacket.ChildAttributes.First(i => i.DataType == UniversalDataType.Enumerated).GetRawValue()[0] == (byte)LdapResult.success; + return ldapResultPacket?.ChildAttributes.First(i => i.DataType == UniversalDataType.Enumerated)!.GetRawValue()![0] == (byte)LdapResult.success; } private void HandleClient(TcpClient client) @@ -148,43 +142,30 @@ private void HandleSearchRequest(NetworkStream stream, LdapPacket requestPacket) logger.Debug("Handling Search request"); var searchRequest = requestPacket.ChildAttributes.SingleOrDefault(o => o.LdapOperation == LdapOperation.SearchRequest); - var dnAttribute = searchRequest.ChildAttributes.First(); - var scopeAttribute = searchRequest.ChildAttributes[1]; - var filterAttributes = searchRequest.ChildAttributes.Where(item => item.Class == TagClass.Context); - var propertiesAttribute = searchRequest.ChildAttributes.Last(); + var dnAttribute = searchRequest?.ChildAttributes.First(); + var scopeAttribute = searchRequest?.ChildAttributes[1]; + var filterAttributes = searchRequest?.ChildAttributes.Where(item => item.Class == TagClass.Context); + var propertiesAttribute = searchRequest?.ChildAttributes.Last(); - var filter = ParseFilters(filterAttributes); - var properties = ParseProperties(propertiesAttribute); - var dn = dnAttribute.GetValue(); + var filter = ParseFilters(filterAttributes!); + var properties = ParseProperties(propertiesAttribute!); + var dn = dnAttribute?.GetValue(); - var scopeValue = scopeAttribute.GetValue(); - - string scope; - switch (scopeValue) + var scopeValue = scopeAttribute!.GetValue(); + string scope = scopeValue switch { - case "\u0001": - scope = "onelevel"; - break; - - case "\u0002": - scope = "subtree"; - break; - - case "\0": - scope = "base"; - break; - - default: - throw new NotImplementedException($"'{scopeValue}' is an unknown scope identifier"); - } - + "\u0001" => "onelevel", + "\u0002" => "subtree", + "\0" => "base", + _ => throw new NotImplementedException($"'{scopeValue}' is an unknown scope identifier"), + }; logger.Info($"Request DN = {dn}"); logger.Info($"Request filter = {filter}"); logger.Info($"Request properties = {string.Join(",", properties)}"); logger.Info($"Request scopeIdentifier = {scopeValue}, Scope: {scope}"); // TODO: Check if there is a more elegant solution to this. - if (dn.Equals("") && filter.ToLower().Equals("(objectclass=*)") && scope == "base") + if (string.IsNullOrEmpty(dn) && filter.ToLower().Equals("(objectclass=*)") && scope == "base") { try { @@ -220,11 +201,11 @@ private void HandleSearchRequest(NetworkStream stream, LdapPacket requestPacket) // Bloodhound.py requested the a number of non existing properties during testing. // These are removed from the request as this would cause an exception when sent to the ADWS endpoint. // Root cause of this issue has not been investigated as manually blocking these properties works for now. - if (dn.ToLower().StartsWith("cn=aggregate,cn=schema,cn=configuration,dc=") + if (dn!.StartsWith("cn=aggregate,cn=schema,cn=configuration,dc=", StringComparison.CurrentCultureIgnoreCase) && filter.ToLower().Equals("(objectclass=subschema)") && scope.Equals("base")) { - blockedProperties.AddRange(new[] { "createtimestamp", "ldapsyntaxes", "matchingrules", "matchingruleuse", "ditstructurerules", "nameforms" }); + blockedProperties.AddRange(["createtimestamp", "ldapsyntaxes", "matchingrules", "matchingruleuse", "ditstructurerules", "nameforms"]); } foreach (var blockedProperty in blockedProperties) { @@ -232,7 +213,7 @@ private void HandleSearchRequest(NetworkStream stream, LdapPacket requestPacket) } logger.Debug($"Filtered request properties = {string.Join(",", properties)}"); - ADWSConnection.Enumerate(dn, filter, properties, scope, ((string, List) result) => + ADWSConnection.Enumerate(dn!, filter, properties, scope, result => { logger.Info($"Result DN = {result.Item1}"); @@ -254,76 +235,62 @@ private void HandleSearchRequest(NetworkStream stream, LdapPacket requestPacket) stream.Write(responseDoneBytes, 0, responseDoneBytes.Length); } - private void LogPacket(LdapAttribute attribute) + private static void LogPacket(LdapAttribute attribute) { var sb = new StringBuilder(); RecurseAttributes(sb, attribute); logger.Debug($"Recieved LDAP Packet dump\n{sb}"); } - private string ParseFilter(LdapAttribute filterAttribute, StringBuilder sb = null) + private static string ParseFilter(LdapAttribute filterAttribute, StringBuilder? sb = null) { + sb ??= new StringBuilder(); + var context = (LdapFilterChoice?)filterAttribute.ContextType; if (context == null) { - return null; + return sb.ToString(); } - if (sb == null) - { - sb = new StringBuilder(); - } - - sb.Append("("); + sb.Append('('); switch (context) { case LdapFilterChoice.and: - sb.Append("&"); + sb.Append('&'); break; case LdapFilterChoice.or: - sb.Append("|"); + sb.Append('|'); break; case LdapFilterChoice.not: - sb.Append("!"); + sb.Append('!'); break; case LdapFilterChoice.substrings: var subStringAttribute = filterAttribute.ChildAttributes[1].ChildAttributes.First(); string substring = subStringAttribute.GetValue(); - string value; - switch (subStringAttribute.ContextType) + string value = subStringAttribute.ContextType switch { - case 0: - value = $"{substring}*"; - break; - - case 1: - value = $"*{substring}*"; - break; - - case 2: - value = $"*{substring}"; - break; - - default: - throw new NotImplementedException($"Unknown ContextType: '{subStringAttribute.ContextType}' in subStringAttribute"); - } - + 0 => $"{substring}*", + 1 => $"*{substring}*", + 2 => $"*{substring}", + _ => throw new NotImplementedException($"Unknown ContextType: '{subStringAttribute.ContextType}' in subStringAttribute"), + }; sb.Append($"{filterAttribute.ChildAttributes[0].GetValue()}={value}"); break; case LdapFilterChoice.equalityMatch: var name = filterAttribute.ChildAttributes[0].GetValue(); - if (name.ToLowerInvariant() == "objectsid") + if (!string.IsNullOrEmpty(name) && name.Equals("objectsid", StringComparison.InvariantCultureIgnoreCase)) { - var bytesValue = filterAttribute.ChildAttributes[1].GetRawValue(); + var bytesValue = filterAttribute.ChildAttributes[1].GetRawValue()!; string sid; try { - sid = new SecurityIdentifier(bytesValue, 0).ToString(); + // sid = new SecurityIdentifier(bytesValue, 0).ToString(); + sid = Helpers.ConvertByteSidToStringSid(bytesValue); } catch (Exception ex) { @@ -356,7 +323,7 @@ private string ParseFilter(LdapAttribute filterAttribute, StringBuilder sb = nul break; case LdapFilterChoice.extensibleMatch: - var extensibleMatchValue = filterAttribute.ChildAttributes[2].GetRawValue(); + var extensibleMatchValue = filterAttribute.ChildAttributes[2].GetRawValue()!; if (extensibleMatchValue.Length == 1 && extensibleMatchValue.First() == 0xff) { @@ -373,22 +340,22 @@ private string ParseFilter(LdapAttribute filterAttribute, StringBuilder sb = nul throw new NotImplementedException($"Unknown ContextType: '{filterAttribute.ContextType}' in filterAttribute"); } - foreach (var child in filterAttribute.ChildAttributes.Where(item => item.ChildAttributes.Any())) + foreach (var child in filterAttribute.ChildAttributes.Where(item => item.ChildAttributes.Count != 0)) { ParseFilter(child, sb); } - sb.Append(")"); + sb.Append(')'); return sb.ToString(); } - private string ParseFilters(IEnumerable filterAttribute) + private static string ParseFilters(IEnumerable filterAttribute) { var sb = new StringBuilder(); foreach (var attr in filterAttribute) { var temp = ParseFilter(attr); - if (!temp.StartsWith("(")) + if (!temp.StartsWith('(')) { temp = $"({temp})"; } @@ -397,7 +364,7 @@ private string ParseFilters(IEnumerable filterAttribute) return sb.ToString(); } - private List ParseProperties(LdapAttribute attributes) + private static List ParseProperties(LdapAttribute attributes) { var result = new List(); if (attributes != null) @@ -415,7 +382,7 @@ private List ParseProperties(LdapAttribute attributes) return result; } - private void RecurseAttributes(StringBuilder sb, LdapAttribute attribute, int depth = 1) + private static void RecurseAttributes(StringBuilder sb, LdapAttribute attribute, int depth = 1) { if (attribute != null) { diff --git a/ADWSProxy/LoggerConfig.cs b/ADWSProxy/LoggerConfig.cs index b5943a0..0f3fed2 100644 --- a/ADWSProxy/LoggerConfig.cs +++ b/ADWSProxy/LoggerConfig.cs @@ -4,7 +4,6 @@ using log4net.Filter; using log4net.Layout; using log4net.Repository.Hierarchy; -using System.IO; namespace ADWSProxy { diff --git a/ADWSProxy/Program.cs b/ADWSProxy/Program.cs index d2868ae..648587f 100644 --- a/ADWSProxy/Program.cs +++ b/ADWSProxy/Program.cs @@ -1,12 +1,10 @@ using ADWSProxy.LDAP; -using CommandLine.Text; using CommandLine; +using CommandLine.Text; using DNS.Server; using log4net; using Newtonsoft.Json; -using System; using System.Globalization; -using System.Linq; using System.Net; using System.Net.NetworkInformation; @@ -14,14 +12,14 @@ namespace ADWSProxy { internal class Program { - private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod()?.DeclaringType!); // Handles IPv4 and IPv6 notation. private static IPEndPoint CreateIPEndPoint(string endPoint) { string[] ep = endPoint.Split(':'); if (ep.Length < 2) throw new FormatException("Invalid endpoint format"); - IPAddress ip; + IPAddress? ip; if (ep.Length > 2) { if (!IPAddress.TryParse(string.Join(":", ep, 0, ep.Length - 1), out ip)) @@ -36,7 +34,7 @@ private static IPEndPoint CreateIPEndPoint(string endPoint) throw new FormatException("Invalid ip-adress"); } } - if (!int.TryParse(ep[ep.Length - 1], NumberStyles.None, NumberFormatInfo.CurrentInfo, out int port)) + if (!int.TryParse(ep[^1], NumberStyles.None, NumberFormatInfo.CurrentInfo, out int port)) { throw new FormatException("Invalid port"); } @@ -53,7 +51,7 @@ private static void Main(string[] args) var helpText = HelpText.AutoBuild(parsedArgs, h => { h.Copyright = $"Created by Rabobank Red Team"; - h.AutoVersion = true ; + h.AutoVersion = true; return h; }); Console.WriteLine(helpText); @@ -63,31 +61,43 @@ private static void Main(string[] args) return; } - LoggerConfig.ConfigureLogger(parsedArgs.Value.ConsoleLogLevel, parsedArgs.Value.LogDirectory); + LoggerConfig.ConfigureLogger(parsedArgs.Value.ConsoleLogLevel!, parsedArgs.Value.LogDirectory!); logger.Info("Starting ADWSproxy."); var exitCode = 0; - Listener LDAPListener = null; - Listener GCListener = null; + Listener? LDAPListener = null; + Listener? GCListener = null; var credentials = parsedArgs.Value.GetNetworkCredential(); try { var LDAPEndpoint = $"0.0.0.0:{parsedArgs.Value.LDAPPort}"; - LDAPListener = new Listener(CreateIPEndPoint(LDAPEndpoint), parsedArgs.Value.DomainController, parsedArgs.Value.ADWSDCPort, parsedArgs.Value.LDAPInstance, parsedArgs.Value.UseWindowsAuth.GetValueOrDefault(), credentials); + var dc = parsedArgs.Value.DomainController; + ArgumentNullException.ThrowIfNullOrWhiteSpace(dc); + if (!dc.Contains('.')) + { + dc = dc + "." + parsedArgs.Value.Domain; + } + + LDAPListener = new Listener(CreateIPEndPoint(LDAPEndpoint), dc, parsedArgs.Value.ADWSDCPort, parsedArgs.Value.LDAPInstance!, parsedArgs.Value.UseWindowsAuth.GetValueOrDefault(), credentials); LDAPListener.Start(); logger.Info($"Succesfully started the LDAPListener on {LDAPEndpoint} using instance {parsedArgs.Value.LDAPInstance}"); - if (string.IsNullOrWhiteSpace(parsedArgs.Value.GlobalCatalog)) + var gc = parsedArgs.Value.GlobalCatalog; + if (string.IsNullOrWhiteSpace(gc)) { logger.Info($"No Global Catalog server defined so no Global Catalog listener has been started"); } else { + if (!gc.Contains('.')) + { + gc = gc + "." + parsedArgs.Value.Domain; + } var GCEndpoint = $"0.0.0.0:{parsedArgs.Value.GCPort}"; - GCListener = new Listener(CreateIPEndPoint(GCEndpoint), parsedArgs.Value.GlobalCatalog, parsedArgs.Value.ADWSGCPort, parsedArgs.Value.GCInstance, parsedArgs.Value.UseWindowsAuth.GetValueOrDefault(), credentials); + GCListener = new Listener(CreateIPEndPoint(GCEndpoint), gc, parsedArgs.Value.ADWSGCPort, parsedArgs.Value.GCInstance!, parsedArgs.Value.UseWindowsAuth.GetValueOrDefault(), credentials); GCListener.Start(); logger.Info($"Succesfully started the GCListener on {GCEndpoint} using instance {parsedArgs.Value.GCInstance}"); } @@ -166,7 +176,7 @@ private static bool StartDNS(bool ExitOnDNSStartError, IPEndPoint dnsEndpoint, u } else { - DnsServer dnsServer = new DnsServer(new DNS.Resolver(ldapPort, gcPort), dnsEndpoint); + DnsServer dnsServer = new(new DNS.Resolver(ldapPort, gcPort), dnsEndpoint); dnsServer.Listen(); return true; } diff --git a/ADWSProxy/Properties/AssemblyInfo.cs b/ADWSProxy/Properties/AssemblyInfo.cs deleted file mode 100644 index b1e1bb5..0000000 --- a/ADWSProxy/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ADWSProxy")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ADWSProxy")] -[assembly: AssemblyCopyright("Copyright © 2024")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("750e2653-08cf-4c6d-b82a-1e96fb256e63")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ADWSProxy/Properties/launchSettings.json b/ADWSProxy/Properties/launchSettings.json new file mode 100644 index 0000000..43b6f5b --- /dev/null +++ b/ADWSProxy/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "ADWSProxy": { + "commandName": "Project" + }, + "Container (Dockerfile)": { + "commandName": "Docker", + "DockerfileRunArguments": "-p 389:389 -p 3268:3268", + "commandLineArgs": "--usewindowsauth false -u '[...]' -p '[...]' -D '[...]' --domaincontroller dc01 --globalcatalog dc01" + } + } +} \ No newline at end of file diff --git a/ADWSProxy/packages.config b/ADWSProxy/packages.config deleted file mode 100644 index aded6f7..0000000 --- a/ADWSProxy/packages.config +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/ADWSProxyCore.slnLaunch b/ADWSProxyCore.slnLaunch new file mode 100644 index 0000000..a761c2b --- /dev/null +++ b/ADWSProxyCore.slnLaunch @@ -0,0 +1,17 @@ +[ + { + "Name": "New Profile", + "Projects": [ + { + "Path": "ADWSProxy\\ADWSProxy.csproj", + "Action": "Start", + "DebugTarget": "Container (Dockerfile)" + }, + { + "Path": "TestClient\\TestClient.csproj", + "Action": "Start", + "DebugTarget": "Container (Dockerfile)" + } + ] + } +] \ No newline at end of file diff --git a/ADWSProxyCore.slnx b/ADWSProxyCore.slnx new file mode 100644 index 0000000..b9f45aa --- /dev/null +++ b/ADWSProxyCore.slnx @@ -0,0 +1,4 @@ + + + + diff --git a/Readme.md b/Readme.md index c4e4e6b..3d51e38 100644 --- a/Readme.md +++ b/Readme.md @@ -1,76 +1,92 @@ -# ADWSProxy +# ADWSProxy (.NET 8.0) + +A high-performance, cross-platform Active Directory Web Services (ADWS) proxy built on **.NET 8.0 LTS**. This tool bridges the gap for LDAP-based tools in environments where traditional LDAP ports (389/636) are blocked, but ADWS (9389) remains open. + +--- + +## Key Features +* **Cross-Platform:** Runs on Windows, Linux, and macOS. +* **Docker Ready:** Optimized for lightweight Linux containers (Alpine/Debian). +* **Native SID Parsing:** Includes a custom binary-to-string SID parser, eliminating dependencies on Windows-only system libraries. +* **Modern Tooling:** Built using .NET 8 (LTS) SDK and `dotnet-svcutil`. + +--- ## Usage -``` +### Command Line Arguments +```text --adwsdcport (Default: 9389) The ADWS port to proxy to on the domain controller --adwsgcport (Default: 9389) The ADWS port to proxy to on the global catalog --consoleloglevel (Default: INFO) Set the log level for the console output --dnsport (Default: 53) The DNS port to proxy from -D, --domain The domain to authenticate to ADWS --domaincontroller Required. The domain controller to proxy to - --exitondnsstarterror (Default: true) Exit the application if the DNS port is already in use + --exitondnsstarterror (Default: true) Exit if the DNS port is already in use --gcinstance (Default: ldap:3268) The GC instance within ADWS --gcport (Default: 3268) The GC port to proxy from --globalcatalog The global catalog to proxy to --ldapinstance (Default: ldap:389) The LDAP instance within ADWS --ldapport (Default: 389) The LDAP port to proxy from - --logdirectory (Default: .) The log directory to output runtime logs. Defaults to the current working directory. + --logdirectory (Default: .) The log directory for runtime logs -p, --password The password to authenticate to ADWS -u, --username The username to authenticate to ADWS - --usewindowsauth (Default: true) Use Windows Authentication or Username/Password with TLS + --usewindowsauth (Default: true) Use Windows Session (Kerberos/NTLM) or explicit credentials --help Display this help screen. --version Display version information. -``` + ``` -The Proxy can be started with the following command. Make sure that if either of `--domain`, `--username` or `--password` is set that all three values are set and corrent. These three values can be ommited if the Proxy is executed within the context of a domain joined user. + ### Starting the Proxy -``` -PS> .\ADWSProxy.exe --domain [...] --username [...] --password [...] --domaincontroller dc01.[...] --globalcatalog dc01.[...] -[ INFO ] Starting LDAP2ADWS proxy. -[ INFO ] Constructing new ADWSProxy.LDAP.Listener -[ INFO ] Constructing new ADWSProxy.ADWS.Connection -[ INFO ] Succesfully started the LDAPListener on 0.0.0.0:389 -[ INFO ] Constructing new ADWSProxy.LDAP.Listener -[ INFO ] Constructing new ADWSProxy.ADWS.Connection -[ INFO ] Succesfully started the GCListener on 0.0.0.0:3268 -[ INFO ] Constructing new ADWSProxy.DNS.Resolver -[ INFO ] Succesfully started the DNSListener on 0.0.0.0:53 -[ INFO ] Succesfully got RootDSE -Pressing Enter will close the application -``` +The proxy requires valid credentials if executed outside of a domain-joined Windows session (e.g., when running on Linux or in Docker). -[Bloodhound-Python](https://github.com/dirkjanm/BloodHound.py) can be run by setting the `-ns` argument to the DNS resolver of the Proxy. This proxy will return the machine hosting the Proxy as the Domain Controller and the Global Catalog for the domain. -The values for `-u` and `-p` does not matter as the Proxy does not check credentials. `--auth ntlm` needs to be used as the Proxy only supports Simple and NTLM authentication at this point. +Windows Example: +```text +# Using current session credentials +.\ADWSProxy.exe --domaincontroller dc01 --domain [...] +# Using explicit credentials +.\ADWSProxy.exe --usewindowsauth true -u "luc" -p "password" --domaincontroller dc01 --domain [...] ``` -PS> hostname -WinDev -PS> python -m bloodhound -u x -p x -d [...] --auth ntlm -ns 127.0.0.1 -c dconly -INFO: Found AD domain: [...] -INFO: Connecting to LDAP server: WinDev -INFO: Found 1 domains -INFO: Found 2 domains in the forest -INFO: Found 2495 users -INFO: Connecting to GC LDAP server: WinDev -INFO: Connecting to LDAP server: WinDev -INFO: Found 552 groups -INFO: Found 2 gpos -INFO: Found 223 ous -INFO: Found 19 containers -INFO: Found 102 computers -INFO: Found 1 trusts -INFO: Done in 00M 41S + +### Linux/Docker Example: +```bash +docker run -p 389:389 -p 9389:9389 adwsproxy:latest \ + --usewindowsauth false \ + --username "luc" \ + --password "password" \ + --domaincontroller dc01 \ + --domain [...] ``` -## About +## Technical Details + +### Binary SID Parsing + +To ensure full Linux compatibility, this version of ADWSProxy bypasses the `System.Security.Principal.Windows` namespace. It manually decodes the 28-byte binary `objectSid` blobs returned by ADWS into the standard string format (`S-1-5-21-...`) using a zero-dependency bit-shifter. + +### Code Generation -[ActiveDirectoryWebService.cs](ADWSProxy/ADWS/ActiveDirectoryWebService.cs) was the only generated code used within the tool. The following command was used to generate this code: +The ADWS client proxy code (`ActiveDirectoryWebService.cs`) is generated using `dotnet-svcutil`. This ensures compatibility with the .NET 8.0 `System.ServiceModel` stack. +```powershell +dotnet --fx-version 8.0.23 "C:\Users\luc\.dotnet\tools\.store\dotnet-svcutil\8.0.0\dotnet-svcutil\8.0.0\tools\net8.0\any\dotnet-svcutil.dll" \ + net.tcp://dc01.[...]:9389/ActiveDirectoryWebServices/mex \ + --namespace "*,ADWSProxy.ADWS" \ + --outputFile "ActiveDirectoryWebService.cs" \ + --serializer XmlSerializer \ + --targetFramework net8.0 ``` -SvcUtil.exe /nologo /noconfig /t:code /n:*,ADWSProxy.ADWS net.tcp://[...]:9389/ActiveDirectoryWebServices/mex /serializer:XmlSerializer + +## Integration Testing (Bloodhound) + +[Bloodhound-Python](https://github.com/dirkjanm/BloodHound.py) can be used with this proxy by setting the `-ns` argument to the proxy's IP. The proxy spoofs the LDAP response to make itself appear as the Domain Controller. + +```bash +# Example using NTLM authentication through the proxy +python3 -m bloodhound -u x -p x -d [...] --auth ntlm -ns 127.0.0.1 -c All ``` -## Blog post +## Blog Post & Background -More information about ADWS and the development of this tool can be found within the [Rabobank TechBlog](https://rabobank.jobs/en/techblog/adws-an-unconventional-path-into-active-directory-luc-kolen/). +Detailed research into ADWS exploitation and the architecture of this tool is available on the [Rabobank TechBlog](https://rabobank.jobs/en/techblog/adws-an-unconventional-path-into-active-directory-luc-kolen/). diff --git a/TestClient/Dockerfile b/TestClient/Dockerfile new file mode 100644 index 0000000..2eb18b4 --- /dev/null +++ b/TestClient/Dockerfile @@ -0,0 +1,34 @@ +# See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. + +# This stage is used when running from VS in fast mode (Default for Debug configuration) +FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base +USER $APP_UID +WORKDIR /app + +# CRITICAL: Install libldap for System.DirectoryServices.Protocols to work on Linux +USER root +RUN apt-get update && apt-get install -y --no-install-recommends \ + libldap-2.5-0 \ + && rm -rf /var/lib/apt/lists/* +USER app + +# This stage is used to build the service project +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG BUILD_CONFIGURATION=Release +WORKDIR /src +COPY ["TestClient/TestClient.csproj", "TestClient/"] +RUN dotnet restore "./TestClient/TestClient.csproj" +COPY . . +WORKDIR "/src/TestClient" +RUN dotnet build "./TestClient.csproj" -c $BUILD_CONFIGURATION -o /app/build + +# This stage is used to publish the service project to be copied to the final stage +FROM build AS publish +ARG BUILD_CONFIGURATION=Release +RUN dotnet publish "./TestClient.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false + +# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration) +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "TestClient.dll"] \ No newline at end of file diff --git a/TestClient/Program.cs b/TestClient/Program.cs new file mode 100644 index 0000000..be1fc97 --- /dev/null +++ b/TestClient/Program.cs @@ -0,0 +1,62 @@ +using System.DirectoryServices.Protocols; +using System.Net; + +namespace TestClient +{ + internal class Program + { + static void RunQuery(string server, int port, SearchRequest searchRequest, NetworkCredential credentials) + { + using var ldapConnection = new LdapConnection(new LdapDirectoryIdentifier(server, port)); + ldapConnection.SessionOptions.ProtocolVersion = 3; + ldapConnection.AuthType = AuthType.Basic; + + try + { + ldapConnection.Bind(credentials); + Console.WriteLine("Successfully bound to LDAP Proxy."); + + var response = (SearchResponse)ldapConnection.SendRequest(searchRequest); + + Console.WriteLine($"Found {response.Entries.Count} entries."); + foreach (SearchResultEntry entry in response.Entries) + { + Console.WriteLine($"DN: {entry.DistinguishedName}"); + } + } + catch (LdapException ex) + { + Console.WriteLine($"LDAP Error: {ex.Message}"); + } + catch (Exception ex) + { + Console.WriteLine($"Error: {ex.Message}"); + } + } + + static async Task Main(string[] args) + { + ArgumentNullException.ThrowIfNull(args); + Console.WriteLine("Waiting for Proxy to initialize..."); + await Task.Delay(5000); // 5 second buffer + + string targetServer = "host.docker.internal"; + int ldapPort = 389; + int gcPort = 3268; + + string domain = "dc=kolen,dc=xyz"; + string query = "(objectClass=user)"; + var searchRequest = new SearchRequest( + domain, + query, + SearchScope.Subtree, + null + ); + var credentials = new NetworkCredential("user", "pass", "domain"); + Console.WriteLine("Running LDAP Query against LDAP Proxy..."); + RunQuery(targetServer, ldapPort, searchRequest, credentials); + Console.WriteLine("Running LDAP Query against GC Proxy..."); + RunQuery(targetServer, gcPort, searchRequest, credentials); + } + } +} diff --git a/TestClient/Properties/launchSettings.json b/TestClient/Properties/launchSettings.json new file mode 100644 index 0000000..f9ccbd1 --- /dev/null +++ b/TestClient/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "TestClient": { + "commandName": "Project" + }, + "Container (Dockerfile)": { + "commandName": "Docker" + } + } +} \ No newline at end of file diff --git a/TestClient/TestClient.csproj b/TestClient/TestClient.csproj new file mode 100644 index 0000000..5a6f2fa --- /dev/null +++ b/TestClient/TestClient.csproj @@ -0,0 +1,16 @@ + + + + Exe + net8.0 + enable + enable + Linux + + + + + + + + From 2f677204c8aac7539e77c4bbb0ddb1e9f52840ce Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Wed, 21 Jan 2026 17:42:56 +0100 Subject: [PATCH 02/18] Readme typo --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 3d51e38..126457e 100644 --- a/Readme.md +++ b/Readme.md @@ -46,7 +46,7 @@ Windows Example: .\ADWSProxy.exe --domaincontroller dc01 --domain [...] # Using explicit credentials -.\ADWSProxy.exe --usewindowsauth true -u "luc" -p "password" --domaincontroller dc01 --domain [...] +.\ADWSProxy.exe --usewindowsauth false -u "luc" -p "password" --domaincontroller dc01 --domain [...] ``` ### Linux/Docker Example: From d8d0ad085213fd937e23beafcbc0e62a22992736 Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Thu, 22 Jan 2026 13:20:18 +0100 Subject: [PATCH 03/18] Changed all StringComparison to OrdinalIgnoreCase. --- ADWSProxy/ADWS/Connection.cs | 4 ++-- ADWSProxy/ADWS/Request/EnumerateRequest.cs | 6 +++--- ADWSProxy/ADWS/Request/PullResponse.cs | 4 ++-- ADWSProxy/LDAP/Listener.cs | 8 ++++---- ADWSProxy/Program.cs | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ADWSProxy/ADWS/Connection.cs b/ADWSProxy/ADWS/Connection.cs index fc06125..23f1133 100644 --- a/ADWSProxy/ADWS/Connection.cs +++ b/ADWSProxy/ADWS/Connection.cs @@ -180,7 +180,7 @@ public List GetRootDSE() foreach (var item in parsedResponse.Items) { // These fields return the guid 11111111-1111-1111-1111-111111111111 which is not present in a direct LDAP request to get the RootDSE - if (item.Key.Equals("container-hierarchy-parent", StringComparison.InvariantCultureIgnoreCase) || item.Key.Equals("objectReferenceProperty", StringComparison.InvariantCultureIgnoreCase)) + if (item.Key.Equals("container-hierarchy-parent", StringComparison.OrdinalIgnoreCase) || item.Key.Equals("objectReferenceProperty", StringComparison.OrdinalIgnoreCase)) { continue; } @@ -223,7 +223,7 @@ public List GetRootDSE() internal void Enumerate(string dn, string filter, List fields, string scope, Action<(string, List)> callback) { - if (!fields.Any(field => field.Equals("distinguishedname", StringComparison.CurrentCultureIgnoreCase))) + if (!fields.Any(field => field.Equals("distinguishedname", StringComparison.OrdinalIgnoreCase))) { fields.Add("distinguishedname"); } diff --git a/ADWSProxy/ADWS/Request/EnumerateRequest.cs b/ADWSProxy/ADWS/Request/EnumerateRequest.cs index 6f60cca..0d15cf1 100644 --- a/ADWSProxy/ADWS/Request/EnumerateRequest.cs +++ b/ADWSProxy/ADWS/Request/EnumerateRequest.cs @@ -34,15 +34,15 @@ protected override void OnWriteBodyContents(XmlDictionaryWriter writer) writer.WriteAttributeString("Dialect", "http://schemas.microsoft.com/2008/1/ActiveDirectory/Dialect/XPath-Level-1"); foreach (var attr in Attributes) { - if (attr.Equals("distinguishedname", StringComparison.InvariantCultureIgnoreCase)) + if (attr.Equals("distinguishedname", StringComparison.OrdinalIgnoreCase)) { writer.WriteElementString("ad", "SelectionProperty", null, "ad:distinguishedName"); } - else if (attr.Equals("*", StringComparison.InvariantCultureIgnoreCase)) + else if (attr.Equals("*", StringComparison.OrdinalIgnoreCase)) { writer.WriteElementString("ad", "SelectionProperty", null, "ad:all"); } - else if (attr.Equals("**", StringComparison.InvariantCultureIgnoreCase)) + else if (attr.Equals("**", StringComparison.OrdinalIgnoreCase)) { writer.WriteElementString("ad", "SelectionProperty", null, "addata:all"); } diff --git a/ADWSProxy/ADWS/Request/PullResponse.cs b/ADWSProxy/ADWS/Request/PullResponse.cs index 324b831..c9810bc 100644 --- a/ADWSProxy/ADWS/Request/PullResponse.cs +++ b/ADWSProxy/ADWS/Request/PullResponse.cs @@ -37,7 +37,7 @@ protected override void OnReadBodyContents(XmlDictionaryReader reader) if (reader.NodeType == XmlNodeType.Element) { var elementName = reader.LocalName; - if (elementName.Equals("distinguishedName", StringComparison.InvariantCultureIgnoreCase)) + if (elementName.Equals("distinguishedName", StringComparison.OrdinalIgnoreCase)) { reader.Read(); dn = reader.ReadElementContentAsString(); @@ -82,7 +82,7 @@ protected override void OnReadBodyContents(XmlDictionaryReader reader) item = []; dn = null; reader.Read(); - if (reader.NodeType == XmlNodeType.EndElement && reader.LocalName.Equals("items", StringComparison.InvariantCultureIgnoreCase)) + if (reader.NodeType == XmlNodeType.EndElement && reader.LocalName.Equals("items", StringComparison.OrdinalIgnoreCase)) { reader.Read(); if (reader.IsStartElement("EndOfSequence", "http://schemas.xmlsoap.org/ws/2004/09/enumeration")) diff --git a/ADWSProxy/LDAP/Listener.cs b/ADWSProxy/LDAP/Listener.cs index cce5e09..f369bb2 100644 --- a/ADWSProxy/LDAP/Listener.cs +++ b/ADWSProxy/LDAP/Listener.cs @@ -125,7 +125,7 @@ private void HandleClient(TcpClient client) } logger.Info("Packet handling done!"); } - catch (System.ArgumentException ex) + catch (ArgumentException ex) { logger.Error("ArgumentException. Continuing.", ex); } @@ -165,7 +165,7 @@ private void HandleSearchRequest(NetworkStream stream, LdapPacket requestPacket) logger.Info($"Request scopeIdentifier = {scopeValue}, Scope: {scope}"); // TODO: Check if there is a more elegant solution to this. - if (string.IsNullOrEmpty(dn) && filter.ToLower().Equals("(objectclass=*)") && scope == "base") + if (string.IsNullOrEmpty(dn) && filter.Equals("(objectclass=*)", StringComparison.OrdinalIgnoreCase) && scope == "base") { try { @@ -201,7 +201,7 @@ private void HandleSearchRequest(NetworkStream stream, LdapPacket requestPacket) // Bloodhound.py requested the a number of non existing properties during testing. // These are removed from the request as this would cause an exception when sent to the ADWS endpoint. // Root cause of this issue has not been investigated as manually blocking these properties works for now. - if (dn!.StartsWith("cn=aggregate,cn=schema,cn=configuration,dc=", StringComparison.CurrentCultureIgnoreCase) + if (dn!.StartsWith("cn=aggregate,cn=schema,cn=configuration,dc=", StringComparison.OrdinalIgnoreCase) && filter.ToLower().Equals("(objectclass=subschema)") && scope.Equals("base")) { @@ -283,7 +283,7 @@ private static string ParseFilter(LdapAttribute filterAttribute, StringBuilder? case LdapFilterChoice.equalityMatch: var name = filterAttribute.ChildAttributes[0].GetValue(); - if (!string.IsNullOrEmpty(name) && name.Equals("objectsid", StringComparison.InvariantCultureIgnoreCase)) + if (!string.IsNullOrEmpty(name) && name.Equals("objectsid", StringComparison.OrdinalIgnoreCase)) { var bytesValue = filterAttribute.ChildAttributes[1].GetRawValue()!; string sid; diff --git a/ADWSProxy/Program.cs b/ADWSProxy/Program.cs index 648587f..2b9355f 100644 --- a/ADWSProxy/Program.cs +++ b/ADWSProxy/Program.cs @@ -80,7 +80,7 @@ private static void Main(string[] args) { dc = dc + "." + parsedArgs.Value.Domain; } - + LDAPListener = new Listener(CreateIPEndPoint(LDAPEndpoint), dc, parsedArgs.Value.ADWSDCPort, parsedArgs.Value.LDAPInstance!, parsedArgs.Value.UseWindowsAuth.GetValueOrDefault(), credentials); LDAPListener.Start(); logger.Info($"Succesfully started the LDAPListener on {LDAPEndpoint} using instance {parsedArgs.Value.LDAPInstance}"); From a6d541425ae8171a831e97dbd7c12a44034cb23e Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Thu, 22 Jan 2026 13:21:19 +0100 Subject: [PATCH 04/18] Setting the loglevel to debug will (when using Windows) compare the Sid from the manual parsing to the native Windows parser --- ADWSProxy/LDAP/Helpers.cs | 43 ++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/ADWSProxy/LDAP/Helpers.cs b/ADWSProxy/LDAP/Helpers.cs index de25ece..8dc5d23 100644 --- a/ADWSProxy/LDAP/Helpers.cs +++ b/ADWSProxy/LDAP/Helpers.cs @@ -1,35 +1,64 @@ using Flexinets.Ldap.Core; +using log4net; using System.Reflection; +using System.Runtime.InteropServices; +using System.Security.Principal; using System.Text; namespace ADWSProxy.LDAP { internal static class Helpers { + private static readonly ILog logger = LogManager.GetLogger(MethodBase.GetCurrentMethod()?.DeclaringType!); + public static string ConvertByteSidToStringSid(byte[] bytes) { if (bytes == null || bytes.Length < 8) return string.Empty; - // 1. Get Revision (Byte 0) - byte revision = bytes[0]; + // 1. Generate the SID string using the cross-platform manual parser + string manualSid = ParseSidManually(bytes); + + // 2. Perform Windows-specific validation if requested + if (logger.IsDebugEnabled && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + try + { + var nativeSid = new SecurityIdentifier(bytes, 0).ToString(); + + if (!string.Equals(manualSid, nativeSid, StringComparison.OrdinalIgnoreCase)) + { + // Generate Base64 for easier external debugging + string base64 = Convert.ToBase64String(bytes); - // 2. Get Sub-Authority Count (Byte 1) + logger.Warn($"SID Mismatch! Manual: {manualSid} | Native: {nativeSid} | Raw Base64: {base64}"); + + return nativeSid; + } + } + catch (Exception ex) + { + string base64 = Convert.ToBase64String(bytes); + logger.Debug($"Native SID validation failed. Manual: {manualSid} | Base64: {base64}", ex); + } + } + + return manualSid; + } + private static string ParseSidManually(byte[] bytes) + { + byte revision = bytes[0]; int count = bytes[1]; - // 3. Get Identifier Authority (Bytes 2 through 7) - // This is a big-endian 48-bit integer long authority = 0; for (int i = 2; i <= 7; i++) { authority = (authority << 8) | bytes[i]; } - // 4. Build the prefix StringBuilder sb = new(); sb.Append($"S-{revision}-{authority}"); - // 5. Get Sub-Authorities (4 bytes each, little-endian) for (int i = 0; i < count; i++) { int offset = 8 + (i * 4); From dd86547b39b3216181a156ab5df2c72d4d6d2ae1 Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Thu, 22 Jan 2026 13:23:57 +0100 Subject: [PATCH 05/18] Removed .toLower for faster .equals with StringComparison.OrdinalIgnoreCase --- ADWSProxy/LDAP/Listener.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADWSProxy/LDAP/Listener.cs b/ADWSProxy/LDAP/Listener.cs index f369bb2..9ff0bfa 100644 --- a/ADWSProxy/LDAP/Listener.cs +++ b/ADWSProxy/LDAP/Listener.cs @@ -202,7 +202,7 @@ private void HandleSearchRequest(NetworkStream stream, LdapPacket requestPacket) // These are removed from the request as this would cause an exception when sent to the ADWS endpoint. // Root cause of this issue has not been investigated as manually blocking these properties works for now. if (dn!.StartsWith("cn=aggregate,cn=schema,cn=configuration,dc=", StringComparison.OrdinalIgnoreCase) - && filter.ToLower().Equals("(objectclass=subschema)") + && filter.Equals("(objectclass=subschema)", StringComparison.OrdinalIgnoreCase) && scope.Equals("base")) { blockedProperties.AddRange(["createtimestamp", "ldapsyntaxes", "matchingrules", "matchingruleuse", "ditstructurerules", "nameforms"]); From 02a61176976965619c10add0d31575f46427b5e7 Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Fri, 23 Jan 2026 11:17:22 +0100 Subject: [PATCH 06/18] Add support for Windows Server 2025 and refactor auth modes - Replace '--usewindowsauth' with '--mode [Windows|Username]' to support distinct ADWS endpoint paths. - Set 'Windows' mode as default to align with Server 2025 "Secure by Default" configurations (which disable the /UserName endpoint). - Update Dockerfile with 'gss-ntlmssp' to support NTLMv2 negotiation from Linux/Docker environments. - Verified compatibility against Server 2022 and 2025 using BadBlood environments. --- ADWSProxy/ADWS/Connection.cs | 41 +++++++++++++++++------- ADWSProxy/AdwsEndpoint.cs | 14 ++++++++ ADWSProxy/CommandLineOptions.cs | 7 ++-- ADWSProxy/Dockerfile | 7 ++++ ADWSProxy/LDAP/Listener.cs | 4 +-- ADWSProxy/Program.cs | 8 ++--- ADWSProxy/Properties/launchSettings.json | 5 +-- ADWSProxyCore.slnLaunch | 17 +++++++++- Readme.md | 41 +++++++++++++++++++----- TestClient/Program.cs | 2 ++ 10 files changed, 116 insertions(+), 30 deletions(-) create mode 100644 ADWSProxy/AdwsEndpoint.cs diff --git a/ADWSProxy/ADWS/Connection.cs b/ADWSProxy/ADWS/Connection.cs index 23f1133..d481e6d 100644 --- a/ADWSProxy/ADWS/Connection.cs +++ b/ADWSProxy/ADWS/Connection.cs @@ -5,6 +5,7 @@ using System.Net; using System.Reflection; using System.ServiceModel; +using System.ServiceModel.Channels; namespace ADWSProxy.ADWS { @@ -18,24 +19,26 @@ internal class Connection private SearchClient? _search = null; - public Connection(string server, int port, string instance, bool useWindowsAuth, NetworkCredential? credential = null) + public Connection(string server, int port, string instance, AdwsEndpoint mode, NetworkCredential? credential = null) { logger.Info($"Constructing new {GetType().FullName}"); + ServicePointManager.ServerCertificateValidationCallback = (s, c, ch, e) => true; + Server = server; Instance = instance; Port = port; Credential = credential; - UseWindowsAuth = useWindowsAuth; + Mode = mode; } - public bool UseWindowsAuth { get; } + public AdwsEndpoint Mode { get; } private string Auth { get { - return UseWindowsAuth ? "Windows" : "UserName"; + return Mode == AdwsEndpoint.Windows ? "Windows" : "UserName"; } } @@ -60,9 +63,19 @@ private NetTcpBinding Binding _binding.ReaderQuotas.MaxStringContentLength = 32768; _binding.ReaderQuotas.MaxArrayLength = 16384; - _binding.Security.Transport.ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign; - _binding.Security.Message.ClientCredentialType = UseWindowsAuth ? MessageCredentialType.Windows : MessageCredentialType.UserName; - _binding.Security.Mode = UseWindowsAuth ? SecurityMode.Transport : SecurityMode.TransportWithMessageCredential; + if (Mode == AdwsEndpoint.Windows) + { + _binding.Security.Mode = SecurityMode.Transport; + _binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.Windows; + _binding.Security.Transport.ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign; + _binding.Security.Message.ClientCredentialType = MessageCredentialType.None; + } + else + { + _binding.Security.Mode = SecurityMode.TransportWithMessageCredential; + _binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.None; + _binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName; + } logger.Debug($"Using EncryptAndSing on Transport {_binding.Security.Transport.ProtectionLevel == System.Net.Security.ProtectionLevel.EncryptAndSign}"); @@ -93,14 +106,18 @@ private ResourceClient ResourceClient Path = $"ActiveDirectoryWebServices/{Auth}/Resource" }; - _resource = new ResourceClient(Binding, new EndpointAddress(uriBuilder.Uri)); + var endpoint = new EndpointAddress(uriBuilder.Uri, null, Array.Empty()); + + _resource = new ResourceClient(Binding, endpoint); if (Credential != null) { - if (UseWindowsAuth) + if (Mode == AdwsEndpoint.Windows) { _resource.ClientCredentials.Windows.ClientCredential.UserName = Credential.UserName; _resource.ClientCredentials.Windows.ClientCredential.Password = Credential.Password; _resource.ClientCredentials.Windows.ClientCredential.Domain = Credential.Domain; + _resource.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; + } else { @@ -133,11 +150,13 @@ private SearchClient SearchClient Path = $"ActiveDirectoryWebServices/{Auth}/Enumeration" }; - _search = new SearchClient(Binding, new EndpointAddress(uriBuilder.Uri)); + var endpoint = new EndpointAddress(uriBuilder.Uri, null, Array.Empty()); + + _search = new SearchClient(Binding, endpoint); if (Credential != null) { - if (UseWindowsAuth) + if (Mode == AdwsEndpoint.Windows) { _search.ClientCredentials.Windows.ClientCredential.UserName = Credential.UserName; _search.ClientCredentials.Windows.ClientCredential.Password = Credential.Password; diff --git a/ADWSProxy/AdwsEndpoint.cs b/ADWSProxy/AdwsEndpoint.cs new file mode 100644 index 0000000..66a6159 --- /dev/null +++ b/ADWSProxy/AdwsEndpoint.cs @@ -0,0 +1,14 @@ +namespace ADWSProxy +{ + public enum AdwsEndpoint + { + /// + /// Targets /ActiveDirectoryWebServices/Windows/[...] + /// + Windows, + /// + /// Targets /ActiveDirectoryWebServices/UserName/[...] + /// + Username + } +} \ No newline at end of file diff --git a/ADWSProxy/CommandLineOptions.cs b/ADWSProxy/CommandLineOptions.cs index e150d82..4972f03 100644 --- a/ADWSProxy/CommandLineOptions.cs +++ b/ADWSProxy/CommandLineOptions.cs @@ -3,6 +3,7 @@ namespace ADWSProxy { + internal class CommandLineOptions { [Option("adwsdcport", Required = false, Default = 9389, HelpText = "The ADWS port to proxy to on the domain controller")] @@ -50,8 +51,10 @@ internal class CommandLineOptions [Option('u', "username", Required = false, Default = null, HelpText = "The username to authenticate to ADWS")] public string? Username { get; set; } - [Option("usewindowsauth", Required = false, Default = true, HelpText = "Use Windows Authentication (default) or Username/Password with TLS")] - public bool? UseWindowsAuth { get; set; } + [Option('m', "mode", Required = false, Default = AdwsEndpoint.Windows, HelpText = "ADWS Endpoint Mode: 'Windows' (default, NTLM/Kerberos) or 'Username' (Legacy TLS).")] + public AdwsEndpoint Mode { get; set; } + + public NetworkCredential? GetNetworkCredential() { diff --git a/ADWSProxy/Dockerfile b/ADWSProxy/Dockerfile index b708aba..a60ca28 100644 --- a/ADWSProxy/Dockerfile +++ b/ADWSProxy/Dockerfile @@ -2,6 +2,13 @@ # This stage is used when running from VS in fast mode (Default for Debug configuration) FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base +RUN apt-get update && apt-get install -y --no-install-recommends \ + gss-ntlmssp \ + libldap-2.5-0 \ + iputils-ping \ + netcat-openbsd \ + dnsutils \ + && rm -rf /var/lib/apt/lists/* USER $APP_UID WORKDIR /app EXPOSE 389 diff --git a/ADWSProxy/LDAP/Listener.cs b/ADWSProxy/LDAP/Listener.cs index 9ff0bfa..716ed71 100644 --- a/ADWSProxy/LDAP/Listener.cs +++ b/ADWSProxy/LDAP/Listener.cs @@ -10,13 +10,13 @@ internal class Listener : IDisposable { private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod()!.DeclaringType!); - public Listener(IPEndPoint endpoint, string domainController, int adwsPort, string instance, bool useWindowsAuth, NetworkCredential? credential = null) + public Listener(IPEndPoint endpoint, string domainController, int adwsPort, string instance, AdwsEndpoint mode, NetworkCredential? credential = null) { logger.Info($"Constructing new {GetType().FullName}"); TcpListener = new TcpListener(endpoint); - ADWSConnection = new Connection(domainController, adwsPort, instance, useWindowsAuth, credential); + ADWSConnection = new Connection(domainController, adwsPort, instance, mode, credential); Instance = instance; } diff --git a/ADWSProxy/Program.cs b/ADWSProxy/Program.cs index 2b9355f..785493d 100644 --- a/ADWSProxy/Program.cs +++ b/ADWSProxy/Program.cs @@ -76,12 +76,12 @@ private static void Main(string[] args) var LDAPEndpoint = $"0.0.0.0:{parsedArgs.Value.LDAPPort}"; var dc = parsedArgs.Value.DomainController; ArgumentNullException.ThrowIfNullOrWhiteSpace(dc); - if (!dc.Contains('.')) + if (!dc.Contains('.') && !string.IsNullOrWhiteSpace(parsedArgs.Value.Domain)) { - dc = dc + "." + parsedArgs.Value.Domain; + dc = $"{dc}.{parsedArgs.Value.Domain}"; } - LDAPListener = new Listener(CreateIPEndPoint(LDAPEndpoint), dc, parsedArgs.Value.ADWSDCPort, parsedArgs.Value.LDAPInstance!, parsedArgs.Value.UseWindowsAuth.GetValueOrDefault(), credentials); + LDAPListener = new Listener(CreateIPEndPoint(LDAPEndpoint), dc, parsedArgs.Value.ADWSDCPort, parsedArgs.Value.LDAPInstance!, parsedArgs.Value.Mode, credentials); LDAPListener.Start(); logger.Info($"Succesfully started the LDAPListener on {LDAPEndpoint} using instance {parsedArgs.Value.LDAPInstance}"); @@ -97,7 +97,7 @@ private static void Main(string[] args) gc = gc + "." + parsedArgs.Value.Domain; } var GCEndpoint = $"0.0.0.0:{parsedArgs.Value.GCPort}"; - GCListener = new Listener(CreateIPEndPoint(GCEndpoint), gc, parsedArgs.Value.ADWSGCPort, parsedArgs.Value.GCInstance!, parsedArgs.Value.UseWindowsAuth.GetValueOrDefault(), credentials); + GCListener = new Listener(CreateIPEndPoint(GCEndpoint), gc, parsedArgs.Value.ADWSGCPort, parsedArgs.Value.GCInstance!, parsedArgs.Value.Mode, credentials); GCListener.Start(); logger.Info($"Succesfully started the GCListener on {GCEndpoint} using instance {parsedArgs.Value.GCInstance}"); } diff --git a/ADWSProxy/Properties/launchSettings.json b/ADWSProxy/Properties/launchSettings.json index 43b6f5b..93b92fb 100644 --- a/ADWSProxy/Properties/launchSettings.json +++ b/ADWSProxy/Properties/launchSettings.json @@ -1,12 +1,13 @@ { "profiles": { "ADWSProxy": { - "commandName": "Project" + "commandName": "Project", + "commandLineArgs": "--domaincontroller dc01 --globalcatalog dc01 --consoleloglevel DEBUG" }, "Container (Dockerfile)": { "commandName": "Docker", "DockerfileRunArguments": "-p 389:389 -p 3268:3268", - "commandLineArgs": "--usewindowsauth false -u '[...]' -p '[...]' -D '[...]' --domaincontroller dc01 --globalcatalog dc01" + "commandLineArgs": "--domaincontroller dc01 --globalcatalog dc01 --consoleloglevel DEBUG" } } } \ No newline at end of file diff --git a/ADWSProxyCore.slnLaunch b/ADWSProxyCore.slnLaunch index a761c2b..6fae58b 100644 --- a/ADWSProxyCore.slnLaunch +++ b/ADWSProxyCore.slnLaunch @@ -1,6 +1,6 @@ [ { - "Name": "New Profile", + "Name": "Test (Docker)", "Projects": [ { "Path": "ADWSProxy\\ADWSProxy.csproj", @@ -13,5 +13,20 @@ "DebugTarget": "Container (Dockerfile)" } ] + }, + { + "Name": "Test", + "Projects": [ + { + "Path": "ADWSProxy\\ADWSProxy.csproj", + "Action": "Start", + "DebugTarget": "ADWSProxy" + }, + { + "Path": "TestClient\\TestClient.csproj", + "Action": "Start", + "DebugTarget": "TestClient" + } + ] } ] \ No newline at end of file diff --git a/Readme.md b/Readme.md index 126457e..ffdf80e 100644 --- a/Readme.md +++ b/Readme.md @@ -29,9 +29,9 @@ A high-performance, cross-platform Active Directory Web Services (ADWS) proxy bu --ldapinstance (Default: ldap:389) The LDAP instance within ADWS --ldapport (Default: 389) The LDAP port to proxy from --logdirectory (Default: .) The log directory for runtime logs + -m, --mode (Default: Windows) Set the ADWS endpoint mode: Windows or Username. -p, --password The password to authenticate to ADWS -u, --username The username to authenticate to ADWS - --usewindowsauth (Default: true) Use Windows Session (Kerberos/NTLM) or explicit credentials --help Display this help screen. --version Display version information. ``` @@ -40,19 +40,34 @@ A high-performance, cross-platform Active Directory Web Services (ADWS) proxy bu The proxy requires valid credentials if executed outside of a domain-joined Windows session (e.g., when running on Linux or in Docker). -Windows Example: -```text -# Using current session credentials -.\ADWSProxy.exe --domaincontroller dc01 --domain [...] +#### Server 2025 + +Windows Server 2025 has removed the `/UserName` endpoints so only `--mode Windows` is supported. + +This mode can be used without explicitly noting credentials by using the current Windows session: + +```powershell +.\ADWSProxy.exe --domaincontroller "dc01" +``` + +It's also possible to explicitly set credentials to use, for instance when running from a non domain joined machine and/or a docker container. + +```powershell +.\ADWSProxy.exe -u "user" -p "password" --domain "[...]" --domaincontroller "dc01" +``` + +#### Older versions + +Older versions of Windows do support the `/UserName` endpoints so we can also use those to obtain data via ADWS: -# Using explicit credentials -.\ADWSProxy.exe --usewindowsauth false -u "luc" -p "password" --domaincontroller dc01 --domain [...] +```powershell +.\ADWSProxy.exe -m "Username" -u "user" -p "password" --domain "[...]" --domaincontroller "dc01" ``` ### Linux/Docker Example: ```bash docker run -p 389:389 -p 9389:9389 adwsproxy:latest \ - --usewindowsauth false \ + --mode Windows \ --username "luc" \ --password "password" \ --domaincontroller dc01 \ @@ -78,6 +93,16 @@ dotnet --fx-version 8.0.23 "C:\Users\luc\.dotnet\tools\.store\dotnet-svcutil\8.0 --targetFramework net8.0 ``` +### Mandatory RPC Sealing and Signing + +Server 2025 enforces strict integrity requirements. All NTLM/Kerberos tokens must negotiate 128-bit encryption and message signing (Seal & Sign). + +>Technical Note: This tool automatically configures ProtectionLevel.EncryptAndSign to meet this requirement. If you encounter 0x80090302 (Invalid Token), ensure your client machine's clock is synchronized with the Domain Controller. + +### NTLMv1 Retirement + +Server 2025 has effectively retired NTLMv1. If running this tool from a Linux/Docker environment, ensure you have the `gss-ntlmssp` package installed to support modern NTLMv2/Negotiate handshakes. + ## Integration Testing (Bloodhound) [Bloodhound-Python](https://github.com/dirkjanm/BloodHound.py) can be used with this proxy by setting the `-ns` argument to the proxy's IP. The proxy spoofs the LDAP response to make itself appear as the Domain Controller. diff --git a/TestClient/Program.cs b/TestClient/Program.cs index be1fc97..491fb8b 100644 --- a/TestClient/Program.cs +++ b/TestClient/Program.cs @@ -57,6 +57,8 @@ static async Task Main(string[] args) RunQuery(targetServer, ldapPort, searchRequest, credentials); Console.WriteLine("Running LDAP Query against GC Proxy..."); RunQuery(targetServer, gcPort, searchRequest, credentials); + Console.WriteLine("Press Enter to exit..."); + Console.ReadLine(); } } } From 8c8b0c9df2d739d0a4f49c37b551b2fe94503e4e Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Fri, 23 Jan 2026 11:36:57 +0100 Subject: [PATCH 07/18] Fixed bad global catalog server handling when no domain was supplied --- ADWSProxy/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ADWSProxy/Program.cs b/ADWSProxy/Program.cs index 785493d..5360398 100644 --- a/ADWSProxy/Program.cs +++ b/ADWSProxy/Program.cs @@ -92,9 +92,9 @@ private static void Main(string[] args) } else { - if (!gc.Contains('.')) + if (!gc.Contains('.') && !string.IsNullOrWhiteSpace(parsedArgs.Value.Domain)) { - gc = gc + "." + parsedArgs.Value.Domain; + gc = $"{dc}.{parsedArgs.Value.Domain}"; } var GCEndpoint = $"0.0.0.0:{parsedArgs.Value.GCPort}"; GCListener = new Listener(CreateIPEndPoint(GCEndpoint), gc, parsedArgs.Value.ADWSGCPort, parsedArgs.Value.GCInstance!, parsedArgs.Value.Mode, credentials); From aa509f97d6ff0ad4647851b7f41ec2548526f44b Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Fri, 23 Jan 2026 11:37:15 +0100 Subject: [PATCH 08/18] Improved testing client --- TestClient/Program.cs | 132 ++++++++++++++++++++++++++++++++---------- 1 file changed, 101 insertions(+), 31 deletions(-) diff --git a/TestClient/Program.cs b/TestClient/Program.cs index 491fb8b..af44cd9 100644 --- a/TestClient/Program.cs +++ b/TestClient/Program.cs @@ -1,11 +1,24 @@ using System.DirectoryServices.Protocols; using System.Net; +using System.Security.Principal; +using System.Text; namespace TestClient { internal class Program { - static void RunQuery(string server, int port, SearchRequest searchRequest, NetworkCredential credentials) + // Helper to convert binary SID to LDAP hex filter string: \01\05\00... + static string ConvertSidToHexFilter(byte[] sidBytes) + { + StringBuilder sb = new StringBuilder(); + foreach (byte b in sidBytes) + { + sb.Append(@"\" + b.ToString("X2")); + } + return sb.ToString(); + } + + static void RunQuery(string server, int port, NetworkCredential credentials, string? forcedDomain = null) { using var ldapConnection = new LdapConnection(new LdapDirectoryIdentifier(server, port)); ldapConnection.SessionOptions.ProtocolVersion = 3; @@ -14,51 +27,108 @@ static void RunQuery(string server, int port, SearchRequest searchRequest, Netwo try { ldapConnection.Bind(credentials); - Console.WriteLine("Successfully bound to LDAP Proxy."); - var response = (SearchResponse)ldapConnection.SendRequest(searchRequest); + // 1. Determine which domain to query + string namingContext; + if (string.IsNullOrEmpty(forcedDomain)) + { + // Discovery phase (LDAP 389) + namingContext = GetNamingContext(ldapConnection); + Console.WriteLine($"[+] Discovered Naming Context: {namingContext}"); + } + else + { + // Use the domain handed over from the LDAP test (GC 3268) + namingContext = forcedDomain; + Console.WriteLine($"[*] Using Provided Context for GC: {namingContext}"); + } - Console.WriteLine($"Found {response.Entries.Count} entries."); - foreach (SearchResultEntry entry in response.Entries) + // 2. Initial Search to find a valid SID + var initialRequest = new SearchRequest( + namingContext, + "(&(objectClass=user)(sAMAccountName=administrator))", + SearchScope.Subtree, + "sAMAccountName", "objectSid" + ); + + var response = (SearchResponse)ldapConnection.SendRequest(initialRequest); + if (response.Entries.Count == 0) { - Console.WriteLine($"DN: {entry.DistinguishedName}"); + Console.WriteLine("[!] No entries found for initial SID discovery."); + return; + } + + // 3. Round-Trip SID Test + // This ensures the proxy handles binary filters in the search request + var entry = response.Entries[0]; + byte[] sidBytes = (byte[])entry.Attributes["objectSid"][0]; + string sidString = new SecurityIdentifier(sidBytes, 0).ToString(); + string hexFilter = ConvertSidToHexFilter(sidBytes); + + Console.WriteLine($"[+] Found Administrator: {sidString}"); + Console.WriteLine($"[*] Testing Binary Round-Trip Filter: (objectSid={hexFilter})"); + + var sidRequest = new SearchRequest( + namingContext, + $"(objectSid={hexFilter})", + SearchScope.Subtree, + "sAMAccountName" + ); + + var sidResponse = (SearchResponse)ldapConnection.SendRequest(sidRequest); + + if (sidResponse.Entries.Count > 0) + { + Console.WriteLine($"[SUCCESS] Proxy correctly parsed and returned: {sidResponse.Entries[0].DistinguishedName}"); + } + else + { + Console.WriteLine("[FAIL] Binary SID filter returned no results through proxy."); } - } - catch (LdapException ex) - { - Console.WriteLine($"LDAP Error: {ex.Message}"); } catch (Exception ex) { - Console.WriteLine($"Error: {ex.Message}"); + Console.WriteLine($"[!] Error on port {port}: {ex.Message}"); } } + static string GetNamingContext(LdapConnection connection) + { + var request = new SearchRequest(null, "(objectClass=*)", SearchScope.Base, "defaultNamingContext"); + var response = (SearchResponse)connection.SendRequest(request); + return response.Entries[0].Attributes["defaultNamingContext"][0].ToString(); + } + static async Task Main(string[] args) { - ArgumentNullException.ThrowIfNull(args); + Console.WriteLine("--- ADWS Proxy Test Client ---"); Console.WriteLine("Waiting for Proxy to initialize..."); - await Task.Delay(5000); // 5 second buffer - + await Task.Delay(3000); string targetServer = "host.docker.internal"; - int ldapPort = 389; - int gcPort = 3268; - - string domain = "dc=kolen,dc=xyz"; - string query = "(objectClass=user)"; - var searchRequest = new SearchRequest( - domain, - query, - SearchScope.Subtree, - null - ); var credentials = new NetworkCredential("user", "pass", "domain"); - Console.WriteLine("Running LDAP Query against LDAP Proxy..."); - RunQuery(targetServer, ldapPort, searchRequest, credentials); - Console.WriteLine("Running LDAP Query against GC Proxy..."); - RunQuery(targetServer, gcPort, searchRequest, credentials); - Console.WriteLine("Press Enter to exit..."); + + // We need to keep track of the domain discovered on 389 to use on 3268 + string? discoveredDomain = null; + + Console.WriteLine("\n[*] Testing LDAP Port (389) with RootDSE Discovery..."); + using (var ldapConn = new LdapConnection(new LdapDirectoryIdentifier(targetServer, 389))) + { + ldapConn.SessionOptions.ProtocolVersion = 3; + ldapConn.AuthType = AuthType.Basic; + ldapConn.Bind(credentials); + discoveredDomain = GetNamingContext(ldapConn); + } + + if (discoveredDomain != null) + { + RunQuery(targetServer, 389, credentials, discoveredDomain); + + Console.WriteLine("\n[*] Testing GC Port (3268) using discovered domain..."); + RunQuery(targetServer, 3268, credentials, discoveredDomain); + } + + Console.WriteLine("\n[#] Test Complete. Press Enter to exit..."); Console.ReadLine(); } } -} +} \ No newline at end of file From 748e33ae029dca5ba499b31328ec809a33188364 Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Fri, 23 Jan 2026 11:50:51 +0100 Subject: [PATCH 09/18] Actually fixed gc server parsing --- ADWSProxy/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADWSProxy/Program.cs b/ADWSProxy/Program.cs index 5360398..7027dd5 100644 --- a/ADWSProxy/Program.cs +++ b/ADWSProxy/Program.cs @@ -94,7 +94,7 @@ private static void Main(string[] args) { if (!gc.Contains('.') && !string.IsNullOrWhiteSpace(parsedArgs.Value.Domain)) { - gc = $"{dc}.{parsedArgs.Value.Domain}"; + gc = $"{gc}.{parsedArgs.Value.Domain}"; } var GCEndpoint = $"0.0.0.0:{parsedArgs.Value.GCPort}"; GCListener = new Listener(CreateIPEndPoint(GCEndpoint), gc, parsedArgs.Value.ADWSGCPort, parsedArgs.Value.GCInstance!, parsedArgs.Value.Mode, credentials); From 3460ecd00026b7ecbec986d43fe60897f0e97400 Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Fri, 23 Jan 2026 11:51:21 +0100 Subject: [PATCH 10/18] Made sure TestClient can run outside of Windows --- TestClient/Program.cs | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/TestClient/Program.cs b/TestClient/Program.cs index af44cd9..8e37347 100644 --- a/TestClient/Program.cs +++ b/TestClient/Program.cs @@ -62,7 +62,7 @@ static void RunQuery(string server, int port, NetworkCredential credentials, str // This ensures the proxy handles binary filters in the search request var entry = response.Entries[0]; byte[] sidBytes = (byte[])entry.Attributes["objectSid"][0]; - string sidString = new SecurityIdentifier(sidBytes, 0).ToString(); + string sidString = ConvertSidToReadable(sidBytes); //new SecurityIdentifier(sidBytes, 0).ToString(); string hexFilter = ConvertSidToHexFilter(sidBytes); Console.WriteLine($"[+] Found Administrator: {sidString}"); @@ -92,11 +92,42 @@ static void RunQuery(string server, int port, NetworkCredential credentials, str } } + public static string ConvertSidToReadable(byte[] bytes) + { + // Basic validation: SIDs are at least 8 bytes + if (bytes == null || bytes.Length < 8) return "Invalid SID"; + + // First byte is the revision (usually 1) + byte revision = bytes[0]; + + // Second byte is the count of sub-authorities + int subAuthorityCount = bytes[1]; + + // Next 6 bytes are the Identifier Authority (big-endian) + long authority = 0; + for (int i = 2; i <= 7; i++) + { + authority = (authority << 8) | bytes[i]; + } + + StringBuilder sb = new StringBuilder(); + sb.Append($"S-{revision}-{authority}"); + + // The rest are 4-byte sub-authorities (little-endian) + for (int i = 0; i < subAuthorityCount; i++) + { + uint subAuthority = BitConverter.ToUInt32(bytes, 8 + (i * 4)); + sb.Append($"-{subAuthority}"); + } + + return sb.ToString(); + } + static string GetNamingContext(LdapConnection connection) { var request = new SearchRequest(null, "(objectClass=*)", SearchScope.Base, "defaultNamingContext"); var response = (SearchResponse)connection.SendRequest(request); - return response.Entries[0].Attributes["defaultNamingContext"][0].ToString(); + return response.Entries[0].Attributes["defaultNamingContext"][0].ToString()!; } static async Task Main(string[] args) From 9a5ebd6b175626fd992c18f0e3a2e30fe1c52f4c Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Fri, 23 Jan 2026 13:14:32 +0100 Subject: [PATCH 11/18] Standardize logger initialization across classes --- ADWSProxy/ADWS/Connection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADWSProxy/ADWS/Connection.cs b/ADWSProxy/ADWS/Connection.cs index d481e6d..7a01b86 100644 --- a/ADWSProxy/ADWS/Connection.cs +++ b/ADWSProxy/ADWS/Connection.cs @@ -11,7 +11,7 @@ namespace ADWSProxy.ADWS { internal class Connection { - private static readonly ILog logger = LogManager.GetLogger(type: MethodBase.GetCurrentMethod()?.DeclaringType ?? throw new ArgumentNullException()); + private static readonly ILog logger = LogManager.GetLogger(type: MethodBase.GetCurrentMethod()!.DeclaringType!); private NetTcpBinding? _binding = null; From 910038b50d9f9336380fb3e94ac84752f60a4b15 Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Tue, 27 Jan 2026 15:44:02 +0100 Subject: [PATCH 12/18] Changed to a CustomBinding from NetTcpBinding --- ADWSProxy/ADWS/Connection.cs | 44 ++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/ADWSProxy/ADWS/Connection.cs b/ADWSProxy/ADWS/Connection.cs index 7a01b86..68f2dce 100644 --- a/ADWSProxy/ADWS/Connection.cs +++ b/ADWSProxy/ADWS/Connection.cs @@ -4,6 +4,7 @@ using log4net; using System.Net; using System.Reflection; +using System.Security.Authentication.ExtendedProtection; using System.ServiceModel; using System.ServiceModel.Channels; @@ -13,7 +14,7 @@ internal class Connection { private static readonly ILog logger = LogManager.GetLogger(type: MethodBase.GetCurrentMethod()!.DeclaringType!); - private NetTcpBinding? _binding = null; + private CustomBinding? _binding = null; private ResourceClient? _resource = null; @@ -42,7 +43,7 @@ private string Auth } } - private NetTcpBinding Binding + private CustomBinding Binding { get { @@ -50,7 +51,7 @@ private NetTcpBinding Binding { logger.Debug($"Constructing new {typeof(NetTcpBinding).FullName}."); - _binding = new NetTcpBinding + var binding = new NetTcpBinding { MaxReceivedMessageSize = Helpers.BufferSize, CloseTimeout = new TimeSpan(0, 10, 0), @@ -59,28 +60,41 @@ private NetTcpBinding Binding SendTimeout = new TimeSpan(0, 10, 0) }; - _binding.ReaderQuotas.MaxDepth = 10; - _binding.ReaderQuotas.MaxStringContentLength = 32768; - _binding.ReaderQuotas.MaxArrayLength = 16384; + binding.ReaderQuotas.MaxDepth = 10; + binding.ReaderQuotas.MaxStringContentLength = 32768; + binding.ReaderQuotas.MaxArrayLength = 16384; if (Mode == AdwsEndpoint.Windows) { - _binding.Security.Mode = SecurityMode.Transport; - _binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.Windows; - _binding.Security.Transport.ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign; - _binding.Security.Message.ClientCredentialType = MessageCredentialType.None; + binding.Security.Mode = SecurityMode.Transport; + binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.Windows; + binding.Security.Transport.ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign; + binding.Security.Message.ClientCredentialType = MessageCredentialType.None; } else { - _binding.Security.Mode = SecurityMode.TransportWithMessageCredential; - _binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.None; - _binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName; + binding.Security.Mode = SecurityMode.TransportWithMessageCredential; + binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.None; + binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName; } - logger.Debug($"Using EncryptAndSing on Transport {_binding.Security.Transport.ProtectionLevel == System.Net.Security.ProtectionLevel.EncryptAndSign}"); + logger.Debug($"Using EncryptAndSing on Transport {binding.Security.Transport.ProtectionLevel == System.Net.Security.ProtectionLevel.EncryptAndSign}"); - logger.Debug($"Using MessageCrentialType.Windows {_binding.Security.Message.ClientCredentialType == MessageCredentialType.Windows}"); + logger.Debug($"Using MessageCrentialType.Windows {binding.Security.Message.ClientCredentialType == MessageCredentialType.Windows}"); + + _binding = new CustomBinding(binding); + var transportElement = _binding.Elements.Find(); + if (transportElement != null) + { + transportElement.ExtendedProtectionPolicy = new ExtendedProtectionPolicy(PolicyEnforcement.WhenSupported); + } + var securityElement = _binding.Elements.Find(); + if (securityElement != null) + { + securityElement.IncludeTimestamp = true; + } } + return _binding; } } From 29292cff92830e546176a5b3c68033b2b3030cec Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Wed, 28 Jan 2026 16:37:19 +0100 Subject: [PATCH 13/18] - DNS will now listen on TCP and UDP port 53. - Setting the hostip parameter will override the IP in the DNS responses - only-use-gc-backend can be used to have all requets go via the GC instance - Updated dockerfile to expose dns service --- ADWSProxy/ADWS/Connection.cs | 119 +++++++++++++++++++------------- ADWSProxy/ADWSProxy.csproj | 10 +-- ADWSProxy/CommandLineOptions.cs | 55 +++++++++++---- ADWSProxy/DNS/Resolver.cs | 116 ++++++++++++++++--------------- ADWSProxy/Dockerfile | 6 +- ADWSProxy/Program.cs | 57 +++++++-------- Readme.md | 36 ++++++---- 7 files changed, 226 insertions(+), 173 deletions(-) diff --git a/ADWSProxy/ADWS/Connection.cs b/ADWSProxy/ADWS/Connection.cs index 68f2dce..a050335 100644 --- a/ADWSProxy/ADWS/Connection.cs +++ b/ADWSProxy/ADWS/Connection.cs @@ -78,20 +78,40 @@ private CustomBinding Binding binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName; } - logger.Debug($"Using EncryptAndSing on Transport {binding.Security.Transport.ProtectionLevel == System.Net.Security.ProtectionLevel.EncryptAndSign}"); - - logger.Debug($"Using MessageCrentialType.Windows {binding.Security.Message.ClientCredentialType == MessageCredentialType.Windows}"); + logger.Debug($"Using binding.Security.Mode: {binding.Security.Mode}"); + logger.Debug($"Using binding.Security.Transport.ClientCredentialType: {binding.Security.Transport.ClientCredentialType}"); + logger.Debug($"binding.Security.Transport.ProtectionLevel: {binding.Security.Transport.ProtectionLevel}"); + logger.Debug($"binding.Security.Message.ClientCredentialType: {binding.Security.Message.ClientCredentialType}"); _binding = new CustomBinding(binding); var transportElement = _binding.Elements.Find(); if (transportElement != null) { - transportElement.ExtendedProtectionPolicy = new ExtendedProtectionPolicy(PolicyEnforcement.WhenSupported); + // Setting this value to Always is only supported on Windows at this time. + if (OperatingSystem.IsWindows()) + { + transportElement.ExtendedProtectionPolicy = new ExtendedProtectionPolicy(PolicyEnforcement.Always); + } + else + { + transportElement.ExtendedProtectionPolicy = new ExtendedProtectionPolicy(PolicyEnforcement.WhenSupported, ProtectionScenario.TransportSelected, new ServiceNameCollection(new[] + { + $"identity/{Server}", + $"identity/{Server.Split('.')[0]}", + $"host/{Server}", + $"ldap/{Server}", + $"ldap/{Server}/{Server[(Server.IndexOf('.') + 1)..]}", + $"identity/{Server}:9389" + })); + } + logger.Debug($"transportElement.ExtendedProtectionPolicy: {transportElement.ExtendedProtectionPolicy}"); } var securityElement = _binding.Elements.Find(); if (securityElement != null) { securityElement.IncludeTimestamp = true; + logger.Debug($"securityElement.IncludeTimestamp: {securityElement.IncludeTimestamp}"); + } } @@ -103,6 +123,19 @@ private CustomBinding Binding private string Instance { get; } private int Port { get; } + private EndpointIdentity? Identity + { + get + { + return Mode switch + { + AdwsEndpoint.Windows => new SpnEndpointIdentity($"host/{Server.ToLower()}"), + AdwsEndpoint.Username => new DnsEndpointIdentity(Server), + _ => null + }; + } + } + private ResourceClient ResourceClient { get @@ -111,36 +144,24 @@ private ResourceClient ResourceClient { logger.Debug($"Constructing new {typeof(ResourceClient).FullName}"); - UriBuilder uriBuilder = new() - { - Scheme = "net.tcp", - Host = Server, - Port = Port, - - Path = $"ActiveDirectoryWebServices/{Auth}/Resource" - }; - - var endpoint = new EndpointAddress(uriBuilder.Uri, null, Array.Empty()); + var endpoint = new EndpointAddress(CreateUri("Resource"), Identity, []); _resource = new ResourceClient(Binding, endpoint); if (Credential != null) { - if (Mode == AdwsEndpoint.Windows) - { - _resource.ClientCredentials.Windows.ClientCredential.UserName = Credential.UserName; - _resource.ClientCredentials.Windows.ClientCredential.Password = Credential.Password; - _resource.ClientCredentials.Windows.ClientCredential.Domain = Credential.Domain; - _resource.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; - - } - else + switch (Mode) { - _resource.ClientCredentials.UserName.UserName = $"{Credential.UserName}@{Credential.Domain}"; - _resource.ClientCredentials.UserName.Password = Credential.Password; - _resource.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None; + case AdwsEndpoint.Windows: + _resource.ClientCredentials.Windows.ClientCredential = Credential; + _resource.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; + break; + case AdwsEndpoint.Username: + _resource.ClientCredentials.UserName.UserName = $"{Credential.UserName}@{Credential.Domain}"; + _resource.ClientCredentials.UserName.Password = Credential.Password; + _resource.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None; + break; } } - _resource.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; } return _resource; @@ -155,40 +176,42 @@ private SearchClient SearchClient { logger.Debug($"Constructing new {typeof(SearchClient).FullName}"); - UriBuilder uriBuilder = new() - { - Scheme = "net.tcp", - Host = Server, - Port = Port, - - Path = $"ActiveDirectoryWebServices/{Auth}/Enumeration" - }; - - var endpoint = new EndpointAddress(uriBuilder.Uri, null, Array.Empty()); + var endpoint = new EndpointAddress(CreateUri("Enumeration"), Identity, []); _search = new SearchClient(Binding, endpoint); if (Credential != null) { - if (Mode == AdwsEndpoint.Windows) + switch (Mode) { - _search.ClientCredentials.Windows.ClientCredential.UserName = Credential.UserName; - _search.ClientCredentials.Windows.ClientCredential.Password = Credential.Password; - _search.ClientCredentials.Windows.ClientCredential.Domain = Credential.Domain; - } - else - { - _search.ClientCredentials.UserName.UserName = $"{Credential.UserName}@{Credential.Domain}"; - _search.ClientCredentials.UserName.Password = Credential.Password; - _search.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None; + case AdwsEndpoint.Windows: + _search.ClientCredentials.Windows.ClientCredential = Credential; + _search.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; + break; + case AdwsEndpoint.Username: + _search.ClientCredentials.UserName.UserName = $"{Credential.UserName}@{Credential.Domain}"; + _search.ClientCredentials.UserName.Password = Credential.Password; + _search.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None; + break; } } - _search.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; } return _search; } } + private Uri CreateUri(string endpoint) + { + return new UriBuilder() + { + Scheme = "net.tcp", + Host = Server, + Port = Port, + + Path = $"ActiveDirectoryWebServices/{Auth}/{endpoint}" + }.Uri; + } + private string Server { get; } public List GetRootDSE() diff --git a/ADWSProxy/ADWSProxy.csproj b/ADWSProxy/ADWSProxy.csproj index 8b1593b..251f5f0 100644 --- a/ADWSProxy/ADWSProxy.csproj +++ b/ADWSProxy/ADWSProxy.csproj @@ -6,15 +6,15 @@ enable enable Linux - 1.0.1 - 1.0.1.0 - 1.0.1.0 - 1.0.1-beta + 2.0.0 + 2.0.0.0 + 2.0.0.0 + 2.0.0-beta + - diff --git a/ADWSProxy/CommandLineOptions.cs b/ADWSProxy/CommandLineOptions.cs index 4972f03..218d957 100644 --- a/ADWSProxy/CommandLineOptions.cs +++ b/ADWSProxy/CommandLineOptions.cs @@ -6,6 +6,9 @@ namespace ADWSProxy internal class CommandLineOptions { + private string? globalCatalog; + private string? domainController; + [Option("adwsdcport", Required = false, Default = 9389, HelpText = "The ADWS port to proxy to on the domain controller")] public int ADWSDCPort { get; set; } @@ -15,29 +18,55 @@ internal class CommandLineOptions [Option("consoleloglevel", Required = false, Default = "INFO", HelpText = "Set the log level for the console output")] public string? ConsoleLogLevel { get; set; } - [Option("dnsport", Required = false, Default = 53, HelpText = "The DNS port to proxy from")] - public int DnsPort { get; set; } - [Option('D', "domain", Required = false, Default = null, HelpText = "The domain to authenticate to ADWS")] public string? Domain { get; set; } - [Option("domaincontroller", Required = true, HelpText = "The domain controller to proxy to")] - public string? DomainController { get; set; } + [Option("domaincontroller", Required = true, HelpText = "The domain controller to proxy to, full FQDN")] + public string? DomainController + { + get + { + if (string.IsNullOrWhiteSpace(domainController) || !domainController.Contains('.')) + { + throw new ArgumentException($"--domaincontroller '{domainController}' must be a full FQDN."); + } + return domainController; + } + set => domainController = value; + } - [Option("exitondnsstarterror", Required = false, Default = true, HelpText = "Exit the application if the DNS port is already in use")] + [Option("exitondnsstarterror", Required = false, Default = false, HelpText = "Exit the application if the DNS port is already in use")] public bool? ExitOnDNSStartError { get; set; } - [Option("gcinstance", Required = false, Default = "ldap:3268", HelpText = "The GC instance within ADWS")] - public string? GCInstance { get; set; } - [Option("gcport", Required = false, Default = (ushort)3268, HelpText = "The GC port to proxy from")] public ushort GCPort { get; set; } [Option("globalcatalog", Required = false, HelpText = "The global catalog to proxy to")] - public string? GlobalCatalog { get; set; } + public string? GlobalCatalog + { + get + { + if (string.IsNullOrWhiteSpace(globalCatalog)) + { + return null; + } + else if (!globalCatalog.Contains('.')) + { + throw new ArgumentException($"--globalcatalog '{globalCatalog}' must be a full FQDN unless domain is specified."); + } + else + { + return globalCatalog; + } + } + set => globalCatalog = value; + } + + [Option("hostip", Required = false, Default = null, HelpText = "Override the IP in the DNS respones")] + public string? HostIP { get; set; } - [Option("ldapinstance", Required = false, Default = "ldap:389", HelpText = "The LDAP instance within ADWS")] - public string? LDAPInstance { get; set; } + [Option("only-use-gc-backend", Required = false, Default = false, HelpText = "Force ADWS to use GC instance (ldap:3268) for backend communication.")] + public bool? OnlyUseGCBacked { get; set; } [Option("ldapport", Required = false, Default = (ushort)389, HelpText = "The LDAP port to proxy from")] public ushort LDAPPort { get; set; } @@ -54,8 +83,6 @@ internal class CommandLineOptions [Option('m', "mode", Required = false, Default = AdwsEndpoint.Windows, HelpText = "ADWS Endpoint Mode: 'Windows' (default, NTLM/Kerberos) or 'Username' (Legacy TLS).")] public AdwsEndpoint Mode { get; set; } - - public NetworkCredential? GetNetworkCredential() { if (Username == null && Password == null && Domain == null) return null; diff --git a/ADWSProxy/DNS/Resolver.cs b/ADWSProxy/DNS/Resolver.cs index 41e7eb2..f5c7dbc 100644 --- a/ADWSProxy/DNS/Resolver.cs +++ b/ADWSProxy/DNS/Resolver.cs @@ -1,95 +1,97 @@ -using DNS.Client.RequestResolver; -using DNS.Protocol; -using DNS.Protocol.ResourceRecords; +using ARSoft.Tools.Net; +using ARSoft.Tools.Net.Dns; using System.Net; -using System.Net.Sockets; using System.Reflection; namespace ADWSProxy.DNS { - internal class Resolver : IRequestResolver + internal class Resolver { - private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(type: MethodBase.GetCurrentMethod()!.DeclaringType!); + private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod()!.DeclaringType!); - public Resolver(ushort ldapPort, ushort gcport) + public Resolver(ushort ldapPort, ushort gcPort, IPAddress? localIP = null) { - logger.Info($"Constructing new {GetType().FullName}"); - LdapPort = ldapPort; - Gcport = gcport; + GcPort = gcPort; Hostname = Dns.GetHostName(); - IPAddress = GetLocalIPAddress(); - - logger.Debug($"DNS Hostname: {Hostname}"); - logger.Debug($"Local IP address: {IPAddress}"); + LocalIP = localIP ?? GetLocalIPAddress(); + logger.Info($"ARSoft Resolver Initialized. Host: {Hostname}, IP: {LocalIP}"); } - private ushort Gcport { get; } - private string Hostname { get; set; } - private IPAddress IPAddress { get; set; } private ushort LdapPort { get; } + private ushort GcPort { get; } + private string Hostname { get; } + private IPAddress LocalIP { get; } - public Task Resolve(IRequest request, CancellationToken cancellationToken = default) + public Task OnQueryReceived(object sender, QueryReceivedEventArgs e) { - logger.Info("Resolving new DNS request"); + var query = e.Query as DnsMessage; + if (query == null) return Task.CompletedTask; -#pragma warning disable CA1859 // Use concrete types when possible for improved performance - IResponse response = Response.FromRequest(request); -#pragma warning restore CA1859 // Use concrete types when possible for improved performance + // Create a response based on the query + DnsMessage response = query.CreateResponseInstance(); + response.ReturnCode = ReturnCode.NoError; + response.IsAuthoritiveAnswer = true; - foreach (Question question in response.Questions) + foreach (var question in query.Questions) { - logger.Debug($"DNS request = {question.Name}"); + string name = question.Name.ToString().ToLower().TrimEnd('.'); + logger.Debug($"Processing {question.RecordType} query for: {name}"); - switch (question.Type) + switch (question.RecordType) { case RecordType.A: - IResourceRecord recordA = new IPAddressResourceRecord(question.Name, IPAddress); - response.AnswerRecords.Add(recordA); + // Redirect all A-record lookups to the Proxy's IP + response.AnswerRecords.Add(new ARecord(question.Name, 3600, LocalIP)); break; - //case RecordType.AAAA: - // IResourceRecord recordAAAA = new IPAddressResourceRecord(question.Name, IPAddress.Parse("::1")); - // response.AnswerRecords.Add(recordAAAA); - // break; - - case RecordType.SRV: - ushort port = 1; - if (question.Name.ToString().StartsWith("_ldap._tcp.pdc._msdcs.", StringComparison.OrdinalIgnoreCase)) - { - port = LdapPort; - } - else if (question.Name.ToString().StartsWith("_ldap._tcp.gc._msdcs.", StringComparison.OrdinalIgnoreCase)) - { - port = Gcport; - } - IResourceRecord recordSRV = new ServiceResourceRecord(question.Name, 0, 100, port, new Domain(Hostname)); - response.AnswerRecords.Add(recordSRV); + case RecordType.Srv: + ushort targetPort = DetermineSrvPort(name); + + // Target must be a DomainName object in ARSoft + //DomainName targetHost = DomainName.Parse(Hostname); + DomainName target = DomainName.Parse(LocalIP.ToString()); + + response.AnswerRecords.Add(new SrvRecord( + question.Name, + 3600, // TTL + 0, // Priority + 100, // Weight + targetPort, + target)); + + logger.Info($"Spoofed SRV: {name} -> {target}:{targetPort}"); + break; default: - throw new NotImplementedException($"RequestType: {question.Type} has not been implemented"); + // For other types, we return an empty success or let it time out + logger.Debug($"Ignoring unsupported record type: {question.RecordType}"); + break; } } - logger.Debug($"DNS response = {response}"); - return Task.FromResult(response); + e.Response = response; + return Task.CompletedTask; } - private static IPAddress GetLocalIPAddress() + private ushort DetermineSrvPort(string queryName) { - var host = Dns.GetHostEntry(Dns.GetHostName()); - foreach (var ip in host.AddressList) + if (queryName.Contains("_ldap._tcp")) return LdapPort; + if (queryName.Contains("_gc._tcp")) return GcPort; + if (queryName.Contains("_identity._tcp") || queryName.Contains("_adws._tcp")) { - if (ip.AddressFamily == AddressFamily.InterNetwork) - { - return ip; - } + return 9389; } - const string errorString = "No network adapters with an IPv4 address in the system!"; - logger.Error(errorString); - throw new Exception(errorString); + return 1; + } + + private static IPAddress GetLocalIPAddress() + { + return Dns.GetHostEntry(Dns.GetHostName()).AddressList + .FirstOrDefault(ip => ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) + ?? throw new Exception("No IPv4 address found!"); } } } \ No newline at end of file diff --git a/ADWSProxy/Dockerfile b/ADWSProxy/Dockerfile index a60ca28..52dd529 100644 --- a/ADWSProxy/Dockerfile +++ b/ADWSProxy/Dockerfile @@ -1,7 +1,7 @@ # See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. # This stage is used when running from VS in fast mode (Default for Debug configuration) -FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base RUN apt-get update && apt-get install -y --no-install-recommends \ gss-ntlmssp \ libldap-2.5-0 \ @@ -9,11 +9,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ netcat-openbsd \ dnsutils \ && rm -rf /var/lib/apt/lists/* -USER $APP_UID WORKDIR /app +EXPOSE 53 EXPOSE 389 EXPOSE 3268 +USER $APP_UID + # This stage is used to build the service project FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG BUILD_CONFIGURATION=Release diff --git a/ADWSProxy/Program.cs b/ADWSProxy/Program.cs index 7027dd5..395b5d8 100644 --- a/ADWSProxy/Program.cs +++ b/ADWSProxy/Program.cs @@ -1,12 +1,12 @@ -using ADWSProxy.LDAP; +using ADWSProxy.DNS; +using ADWSProxy.LDAP; +using ARSoft.Tools.Net.Dns; using CommandLine; using CommandLine.Text; -using DNS.Server; using log4net; using Newtonsoft.Json; using System.Globalization; using System.Net; -using System.Net.NetworkInformation; namespace ADWSProxy { @@ -73,17 +73,15 @@ private static void Main(string[] args) try { + const string gcInstance = "ldap:3268"; + string ldapInstance = parsedArgs.Value.OnlyUseGCBacked!.Value ? gcInstance : "ldap:389"; var LDAPEndpoint = $"0.0.0.0:{parsedArgs.Value.LDAPPort}"; var dc = parsedArgs.Value.DomainController; ArgumentNullException.ThrowIfNullOrWhiteSpace(dc); - if (!dc.Contains('.') && !string.IsNullOrWhiteSpace(parsedArgs.Value.Domain)) - { - dc = $"{dc}.{parsedArgs.Value.Domain}"; - } - LDAPListener = new Listener(CreateIPEndPoint(LDAPEndpoint), dc, parsedArgs.Value.ADWSDCPort, parsedArgs.Value.LDAPInstance!, parsedArgs.Value.Mode, credentials); + LDAPListener = new Listener(CreateIPEndPoint(LDAPEndpoint), dc, parsedArgs.Value.ADWSDCPort, ldapInstance, parsedArgs.Value.Mode, credentials); LDAPListener.Start(); - logger.Info($"Succesfully started the LDAPListener on {LDAPEndpoint} using instance {parsedArgs.Value.LDAPInstance}"); + logger.Info($"Succesfully started the LDAPListener on {LDAPEndpoint} using instance {ldapInstance}"); var gc = parsedArgs.Value.GlobalCatalog; if (string.IsNullOrWhiteSpace(gc)) @@ -92,22 +90,18 @@ private static void Main(string[] args) } else { - if (!gc.Contains('.') && !string.IsNullOrWhiteSpace(parsedArgs.Value.Domain)) - { - gc = $"{gc}.{parsedArgs.Value.Domain}"; - } var GCEndpoint = $"0.0.0.0:{parsedArgs.Value.GCPort}"; - GCListener = new Listener(CreateIPEndPoint(GCEndpoint), gc, parsedArgs.Value.ADWSGCPort, parsedArgs.Value.GCInstance!, parsedArgs.Value.Mode, credentials); + + GCListener = new Listener(CreateIPEndPoint(GCEndpoint), gc, parsedArgs.Value.ADWSGCPort, gcInstance, parsedArgs.Value.Mode, credentials); GCListener.Start(); - logger.Info($"Succesfully started the GCListener on {GCEndpoint} using instance {parsedArgs.Value.GCInstance}"); + logger.Info($"Succesfully started the GCListener on {GCEndpoint} using instance {gcInstance}"); } try { - var dnsEndpoint = CreateIPEndPoint($"0.0.0.0:{parsedArgs.Value.DnsPort}"); - if (StartDNS(true, dnsEndpoint, parsedArgs.Value.LDAPPort, parsedArgs.Value.GCPort)) + if (StartDNS(parsedArgs.Value.ExitOnDNSStartError ?? false, parsedArgs.Value.LDAPPort, parsedArgs.Value.GCPort, parsedArgs.Value.HostIP)) { - logger.Info($"Succesfully started the DNSListener on {dnsEndpoint}"); + logger.Info($"Succesfully started the DNSListener"); } else { @@ -158,28 +152,27 @@ private static void Main(string[] args) Environment.Exit(exitCode); } - /// - /// This wil start a DNS Server listening on UDP/53. - /// - private static bool StartDNS(bool ExitOnDNSStartError, IPEndPoint dnsEndpoint, ushort ldapPort, ushort gcPort) + private static bool StartDNS(bool ExitOnDNSStartError, ushort ldapPort, ushort gcPort, string? hostIp = null) { - bool alreadyinuse = IPGlobalProperties.GetIPGlobalProperties().GetActiveUdpListeners().Any(p => p.Port == dnsEndpoint.Port); - if (alreadyinuse) + try + { + IPAddress? h = string.IsNullOrWhiteSpace(hostIp) ? null : IPAddress.Parse(hostIp); + var resolver = new Resolver(ldapPort, gcPort, h); + DnsServer server = new(10, 10); + server.QueryReceived += resolver.OnQueryReceived; + server.Start(); + logger.Info("DNS Server is live on UDP and TCP port 53."); + return true; + } + catch (Exception ex) { - string errorMessage = $"Port UDP/{dnsEndpoint.Port} is already in use, unable to start DNS resolver."; - logger.Error(errorMessage); + logger.Error("Error starting DNS server", ex); if (ExitOnDNSStartError) { Environment.Exit(1); } return false; } - else - { - DnsServer dnsServer = new(new DNS.Resolver(ldapPort, gcPort), dnsEndpoint); - dnsServer.Listen(); - return true; - } } } } \ No newline at end of file diff --git a/Readme.md b/Readme.md index ffdf80e..2370978 100644 --- a/Readme.md +++ b/Readme.md @@ -5,7 +5,7 @@ A high-performance, cross-platform Active Directory Web Services (ADWS) proxy bu --- ## Key Features -* **Cross-Platform:** Runs on Windows, Linux, and macOS. +* **Cross-Platform:** Runs on Windows, Linux, and MacOS. * **Docker Ready:** Optimized for lightweight Linux containers (Alpine/Debian). * **Native SID Parsing:** Includes a custom binary-to-string SID parser, eliminating dependencies on Windows-only system libraries. * **Modern Tooling:** Built using .NET 8 (LTS) SDK and `dotnet-svcutil`. @@ -19,19 +19,20 @@ A high-performance, cross-platform Active Directory Web Services (ADWS) proxy bu --adwsdcport (Default: 9389) The ADWS port to proxy to on the domain controller --adwsgcport (Default: 9389) The ADWS port to proxy to on the global catalog --consoleloglevel (Default: INFO) Set the log level for the console output - --dnsport (Default: 53) The DNS port to proxy from - -D, --domain The domain to authenticate to ADWS - --domaincontroller Required. The domain controller to proxy to + --domaincontroller Required. The domain controller to proxy to for NTDS --exitondnsstarterror (Default: true) Exit if the DNS port is already in use - --gcinstance (Default: ldap:3268) The GC instance within ADWS --gcport (Default: 3268) The GC port to proxy from - --globalcatalog The global catalog to proxy to - --ldapinstance (Default: ldap:389) The LDAP instance within ADWS + --globalcatalog (Default: only DC/NTDS is used) The global catalog to proxy to + --hostip (Default: system IP) Override the IP in the DNS respones --ldapport (Default: 389) The LDAP port to proxy from --logdirectory (Default: .) The log directory for runtime logs -m, --mode (Default: Windows) Set the ADWS endpoint mode: Windows or Username. - -p, --password The password to authenticate to ADWS + --only-use-gc-backend (Default: false) Force ADWS to use GC instance (ldap:3268) for all backend communication + +These credentials can either be ommited or all need to be filled in. If empty then the current Windows domain session will be used. -u, --username The username to authenticate to ADWS + -p, --password The password to authenticate to ADWS + -D, --domain The domain to authenticate to ADWS --help Display this help screen. --version Display version information. ``` @@ -47,13 +48,13 @@ Windows Server 2025 has removed the `/UserName` endpoints so only `--mode Window This mode can be used without explicitly noting credentials by using the current Windows session: ```powershell -.\ADWSProxy.exe --domaincontroller "dc01" +.\ADWSProxy.exe --domaincontroller "dc01.[...]" ``` -It's also possible to explicitly set credentials to use, for instance when running from a non domain joined machine and/or a docker container. +It's also possible to explicitly set credentials to use, for instance when running from a non domain joined machine or a machine that is joined to a different domain. ```powershell -.\ADWSProxy.exe -u "user" -p "password" --domain "[...]" --domaincontroller "dc01" +.\ADWSProxy.exe -u "user" -p "password" --domain "[...]" --domaincontroller "dc01.[...]" ``` #### Older versions @@ -61,19 +62,22 @@ It's also possible to explicitly set credentials to use, for instance when runni Older versions of Windows do support the `/UserName` endpoints so we can also use those to obtain data via ADWS: ```powershell -.\ADWSProxy.exe -m "Username" -u "user" -p "password" --domain "[...]" --domaincontroller "dc01" +.\ADWSProxy.exe -m "Username" -u "user" -p "password" --domain "[...]" --domaincontroller "dc01.[...]" ``` ### Linux/Docker Example: ```bash docker run -p 389:389 -p 9389:9389 adwsproxy:latest \ --mode Windows \ - --username "luc" \ + --username "user" \ --password "password" \ - --domaincontroller dc01 \ + --domaincontroller dc01.[...] \ --domain [...] ``` +It should be noted that this will result in event viewer logs on a default Windows Server 2025 installation. +To be exact it's event 4023 because of "Channel Binding: Not Supported". + ## Technical Details ### Binary SID Parsing @@ -101,7 +105,7 @@ Server 2025 enforces strict integrity requirements. All NTLM/Kerberos tokens mus ### NTLMv1 Retirement -Server 2025 has effectively retired NTLMv1. If running this tool from a Linux/Docker environment, ensure you have the `gss-ntlmssp` package installed to support modern NTLMv2/Negotiate handshakes. +Server 2025 has effectively retired NTLMv1. If running this tool from a Linux environment, ensure you have the `gss-ntlmssp` package installed to support modern NTLMv2/Negotiate handshakes. ## Integration Testing (Bloodhound) @@ -112,6 +116,8 @@ Server 2025 has effectively retired NTLMv1. If running this tool from a Linux/Do python3 -m bloodhound -u x -p x -d [...] --auth ntlm -ns 127.0.0.1 -c All ``` +>Technical Note: Bloodhound-Python can't run with `only-use-gc-backend` set to true as the dataset returned by the GC is less complete than the default dataset. + ## Blog Post & Background Detailed research into ADWS exploitation and the architecture of this tool is available on the [Rabobank TechBlog](https://rabobank.jobs/en/techblog/adws-an-unconventional-path-into-active-directory-luc-kolen/). From 312df64b2ebbbe413d6a46e263aaf1015c08e026 Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Wed, 28 Jan 2026 18:00:23 +0100 Subject: [PATCH 14/18] Channel Binding: Supported To be honest, no clue why this started to work, but tested on Server 2025 --- ADWSProxy/ADWSProxy.csproj | 2 ++ Readme.md | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ADWSProxy/ADWSProxy.csproj b/ADWSProxy/ADWSProxy.csproj index 251f5f0..c4c718c 100644 --- a/ADWSProxy/ADWSProxy.csproj +++ b/ADWSProxy/ADWSProxy.csproj @@ -27,6 +27,8 @@ + + diff --git a/Readme.md b/Readme.md index 2370978..af8ad75 100644 --- a/Readme.md +++ b/Readme.md @@ -75,9 +75,6 @@ docker run -p 389:389 -p 9389:9389 adwsproxy:latest \ --domain [...] ``` -It should be noted that this will result in event viewer logs on a default Windows Server 2025 installation. -To be exact it's event 4023 because of "Channel Binding: Not Supported". - ## Technical Details ### Binary SID Parsing From 67542d3f1e68f0d65056163fc3129d2203ab6053 Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Thu, 29 Jan 2026 10:23:37 +0100 Subject: [PATCH 15/18] Small auth fix --- ADWSProxy/ADWS/Connection.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ADWSProxy/ADWS/Connection.cs b/ADWSProxy/ADWS/Connection.cs index a050335..29257fd 100644 --- a/ADWSProxy/ADWS/Connection.cs +++ b/ADWSProxy/ADWS/Connection.cs @@ -153,7 +153,6 @@ private ResourceClient ResourceClient { case AdwsEndpoint.Windows: _resource.ClientCredentials.Windows.ClientCredential = Credential; - _resource.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; break; case AdwsEndpoint.Username: _resource.ClientCredentials.UserName.UserName = $"{Credential.UserName}@{Credential.Domain}"; @@ -162,6 +161,8 @@ private ResourceClient ResourceClient break; } } + _resource.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; + } return _resource; @@ -186,7 +187,6 @@ private SearchClient SearchClient { case AdwsEndpoint.Windows: _search.ClientCredentials.Windows.ClientCredential = Credential; - _search.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; break; case AdwsEndpoint.Username: _search.ClientCredentials.UserName.UserName = $"{Credential.UserName}@{Credential.Domain}"; @@ -195,6 +195,7 @@ private SearchClient SearchClient break; } } + _search.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; } return _search; } From 059664fa1a6de1abc8ae8b61d8a5d1ed4867109c Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Thu, 29 Jan 2026 10:35:05 +0100 Subject: [PATCH 16/18] Added --skipdns option --- ADWSProxy/CommandLineOptions.cs | 3 +++ ADWSProxy/Program.cs | 28 ++++++++++++++++++---------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/ADWSProxy/CommandLineOptions.cs b/ADWSProxy/CommandLineOptions.cs index 218d957..8463c20 100644 --- a/ADWSProxy/CommandLineOptions.cs +++ b/ADWSProxy/CommandLineOptions.cs @@ -83,6 +83,9 @@ public string? GlobalCatalog [Option('m', "mode", Required = false, Default = AdwsEndpoint.Windows, HelpText = "ADWS Endpoint Mode: 'Windows' (default, NTLM/Kerberos) or 'Username' (Legacy TLS).")] public AdwsEndpoint Mode { get; set; } + [Option("skipdns", Required = false, Default = false, HelpText = "Skip starting the DNS listener")] + public bool? SkipDns { get; set; } + public NetworkCredential? GetNetworkCredential() { if (Username == null && Password == null && Domain == null) return null; diff --git a/ADWSProxy/Program.cs b/ADWSProxy/Program.cs index 395b5d8..9990c5e 100644 --- a/ADWSProxy/Program.cs +++ b/ADWSProxy/Program.cs @@ -97,22 +97,30 @@ private static void Main(string[] args) logger.Info($"Succesfully started the GCListener on {GCEndpoint} using instance {gcInstance}"); } - try + if (parsedArgs.Value.SkipDns!.Value) { - if (StartDNS(parsedArgs.Value.ExitOnDNSStartError ?? false, parsedArgs.Value.LDAPPort, parsedArgs.Value.GCPort, parsedArgs.Value.HostIP)) + logger.Info("Skipping DNS listener startup"); + } + else + { + try { - logger.Info($"Succesfully started the DNSListener"); + if (StartDNS(parsedArgs.Value.ExitOnDNSStartError ?? false, parsedArgs.Value.LDAPPort, parsedArgs.Value.GCPort, parsedArgs.Value.HostIP)) + { + logger.Info($"Succesfully started the DNSListener"); + } + else + { + const string errorString = "Error starting DNSListner"; + throw new Exception(errorString); + } } - else + catch (Exception ex) { - const string errorString = "Error starting DNSListner"; - throw new Exception(errorString); + logger.Error(ex.Message, ex); } } - catch (Exception ex) - { - logger.Error(ex.Message, ex); - } + try { From 5efc248e94968395b971c15ef67f0e3f087aef40 Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Thu, 29 Jan 2026 10:38:12 +0100 Subject: [PATCH 17/18] Added skip-dns to the readme.md --- Readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Readme.md b/Readme.md index af8ad75..3a50fa5 100644 --- a/Readme.md +++ b/Readme.md @@ -28,6 +28,7 @@ A high-performance, cross-platform Active Directory Web Services (ADWS) proxy bu --logdirectory (Default: .) The log directory for runtime logs -m, --mode (Default: Windows) Set the ADWS endpoint mode: Windows or Username. --only-use-gc-backend (Default: false) Force ADWS to use GC instance (ldap:3268) for all backend communication + --skip-dns (Default: false) Skip starting the DNS listener These credentials can either be ommited or all need to be filled in. If empty then the current Windows domain session will be used. -u, --username The username to authenticate to ADWS From 72f09554994a39a4c3f188681c00b7a43bff040d Mon Sep 17 00:00:00 2001 From: Luc Kolen Date: Tue, 3 Feb 2026 16:07:11 +0100 Subject: [PATCH 18/18] Removed CommandLine and Newtonsoft.Json packages Added listenip option Renamed OnlyUseGCBackend option Added docker built instructions for ADWSProxy --- ADWSProxy/ADWS/ActiveDirectoryWebService.cs | 2320 +++++++++++-------- ADWSProxy/ADWS/Connection.cs | 102 +- ADWSProxy/ADWS/Request/ADWSException.cs | 10 +- ADWSProxy/ADWSProxy.csproj | 3 +- ADWSProxy/CommandLineOptions.cs | 136 +- ADWSProxy/DNS/Resolver.cs | 6 +- ADWSProxy/LDAP/DataHolder.cs | 7 +- ADWSProxy/LDAP/Helpers.cs | 5 +- ADWSProxy/LDAP/Listener.cs | 2 +- ADWSProxy/LogHelper.cs | 15 + ADWSProxy/LoggerConfig.cs | 2 +- ADWSProxy/Program.cs | 85 +- ADWSProxyCore.slnx | 12 +- Readme.md | 37 +- TestClient/Program.cs | 6 +- TestClient/TestClient.csproj | 22 +- 16 files changed, 1594 insertions(+), 1176 deletions(-) create mode 100644 ADWSProxy/LogHelper.cs diff --git a/ADWSProxy/ADWS/ActiveDirectoryWebService.cs b/ADWSProxy/ADWS/ActiveDirectoryWebService.cs index 31c5b4b..1707782 100644 --- a/ADWSProxy/ADWS/ActiveDirectoryWebService.cs +++ b/ADWSProxy/ADWS/ActiveDirectoryWebService.cs @@ -2,7 +2,7 @@ // // This code was generated by a tool. // -// dotnet --fx-version 8.0.23 "C:\Users\luc\.dotnet\tools\.store\dotnet-svcutil\8.0.0\dotnet-svcutil\8.0.0\tools\net8.0\any\dotnet-svcutil.dll" net.tcp://[...]:9389/ActiveDirectoryWebServices/mex --namespace "*,ADWSProxy.ADWS" --outputFile "ActiveDirectoryWebService.cs" --serializer XmlSerializer --targetFramework net8.0 +// dotnet --fx-version 8.0.23 "C:\Users\luc\.dotnet\tools\.store\dotnet-svcutil\8.0.0\dotnet-svcutil\8.0.0\tools\net8.0\any\dotnet-svcutil.dll" net.tcp://[...]:9389/ActiveDirectoryWebServices/mex --namespace "*,ADWSProxy.ADWS" --outputFile "ActiveDirectoryWebService.cs" --serializer XmlSerializer --targetFramework net8.0 --sync // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -11,38 +11,38 @@ namespace ADWSProxy.ADWS { - - + + /// [System.Xml.Serialization.XmlIncludeAttribute(typeof(RenewFault))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(PullFault))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(EnumerateFault))] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] public partial class FaultDetail { - + private ArgumentErrorDetail argumentErrorField; - + private string errorField; - + private DirectoryErrorDetail directoryErrorField; - + private string invalidAttributeTypeField; - + private string invalidOperationField; - + private ChangeType invalidChangeField; - + private AttributeTypeAndValue invalidAttributeTypeOrValueField; - + private string shortErrorField; - + private string unknownAttributeField; - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Order = 0)] public ArgumentErrorDetail ArgumentError { get @@ -54,9 +54,9 @@ public ArgumentErrorDetail ArgumentError this.argumentErrorField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=1)] + [System.Xml.Serialization.XmlElementAttribute(Order = 1)] public string Error { get @@ -68,9 +68,9 @@ public string Error this.errorField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=2)] + [System.Xml.Serialization.XmlElementAttribute(Order = 2)] public DirectoryErrorDetail DirectoryError { get @@ -82,9 +82,9 @@ public DirectoryErrorDetail DirectoryError this.directoryErrorField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=3)] + [System.Xml.Serialization.XmlElementAttribute(Order = 3)] public string InvalidAttributeType { get @@ -96,9 +96,9 @@ public string InvalidAttributeType this.invalidAttributeTypeField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=4)] + [System.Xml.Serialization.XmlElementAttribute(Order = 4)] public string InvalidOperation { get @@ -110,9 +110,9 @@ public string InvalidOperation this.invalidOperationField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=5)] + [System.Xml.Serialization.XmlElementAttribute(Order = 5)] public ChangeType InvalidChange { get @@ -124,9 +124,9 @@ public ChangeType InvalidChange this.invalidChangeField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=6)] + [System.Xml.Serialization.XmlElementAttribute(Order = 6)] public AttributeTypeAndValue InvalidAttributeTypeOrValue { get @@ -138,9 +138,9 @@ public AttributeTypeAndValue InvalidAttributeTypeOrValue this.invalidAttributeTypeOrValueField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=7)] + [System.Xml.Serialization.XmlElementAttribute(Order = 7)] public string ShortError { get @@ -152,9 +152,9 @@ public string ShortError this.shortErrorField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=8)] + [System.Xml.Serialization.XmlElementAttribute(Order = 8)] public string UnknownAttribute { get @@ -167,22 +167,22 @@ public string UnknownAttribute } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] public partial class ArgumentErrorDetail { - + private string messageField; - + private string parameterNameField; - + private string shortMessageField; - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Order = 0)] public string Message { get @@ -194,9 +194,9 @@ public string Message this.messageField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=1)] + [System.Xml.Serialization.XmlElementAttribute(Order = 1)] public string ParameterName { get @@ -208,9 +208,9 @@ public string ParameterName this.parameterNameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=2)] + [System.Xml.Serialization.XmlElementAttribute(Order = 2)] public string ShortMessage { get @@ -223,21 +223,21 @@ public string ShortMessage } } } - + /// [System.Xml.Serialization.XmlIncludeAttribute(typeof(ChangeType))] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] public partial class AttributeTypeAndValue { - + private ADWSProxy.ADWS.ArrayOfXElement attributeTypeField; - + private ADWSProxy.ADWS.ArrayOfXElement attributeValueField; - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Order = 0)] public ADWSProxy.ADWS.ArrayOfXElement AttributeType { get @@ -249,9 +249,9 @@ public ADWSProxy.ADWS.ArrayOfXElement AttributeType this.attributeTypeField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=1)] + [System.Xml.Serialization.XmlElementAttribute(Order = 1)] public ADWSProxy.ADWS.ArrayOfXElement AttributeValue { get @@ -264,24 +264,26 @@ public ADWSProxy.ADWS.ArrayOfXElement AttributeValue } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://www.w3.org/2001/XMLSchema")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://www.w3.org/2001/XMLSchema")] +#pragma warning disable CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language. public partial class schema +#pragma warning restore CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language. { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] public partial class ChangeType : AttributeTypeAndValue { - + private string operationField; - + /// [System.Xml.Serialization.XmlAttributeAttribute()] public string Operation @@ -296,30 +298,30 @@ public string Operation } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] public partial class DirectoryErrorDetail { - + private string messageField; - + private string errorCodeField; - + private string extendedErrorMessageField; - + private string matchedDNField; - + private string[] referralField; - + private string win32ErrorCodeField; - + private string shortMessageField; - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Order = 0)] public string Message { get @@ -331,9 +333,9 @@ public string Message this.messageField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=1)] + [System.Xml.Serialization.XmlElementAttribute(Order = 1)] public string ErrorCode { get @@ -345,9 +347,9 @@ public string ErrorCode this.errorCodeField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=2)] + [System.Xml.Serialization.XmlElementAttribute(Order = 2)] public string ExtendedErrorMessage { get @@ -359,9 +361,9 @@ public string ExtendedErrorMessage this.extendedErrorMessageField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=3)] + [System.Xml.Serialization.XmlElementAttribute(Order = 3)] public string MatchedDN { get @@ -373,9 +375,9 @@ public string MatchedDN this.matchedDNField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute("Referral", Order=4)] + [System.Xml.Serialization.XmlElementAttribute("Referral", Order = 4)] public string[] Referral { get @@ -387,9 +389,9 @@ public string[] Referral this.referralField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=5)] + [System.Xml.Serialization.XmlElementAttribute(Order = 5)] public string Win32ErrorCode { get @@ -401,9 +403,9 @@ public string Win32ErrorCode this.win32ErrorCodeField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=6)] + [System.Xml.Serialization.XmlElementAttribute(Order = 6)] public string ShortMessage { get @@ -416,34 +418,34 @@ public string ShortMessage } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] public partial class RenewFault : FaultDetail { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] public partial class PullFault : FaultDetail { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] public partial class EnumerateFault : FaultDetail { - + private string invalidPropertyField; - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Order = 0)] public string InvalidProperty { get @@ -456,24 +458,24 @@ public string InvalidProperty } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(TypeName="FaultDetail", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.Xml.Serialization.XmlTypeAttribute(TypeName = "FaultDetail", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] public partial class FaultDetail1 { - + private int sizeLimitField; - + private bool sizeLimitFieldSpecified; - + private string valueField; - + private System.Xml.Serialization.XmlSerializerNamespaces xmlnsField; - + /// - [System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] public int SizeLimit { get @@ -485,7 +487,7 @@ public int SizeLimit this.sizeLimitField = value; } } - + /// [System.Xml.Serialization.XmlIgnoreAttribute()] public bool SizeLimitSpecified @@ -499,7 +501,7 @@ public bool SizeLimitSpecified this.sizeLimitFieldSpecified = value; } } - + /// [System.Xml.Serialization.XmlTextAttribute()] public string Value @@ -513,7 +515,7 @@ public string Value this.valueField = value; } } - + /// [System.Xml.Serialization.XmlNamespaceDeclarationsAttribute()] public System.Xml.Serialization.XmlSerializerNamespaces xmlns @@ -528,18 +530,18 @@ public System.Xml.Serialization.XmlSerializerNamespaces xmlns } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] public partial class FragmentDialect { - + private string valueField; - + /// - [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")] + [System.Xml.Serialization.XmlTextAttribute(DataType = "anyURI")] public string Value { get @@ -552,20 +554,20 @@ public string Value } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] public partial class AttributeTypeNotValid { - + private AttributeTypeNotValidForDialect attributeTypeNotValidForDialectField; - + private AttributeTypeNotValidForEntry attributeTypeNotValidForEntryField; - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Order = 0)] public AttributeTypeNotValidForDialect AttributeTypeNotValidForDialect { get @@ -577,9 +579,9 @@ public AttributeTypeNotValidForDialect AttributeTypeNotValidForDialect this.attributeTypeNotValidForDialectField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=1)] + [System.Xml.Serialization.XmlElementAttribute(Order = 1)] public AttributeTypeNotValidForEntry AttributeTypeNotValidForEntry { get @@ -592,18 +594,18 @@ public AttributeTypeNotValidForEntry AttributeTypeNotValidForEntry } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] public partial class AttributeTypeNotValidForDialect { - + private string attributeTypeField; - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Order = 0)] public string AttributeType { get @@ -616,18 +618,18 @@ public string AttributeType } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] public partial class AttributeTypeNotValidForEntry { - + private string attributeTypeField; - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Order = 0)] public string AttributeType { get @@ -640,18 +642,18 @@ public string AttributeType } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.xmlsoap.org/ws/2004/09/enumeration")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.xmlsoap.org/ws/2004/09/enumeration")] public partial class SupportedDialect { - + private string valueField; - + /// - [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")] + [System.Xml.Serialization.XmlTextAttribute(DataType = "anyURI")] public string Value { get @@ -664,18 +666,18 @@ public string Value } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] public partial class SupportedSelectOrSortDialect { - + private string valueField; - + /// - [System.Xml.Serialization.XmlTextAttribute(DataType="anyURI")] + [System.Xml.Serialization.XmlTextAttribute(DataType = "anyURI")] public string Value { get @@ -688,15 +690,15 @@ public string Value } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class GetADGroupMemberFault : CustomActionFault { } - + /// [System.Xml.Serialization.XmlIncludeAttribute(typeof(GetVersionFault))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ChangeOptionalFeatureFault))] @@ -712,20 +714,20 @@ public partial class GetADGroupMemberFault : CustomActionFault [System.Xml.Serialization.XmlIncludeAttribute(typeof(GetADGroupMemberFault))] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class CustomActionFault { - + private ArgumentErrorDetailCA argumentErrorField; - + private DirectoryErrorDetailCA directoryErrorField; - + private string errorField; - + private string shortErrorField; - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] public ArgumentErrorDetailCA ArgumentError { get @@ -737,9 +739,9 @@ public ArgumentErrorDetailCA ArgumentError this.argumentErrorField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] public DirectoryErrorDetailCA DirectoryError { get @@ -751,9 +753,9 @@ public DirectoryErrorDetailCA DirectoryError this.directoryErrorField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 2)] public string Error { get @@ -765,9 +767,9 @@ public string Error this.errorField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=3)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 3)] public string ShortError { get @@ -780,22 +782,22 @@ public string ShortError } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ArgumentErrorDetailCA { - + private string messageField; - + private string parameterNameField; - + private string shortMessageField; - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] public string Message { get @@ -807,9 +809,9 @@ public string Message this.messageField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] public string ParameterName { get @@ -821,9 +823,9 @@ public string ParameterName this.parameterNameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 2)] public string ShortMessage { get @@ -836,30 +838,30 @@ public string ShortMessage } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class DirectoryErrorDetailCA { - + private string errorCodeField; - + private string extendedErrorMessageField; - + private string matchedDNField; - + private string messageField; - + private string[] referralField; - + private string shortMessageField; - + private string win32ErrorCodeField; - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] public string ErrorCode { get @@ -871,9 +873,9 @@ public string ErrorCode this.errorCodeField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] public string ExtendedErrorMessage { get @@ -885,9 +887,9 @@ public string ExtendedErrorMessage this.extendedErrorMessageField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 2)] public string MatchedDN { get @@ -899,9 +901,9 @@ public string MatchedDN this.matchedDNField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=3)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 3)] public string Message { get @@ -913,10 +915,10 @@ public string Message this.messageField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=4)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 4)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] Referral { get @@ -928,9 +930,9 @@ public string[] Referral this.referralField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=5)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 5)] public string ShortMessage { get @@ -942,9 +944,9 @@ public string ShortMessage this.shortMessageField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=6)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 6)] public string Win32ErrorCode { get @@ -957,206 +959,230 @@ public string Win32ErrorCode } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class GetVersionFault : CustomActionFault { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ChangeOptionalFeatureFault : CustomActionFault { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class GetADForestFault : CustomActionFault { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class MoveADOperationMasterRoleFault : CustomActionFault { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class GetADDomainFault : CustomActionFault { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class GetADDomainControllerFault : CustomActionFault { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class TranslateNameFault : CustomActionFault { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class GetADPrincipalAuthorizationGroupFault : CustomActionFault { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ChangePasswordFault : CustomActionFault { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class SetPasswordFault : CustomActionFault { } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class GetADPrincipalGroupMembershipFault : CustomActionFault { } - + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace="http://schemas.xmlsoap.org/ws/2004/09/transfer", ConfigurationName="ADWSProxy.ADWS.Resource")] + [System.ServiceModel.ServiceContractAttribute(Namespace = "http://schemas.xmlsoap.org/ws/2004/09/transfer", ConfigurationName = "ADWSProxy.ADWS.Resource")] public interface Resource { - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/Get", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="DestinationUnreachable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail1), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="EncodingLimit", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FragmentDialect), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="FragmentDialectNotSupported", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.AttributeTypeNotValid), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="CannotProcessFilter", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="SchemaValidationError", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="AccessDenied", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name="UnwillingToPerform", Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Get", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "DestinationUnreachable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail1), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "EncodingLimit", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FragmentDialect), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "FragmentDialectNotSupported", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.AttributeTypeNotValid), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "CannotProcessFilter", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "SchemaValidationError", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "AccessDenied", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name = "UnwillingToPerform", Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + System.ServiceModel.Channels.Message Get(System.ServiceModel.Channels.Message request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Get", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse")] System.Threading.Tasks.Task GetAsync(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/transfer/PutResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="DestinationUnreachable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail1), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="EncodingLimit", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FragmentDialect), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="FragmentDialectNotSupported", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.AttributeTypeNotValid), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="CannotProcessFilter", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/fault", Name="InvalidRepresentation")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="SchemaValidationError", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="ActionNotSupportedFault", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="AccessDenied", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name="UnwillingToPerform", Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Put", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/PutResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "DestinationUnreachable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail1), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "EncodingLimit", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FragmentDialect), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "FragmentDialectNotSupported", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.AttributeTypeNotValid), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "CannotProcessFilter", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/fault", Name = "InvalidRepresentation")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "SchemaValidationError", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "ActionNotSupportedFault", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "AccessDenied", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name = "UnwillingToPerform", Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + System.ServiceModel.Channels.Message Put(System.ServiceModel.Channels.Message request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Put", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/PutResponse")] System.Threading.Tasks.Task PutAsync(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/transfer/DeleteResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="DestinationUnreachable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="AccessDenied", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="SchemaValidationError", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name="UnwillingToPerform", Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/DeleteResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "DestinationUnreachable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "AccessDenied", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "SchemaValidationError", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name = "UnwillingToPerform", Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + System.ServiceModel.Channels.Message Delete(System.ServiceModel.Channels.Message request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/DeleteResponse")] System.Threading.Tasks.Task DeleteAsync(System.ServiceModel.Channels.Message request); } - + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public interface ResourceChannel : ADWSProxy.ADWS.Resource, System.ServiceModel.IClientChannel { } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public partial class ResourceClient : System.ServiceModel.ClientBase, ADWSProxy.ADWS.Resource { - + /// /// Implement this partial method to configure the service endpoint. /// /// The endpoint to configure /// The client credentials static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); - - public ResourceClient(EndpointConfiguration endpointConfiguration) : + + public ResourceClient(EndpointConfiguration endpointConfiguration) : base(ResourceClient.GetBindingForEndpoint(endpointConfiguration), ResourceClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public ResourceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : + + public ResourceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : base(ResourceClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public ResourceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : + + public ResourceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(ResourceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public ResourceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + + public ResourceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } - + + public System.ServiceModel.Channels.Message Get(System.ServiceModel.Channels.Message request) + { + return base.Channel.Get(request); + } + public System.Threading.Tasks.Task GetAsync(System.ServiceModel.Channels.Message request) { return base.Channel.GetAsync(request); } - + + public System.ServiceModel.Channels.Message Put(System.ServiceModel.Channels.Message request) + { + return base.Channel.Put(request); + } + public System.Threading.Tasks.Task PutAsync(System.ServiceModel.Channels.Message request) { return base.Channel.PutAsync(request); } - + + public System.ServiceModel.Channels.Message Delete(System.ServiceModel.Channels.Message request) + { + return base.Channel.Delete(request); + } + public System.Threading.Tasks.Task DeleteAsync(System.ServiceModel.Channels.Message request) { return base.Channel.DeleteAsync(request); } - + public virtual System.Threading.Tasks.Task OpenAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } - - #if !NET6_0_OR_GREATER + +#if !NET6_0_OR_GREATER public virtual System.Threading.Tasks.Task CloseAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); } - #endif - +#endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_Resource)) @@ -1179,7 +1205,7 @@ private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(Endpoi } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } - + private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_Resource)) @@ -1192,97 +1218,105 @@ private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointCo } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } - + public enum EndpointConfiguration { - + NetTcpBinding_Resource, - + NetTcpBinding_Resource1, } } - + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace="http://schemas.xmlsoap.org/ws/2004/09/transfer", ConfigurationName="ADWSProxy.ADWS.ResourceFactory")] + [System.ServiceModel.ServiceContractAttribute(Namespace = "http://schemas.xmlsoap.org/ws/2004/09/transfer", ConfigurationName = "ADWSProxy.ADWS.ResourceFactory")] public interface ResourceFactory { - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="DestinationUnreachable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail1), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="EncodingLimit", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FragmentDialect), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="FragmentDialectNotSupported", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/09/transfer/fault", Name="InvalidRepresentation")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.AttributeTypeNotValid), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="CannotProcessFilter", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="ActionNotSupportedFault", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="SchemaValidationError", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="AlreadyExists", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name="AccessDenied", Namespace="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name="UnwillingToPerform", Namespace="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Create", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "DestinationUnreachable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail1), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "EncodingLimit", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FragmentDialect), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "FragmentDialectNotSupported", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/fault", Name = "InvalidRepresentation")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.AttributeTypeNotValid), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "CannotProcessFilter", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "ActionNotSupportedFault", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "SchemaValidationError", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "AlreadyExists", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.dmtf.org/wbem/wsman/1/wsman/fault", Name = "AccessDenied", Namespace = "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess/fault", Name = "UnwillingToPerform", Namespace = "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + System.ServiceModel.Channels.Message Create(System.ServiceModel.Channels.Message request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/transfer/Create", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse")] System.Threading.Tasks.Task CreateAsync(System.ServiceModel.Channels.Message request); } - + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public interface ResourceFactoryChannel : ADWSProxy.ADWS.ResourceFactory, System.ServiceModel.IClientChannel { } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public partial class ResourceFactoryClient : System.ServiceModel.ClientBase, ADWSProxy.ADWS.ResourceFactory { - + /// /// Implement this partial method to configure the service endpoint. /// /// The endpoint to configure /// The client credentials static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); - - public ResourceFactoryClient(EndpointConfiguration endpointConfiguration) : + + public ResourceFactoryClient(EndpointConfiguration endpointConfiguration) : base(ResourceFactoryClient.GetBindingForEndpoint(endpointConfiguration), ResourceFactoryClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public ResourceFactoryClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : + + public ResourceFactoryClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : base(ResourceFactoryClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public ResourceFactoryClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : + + public ResourceFactoryClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(ResourceFactoryClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public ResourceFactoryClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + + public ResourceFactoryClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } - + + public System.ServiceModel.Channels.Message Create(System.ServiceModel.Channels.Message request) + { + return base.Channel.Create(request); + } + public System.Threading.Tasks.Task CreateAsync(System.ServiceModel.Channels.Message request) { return base.Channel.CreateAsync(request); } - + public virtual System.Threading.Tasks.Task OpenAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } - - #if !NET6_0_OR_GREATER + +#if !NET6_0_OR_GREATER public virtual System.Threading.Tasks.Task CloseAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); } - #endif - +#endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_ResourceFactory)) @@ -1305,7 +1339,7 @@ private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(Endpoi } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } - + private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_ResourceFactory)) @@ -1318,143 +1352,183 @@ private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointCo } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } - + public enum EndpointConfiguration { - + NetTcpBinding_ResourceFactory, - + NetTcpBinding_ResourceFactory1, } } - + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace="http://schemas.xmlsoap.org/ws/2004/09/enumeration", ConfigurationName="ADWSProxy.ADWS.Search")] + [System.ServiceModel.ServiceContractAttribute(Namespace = "http://schemas.xmlsoap.org/ws/2004/09/enumeration", ConfigurationName = "ADWSProxy.ADWS.Search")] public interface Search { - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="CannotProcessFilter")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.SupportedDialect), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="FilterDialectRequestedUnavailable")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="InvalidExpirationTime")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="DestinationUnreachable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="InvalidSortKey", Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="EnumerationContextLimitExceeded", Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.SupportedSelectOrSortDialect), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="UnsupportedSelectOrSortDialectFault", Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="InvalidPropertyFault", Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "CannotProcessFilter")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.SupportedDialect), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "FilterDialectRequestedUnavailable")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "InvalidExpirationTime")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "DestinationUnreachable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "InvalidSortKey", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "EnumerationContextLimitExceeded", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.SupportedSelectOrSortDialect), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "UnsupportedSelectOrSortDialectFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.EnumerateFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "InvalidPropertyFault", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + System.ServiceModel.Channels.Message Enumerate(System.ServiceModel.Channels.Message request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse")] System.Threading.Tasks.Task EnumerateAsync(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="DestinationUnreachable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="InvalidEnumerationContext")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.PullFault), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="TimedOut")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.PullFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="MaxCharsNotSupported", Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.PullFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="MaxTimeExceedsLimit", Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "DestinationUnreachable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "InvalidEnumerationContext")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.PullFault), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "TimedOut")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.PullFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "MaxCharsNotSupported", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.PullFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "MaxTimeExceedsLimit", Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + System.ServiceModel.Channels.Message Pull(System.ServiceModel.Channels.Message request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse")] System.Threading.Tasks.Task PullAsync(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/Renew", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/enumeration/RenewResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="InvalidEnumerationContext")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.RenewFault), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="UnableToRenew")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Renew", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/RenewResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "InvalidEnumerationContext")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.RenewFault), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "UnableToRenew")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + System.ServiceModel.Channels.Message Renew(System.ServiceModel.Channels.Message request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Renew", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/RenewResponse")] System.Threading.Tasks.Task RenewAsync(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/GetStatus", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/enumeration/GetStatusResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name="InvalidEnumerationContext")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/GetStatus", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/GetStatusResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault", Name = "InvalidEnumerationContext")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + System.ServiceModel.Channels.Message GetStatus(System.ServiceModel.Channels.Message request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/GetStatus", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/GetStatusResponse")] System.Threading.Tasks.Task GetStatusAsync(System.ServiceModel.Channels.Message request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/Release", ReplyAction="http://schemas.xmlsoap.org/ws/2004/09/enumeration/ReleaseResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action="http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name="EndpointUnavailable", Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Release", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/ReleaseResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.FaultDetail), Action = "http://schemas.xmlsoap.org/ws/2004/08/addressing/fault", Name = "EndpointUnavailable", Namespace = "http://schemas.xmlsoap.org/ws/2004/08/addressing")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + System.ServiceModel.Channels.Message Release(System.ServiceModel.Channels.Message request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/Release", ReplyAction = "http://schemas.xmlsoap.org/ws/2004/09/enumeration/ReleaseResponse")] System.Threading.Tasks.Task ReleaseAsync(System.ServiceModel.Channels.Message request); } - + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public interface SearchChannel : ADWSProxy.ADWS.Search, System.ServiceModel.IClientChannel { } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public partial class SearchClient : System.ServiceModel.ClientBase, ADWSProxy.ADWS.Search { - + /// /// Implement this partial method to configure the service endpoint. /// /// The endpoint to configure /// The client credentials static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); - - public SearchClient(EndpointConfiguration endpointConfiguration) : + + public SearchClient(EndpointConfiguration endpointConfiguration) : base(SearchClient.GetBindingForEndpoint(endpointConfiguration), SearchClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public SearchClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : + + public SearchClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : base(SearchClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public SearchClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : + + public SearchClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(SearchClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public SearchClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + + public SearchClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } - + + public System.ServiceModel.Channels.Message Enumerate(System.ServiceModel.Channels.Message request) + { + return base.Channel.Enumerate(request); + } + public System.Threading.Tasks.Task EnumerateAsync(System.ServiceModel.Channels.Message request) { return base.Channel.EnumerateAsync(request); } - + + public System.ServiceModel.Channels.Message Pull(System.ServiceModel.Channels.Message request) + { + return base.Channel.Pull(request); + } + public System.Threading.Tasks.Task PullAsync(System.ServiceModel.Channels.Message request) { return base.Channel.PullAsync(request); } - + + public System.ServiceModel.Channels.Message Renew(System.ServiceModel.Channels.Message request) + { + return base.Channel.Renew(request); + } + public System.Threading.Tasks.Task RenewAsync(System.ServiceModel.Channels.Message request) { return base.Channel.RenewAsync(request); } - + + public System.ServiceModel.Channels.Message GetStatus(System.ServiceModel.Channels.Message request) + { + return base.Channel.GetStatus(request); + } + public System.Threading.Tasks.Task GetStatusAsync(System.ServiceModel.Channels.Message request) { return base.Channel.GetStatusAsync(request); } - + + public System.ServiceModel.Channels.Message Release(System.ServiceModel.Channels.Message request) + { + return base.Channel.Release(request); + } + public System.Threading.Tasks.Task ReleaseAsync(System.ServiceModel.Channels.Message request) { return base.Channel.ReleaseAsync(request); } - + public virtual System.Threading.Tasks.Task OpenAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } - - #if !NET6_0_OR_GREATER + +#if !NET6_0_OR_GREATER public virtual System.Threading.Tasks.Task CloseAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); } - #endif - +#endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_Search)) @@ -1477,7 +1551,7 @@ private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(Endpoi } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } - + private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_Search)) @@ -1490,78 +1564,114 @@ private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointCo } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } - + public enum EndpointConfiguration { - + NetTcpBinding_Search, - + NetTcpBinding_Search1, } } - + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", ConfigurationName="ADWSProxy.ADWS.AccountManagement")] + [System.ServiceModel.ServiceContractAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", ConfigurationName = "ADWSProxy.ADWS.AccountManagement")] public interface AccountManagement { - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/GetADGroupMember", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + + // CODEGEN: Generating message contract since the wrapper name (GetADGroupMemberRequest) of message GetADGroupMemberRequest does not match the default value (GetADGroupMember) + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/GetADGroupMember", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/GetADGroupMemberResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADGroupMemberFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetADGroupMemberFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + ADWSProxy.ADWS.GetADGroupMemberResponse GetADGroupMember(ADWSProxy.ADWS.GetADGroupMemberRequest request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/GetADGroupMember", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + "nt/GetADGroupMemberResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADGroupMemberFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetADGroupMemberFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task GetADGroupMemberAsync(ADWSProxy.ADWS.GetADGroupMemberRequest request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/GetADPrincipalGroupMembership", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + + // CODEGEN: Generating message contract since the wrapper name (GetADPrincipalGroupMembershipRequest) of message GetADPrincipalGroupMembershipRequest does not match the default value (GetADPrincipalGroupMembership) + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/GetADPrincipalGroupMembership", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/GetADPrincipalGroupMembershipResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADPrincipalGroupMembershipFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetADPrincipalGroupMembershipFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + ADWSProxy.ADWS.GetADPrincipalGroupMembershipResponse GetADPrincipalGroupMembership(ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/GetADPrincipalGroupMembership", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + "nt/GetADPrincipalGroupMembershipResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADPrincipalGroupMembershipFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetADPrincipalGroupMembershipFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task GetADPrincipalGroupMembershipAsync(ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/SetPassword", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + + // CODEGEN: Generating message contract since the wrapper name (SetPasswordRequest) of message SetPasswordRequest does not match the default value (SetPassword) + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/SetPassword", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/SetPasswordResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.SetPasswordFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "SetPasswordFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + ADWSProxy.ADWS.SetPasswordResponse SetPassword(ADWSProxy.ADWS.SetPasswordRequest request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/SetPassword", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + "nt/SetPasswordResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.SetPasswordFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="SetPasswordFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task SetPasswordAsync(ADWSProxy.ADWS.SetPasswordRequest request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/ChangePassword", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + + // CODEGEN: Generating message contract since the wrapper name (ChangePasswordRequest) of message ChangePasswordRequest does not match the default value (ChangePassword) + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/ChangePassword", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/ChangePasswordResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.ChangePasswordFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "ChangePasswordFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + ADWSProxy.ADWS.ChangePasswordResponse ChangePassword(ADWSProxy.ADWS.ChangePasswordRequest request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/ChangePassword", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + "nt/ChangePasswordResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.ChangePasswordFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="ChangePasswordFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task ChangePasswordAsync(ADWSProxy.ADWS.ChangePasswordRequest request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/GetADPrincipalAuthorizationGroup", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + + // CODEGEN: Generating message contract since the wrapper name (GetADPrincipalAuthorizationGroupRequest) of message GetADPrincipalAuthorizationGroupRequest does not match the default value (GetADPrincipalAuthorizationGroup) + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/GetADPrincipalAuthorizationGroup", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/GetADPrincipalAuthorizationGroupResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetADPrincipalAuthorizationGroupFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupResponse GetADPrincipalAuthorizationGroup(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/GetADPrincipalAuthorizationGroup", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + "nt/GetADPrincipalAuthorizationGroupResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetADPrincipalAuthorizationGroupFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task GetADPrincipalAuthorizationGroupAsync(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + - "nt/TranslateName", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + + // CODEGEN: Generating message contract since the wrapper name (TranslateNameRequest) of message TranslateNameRequest does not match the default value (TranslateName) + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/TranslateName", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/TranslateNameResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.TranslateNameFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "TranslateNameFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + ADWSProxy.ADWS.TranslateNameResponse TranslateName(ADWSProxy.ADWS.TranslateNameRequest request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + + "nt/TranslateName", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/AccountManageme" + "nt/TranslateNameResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.TranslateNameFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="TranslateNameFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task TranslateNameAsync(ADWSProxy.ADWS.TranslateNameRequest request); } - + /// [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryGroup))] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ActiveDirectoryPrincipal : ActiveDirectoryObject { - + private byte[] sIDField; - + private string samAccountNameField; - + /// - [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary", IsNullable=true, Order=0)] + [System.Xml.Serialization.XmlElementAttribute(DataType = "base64Binary", IsNullable = true, Order = 0)] public byte[] SID { get @@ -1573,9 +1683,9 @@ public byte[] SID this.sIDField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] public string SamAccountName { get @@ -1588,7 +1698,7 @@ public string SamAccountName } } } - + /// [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryPartition))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryDomain))] @@ -1596,24 +1706,24 @@ public string SamAccountName [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryGroup))] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ActiveDirectoryObject { - + private string distinguishedNameField; - + private string nameField; - + private string objectClassField; - + private string objectGuidField; - + private string[] objectTypesField; - + private string referenceServerField; - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] public string DistinguishedName { get @@ -1625,9 +1735,9 @@ public string DistinguishedName this.distinguishedNameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] public string Name { get @@ -1639,9 +1749,9 @@ public string Name this.nameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 2)] public string ObjectClass { get @@ -1653,9 +1763,9 @@ public string ObjectClass this.objectClassField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=3)] + [System.Xml.Serialization.XmlElementAttribute(Order = 3)] public string ObjectGuid { get @@ -1667,10 +1777,10 @@ public string ObjectGuid this.objectGuidField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=4)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 4)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] ObjectTypes { get @@ -1682,9 +1792,9 @@ public string[] ObjectTypes this.objectTypesField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=5)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 5)] public string ReferenceServer { get @@ -1697,31 +1807,31 @@ public string ReferenceServer } } } - + /// [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryDomain))] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ActiveDirectoryPartition : ActiveDirectoryObject { - + private string dNSRootField; - + private string deletedObjectsContainerField; - + private string lostAndFoundContainerField; - + private string quotasContainerField; - + private string[] readOnlyReplicaDirectoryServerField; - + private string[] replicaDirectoryServerField; - + private string[] subordinateReferencesField; - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] public string DNSRoot { get @@ -1733,9 +1843,9 @@ public string DNSRoot this.dNSRootField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] public string DeletedObjectsContainer { get @@ -1747,9 +1857,9 @@ public string DeletedObjectsContainer this.deletedObjectsContainerField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 2)] public string LostAndFoundContainer { get @@ -1761,9 +1871,9 @@ public string LostAndFoundContainer this.lostAndFoundContainerField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=3)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 3)] public string QuotasContainer { get @@ -1775,10 +1885,10 @@ public string QuotasContainer this.quotasContainerField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=4)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 4)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] ReadOnlyReplicaDirectoryServer { get @@ -1790,10 +1900,10 @@ public string[] ReadOnlyReplicaDirectoryServer this.readOnlyReplicaDirectoryServerField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=5)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 5)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] ReplicaDirectoryServer { get @@ -1805,10 +1915,10 @@ public string[] ReplicaDirectoryServer this.replicaDirectoryServerField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=6)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 6)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] SubordinateReferences { get @@ -1821,53 +1931,53 @@ public string[] SubordinateReferences } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ActiveDirectoryDomain : ActiveDirectoryPartition { - + private string[] allowedDNSSuffixesField; - + private string[] appliedGroupPoliciesField; - + private string[] childDomainsField; - + private string computersContainerField; - + private string domainControllersContainerField; - + private int domainModeField; - + private byte[] domainSIDField; - + private string foreignSecurityPrincipalsContainerField; - + private string forestField; - + private string infrastructureMasterField; - + private string lastLogonReplicationIntervalField; - + private string managedByField; - + private string netBIOSNameField; - + private string pDCEmulatorField; - + private string parentDomainField; - + private string rIDMasterField; - + private string systemsContainerField; - + private string usersContainerField; - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=0)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 0)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] AllowedDNSSuffixes { get @@ -1879,10 +1989,10 @@ public string[] AllowedDNSSuffixes this.allowedDNSSuffixesField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=1)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 1)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] AppliedGroupPolicies { get @@ -1894,10 +2004,10 @@ public string[] AppliedGroupPolicies this.appliedGroupPoliciesField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=2)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 2)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] ChildDomains { get @@ -1909,9 +2019,9 @@ public string[] ChildDomains this.childDomainsField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=3)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 3)] public string ComputersContainer { get @@ -1923,9 +2033,9 @@ public string ComputersContainer this.computersContainerField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=4)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 4)] public string DomainControllersContainer { get @@ -1937,9 +2047,9 @@ public string DomainControllersContainer this.domainControllersContainerField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=5)] + [System.Xml.Serialization.XmlElementAttribute(Order = 5)] public int DomainMode { get @@ -1951,9 +2061,9 @@ public int DomainMode this.domainModeField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary", IsNullable=true, Order=6)] + [System.Xml.Serialization.XmlElementAttribute(DataType = "base64Binary", IsNullable = true, Order = 6)] public byte[] DomainSID { get @@ -1965,9 +2075,9 @@ public byte[] DomainSID this.domainSIDField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=7)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 7)] public string ForeignSecurityPrincipalsContainer { get @@ -1979,9 +2089,9 @@ public string ForeignSecurityPrincipalsContainer this.foreignSecurityPrincipalsContainerField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=8)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 8)] public string Forest { get @@ -1993,9 +2103,9 @@ public string Forest this.forestField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=9)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 9)] public string InfrastructureMaster { get @@ -2007,9 +2117,9 @@ public string InfrastructureMaster this.infrastructureMasterField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(DataType="duration", IsNullable=true, Order=10)] + [System.Xml.Serialization.XmlElementAttribute(DataType = "duration", IsNullable = true, Order = 10)] public string LastLogonReplicationInterval { get @@ -2021,9 +2131,9 @@ public string LastLogonReplicationInterval this.lastLogonReplicationIntervalField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=11)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 11)] public string ManagedBy { get @@ -2035,9 +2145,9 @@ public string ManagedBy this.managedByField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=12)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 12)] public string NetBIOSName { get @@ -2049,9 +2159,9 @@ public string NetBIOSName this.netBIOSNameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=13)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 13)] public string PDCEmulator { get @@ -2063,9 +2173,9 @@ public string PDCEmulator this.pDCEmulatorField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=14)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 14)] public string ParentDomain { get @@ -2077,9 +2187,9 @@ public string ParentDomain this.parentDomainField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=15)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 15)] public string RIDMaster { get @@ -2091,9 +2201,9 @@ public string RIDMaster this.rIDMasterField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=16)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 16)] public string SystemsContainer { get @@ -2105,9 +2215,9 @@ public string SystemsContainer this.systemsContainerField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=17)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 17)] public string UsersContainer { get @@ -2120,20 +2230,20 @@ public string UsersContainer } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ActiveDirectoryGroup : ActiveDirectoryPrincipal { - + private ActiveDirectoryGroupScope groupScopeField; - + private ActiveDirectoryGroupType groupTypeField; - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=0)] + [System.Xml.Serialization.XmlElementAttribute(Order = 0)] public ActiveDirectoryGroupScope GroupScope { get @@ -2145,9 +2255,9 @@ public ActiveDirectoryGroupScope GroupScope this.groupScopeField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=1)] + [System.Xml.Serialization.XmlElementAttribute(Order = 1)] public ActiveDirectoryGroupType GroupType { get @@ -2160,68 +2270,68 @@ public ActiveDirectoryGroupType GroupType } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public enum ActiveDirectoryGroupScope { - + /// Unknown, - + /// DomainLocal, - + /// Global, - + /// Universal, } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public enum ActiveDirectoryGroupType { - + /// Unknown, - + /// Distribution, - + /// Security, } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetADGroupMemberRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADGroupMemberRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetADGroupMemberRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string GroupDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string PartitionDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] public bool Recursive; - + public GetADGroupMemberRequest() { } - + public GetADGroupMemberRequest(string Server, string GroupDN, string PartitionDN, bool Recursive) { this.Server = Server; @@ -2230,59 +2340,59 @@ public GetADGroupMemberRequest(string Server, string GroupDN, string PartitionDN this.Recursive = Recursive; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetADGroupMemberResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADGroupMemberResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetADGroupMemberResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] public ADWSProxy.ADWS.ActiveDirectoryPrincipal[] Members; - + public GetADGroupMemberResponse() { } - + public GetADGroupMemberResponse(ADWSProxy.ADWS.ActiveDirectoryPrincipal[] Members) { this.Members = Members; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetADPrincipalGroupMembershipRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADPrincipalGroupMembershipRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetADPrincipalGroupMembershipRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string PartitionDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string PrincipalDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string ResourceContextPartition; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=3)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 3)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string ResourceContextServer; - + public GetADPrincipalGroupMembershipRequest() { } - + public GetADPrincipalGroupMembershipRequest(string Server, string PartitionDN, string PrincipalDN, string ResourceContextPartition, string ResourceContextServer) { this.Server = Server; @@ -2292,55 +2402,55 @@ public GetADPrincipalGroupMembershipRequest(string Server, string PartitionDN, s this.ResourceContextServer = ResourceContextServer; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetADPrincipalGroupMembershipResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADPrincipalGroupMembershipResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetADPrincipalGroupMembershipResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] public ADWSProxy.ADWS.ActiveDirectoryGroup[] MemberOf; - + public GetADPrincipalGroupMembershipResponse() { } - + public GetADPrincipalGroupMembershipResponse(ADWSProxy.ADWS.ActiveDirectoryGroup[] MemberOf) { this.MemberOf = MemberOf; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="SetPasswordRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "SetPasswordRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class SetPasswordRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string AccountDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string NewPassword; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string PartitionDN; - + public SetPasswordRequest() { } - + public SetPasswordRequest(string Server, string AccountDN, string NewPassword, string PartitionDN) { this.Server = Server; @@ -2349,50 +2459,50 @@ public SetPasswordRequest(string Server, string AccountDN, string NewPassword, s this.PartitionDN = PartitionDN; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="SetPasswordResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "SetPasswordResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class SetPasswordResponse { - + public SetPasswordResponse() { } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="ChangePasswordRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "ChangePasswordRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class ChangePasswordRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string AccountDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string NewPassword; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string OldPassword; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=3)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 3)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string PartitionDN; - + public ChangePasswordRequest() { } - + public ChangePasswordRequest(string Server, string AccountDN, string NewPassword, string OldPassword, string PartitionDN) { this.Server = Server; @@ -2402,42 +2512,42 @@ public ChangePasswordRequest(string Server, string AccountDN, string NewPassword this.PartitionDN = PartitionDN; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="ChangePasswordResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "ChangePasswordResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class ChangePasswordResponse { - + public ChangePasswordResponse() { } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetADPrincipalAuthorizationGroupRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADPrincipalAuthorizationGroupRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetADPrincipalAuthorizationGroupRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string PartitionDN; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string PrincipalDN; - + public GetADPrincipalAuthorizationGroupRequest() { } - + public GetADPrincipalAuthorizationGroupRequest(string Server, string PartitionDN, string PrincipalDN) { this.Server = Server; @@ -2445,54 +2555,54 @@ public GetADPrincipalAuthorizationGroupRequest(string Server, string PartitionDN this.PrincipalDN = PrincipalDN; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetADPrincipalAuthorizationGroupResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADPrincipalAuthorizationGroupResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetADPrincipalAuthorizationGroupResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] public ADWSProxy.ADWS.ActiveDirectoryGroup[] MemberOf; - + public GetADPrincipalAuthorizationGroupResponse() { } - + public GetADPrincipalAuthorizationGroupResponse(ADWSProxy.ADWS.ActiveDirectoryGroup[] MemberOf) { this.MemberOf = MemberOf; } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public enum ActiveDirectoryNameFormat { - + /// DistinguishedName, - + /// CanonicalName, } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ActiveDirectoryNameTranslateResult { - + private string nameField; - + private uint resultField; - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] public string Name { get @@ -2504,9 +2614,9 @@ public string Name this.nameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=1)] + [System.Xml.Serialization.XmlElementAttribute(Order = 1)] public uint Result { get @@ -2519,33 +2629,33 @@ public uint Result } } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="TranslateNameRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "TranslateNameRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class TranslateNameRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] public ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatDesired; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] public ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatOffered; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] Names; - + public TranslateNameRequest() { } - + public TranslateNameRequest(string Server, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatDesired, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatOffered, string[] Names) { this.Server = Server; @@ -2554,77 +2664,94 @@ public TranslateNameRequest(string Server, ADWSProxy.ADWS.ActiveDirectoryNameFor this.Names = Names; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="TranslateNameResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "TranslateNameResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class TranslateNameResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] public ADWSProxy.ADWS.ActiveDirectoryNameTranslateResult[] NameTranslateResult; - + public TranslateNameResponse() { } - + public TranslateNameResponse(ADWSProxy.ADWS.ActiveDirectoryNameTranslateResult[] NameTranslateResult) { this.NameTranslateResult = NameTranslateResult; } } - + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public interface AccountManagementChannel : ADWSProxy.ADWS.AccountManagement, System.ServiceModel.IClientChannel { } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public partial class AccountManagementClient : System.ServiceModel.ClientBase, ADWSProxy.ADWS.AccountManagement { - + /// /// Implement this partial method to configure the service endpoint. /// /// The endpoint to configure /// The client credentials static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); - - public AccountManagementClient(EndpointConfiguration endpointConfiguration) : + + public AccountManagementClient(EndpointConfiguration endpointConfiguration) : base(AccountManagementClient.GetBindingForEndpoint(endpointConfiguration), AccountManagementClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public AccountManagementClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : + + public AccountManagementClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : base(AccountManagementClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public AccountManagementClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : + + public AccountManagementClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(AccountManagementClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public AccountManagementClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + + public AccountManagementClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } - + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ADWSProxy.ADWS.GetADGroupMemberResponse ADWSProxy.ADWS.AccountManagement.GetADGroupMember(ADWSProxy.ADWS.GetADGroupMemberRequest request) + { + return base.Channel.GetADGroupMember(request); + } + + public ADWSProxy.ADWS.ActiveDirectoryPrincipal[] GetADGroupMember(string Server, string GroupDN, string PartitionDN, bool Recursive) + { + ADWSProxy.ADWS.GetADGroupMemberRequest inValue = new ADWSProxy.ADWS.GetADGroupMemberRequest(); + inValue.Server = Server; + inValue.GroupDN = GroupDN; + inValue.PartitionDN = PartitionDN; + inValue.Recursive = Recursive; + ADWSProxy.ADWS.GetADGroupMemberResponse retVal = ((ADWSProxy.ADWS.AccountManagement)(this)).GetADGroupMember(inValue); + return retVal.Members; + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.GetADGroupMemberAsync(ADWSProxy.ADWS.GetADGroupMemberRequest request) { return base.Channel.GetADGroupMemberAsync(request); } - + public System.Threading.Tasks.Task GetADGroupMemberAsync(string Server, string GroupDN, string PartitionDN, bool Recursive) { ADWSProxy.ADWS.GetADGroupMemberRequest inValue = new ADWSProxy.ADWS.GetADGroupMemberRequest(); @@ -2634,13 +2761,31 @@ public AccountManagementClient(System.ServiceModel.Channels.Binding binding, Sys inValue.Recursive = Recursive; return ((ADWSProxy.ADWS.AccountManagement)(this)).GetADGroupMemberAsync(inValue); } - + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ADWSProxy.ADWS.GetADPrincipalGroupMembershipResponse ADWSProxy.ADWS.AccountManagement.GetADPrincipalGroupMembership(ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest request) + { + return base.Channel.GetADPrincipalGroupMembership(request); + } + + public ADWSProxy.ADWS.ActiveDirectoryGroup[] GetADPrincipalGroupMembership(string Server, string PartitionDN, string PrincipalDN, string ResourceContextPartition, string ResourceContextServer) + { + ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest inValue = new ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest(); + inValue.Server = Server; + inValue.PartitionDN = PartitionDN; + inValue.PrincipalDN = PrincipalDN; + inValue.ResourceContextPartition = ResourceContextPartition; + inValue.ResourceContextServer = ResourceContextServer; + ADWSProxy.ADWS.GetADPrincipalGroupMembershipResponse retVal = ((ADWSProxy.ADWS.AccountManagement)(this)).GetADPrincipalGroupMembership(inValue); + return retVal.MemberOf; + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.GetADPrincipalGroupMembershipAsync(ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest request) { return base.Channel.GetADPrincipalGroupMembershipAsync(request); } - + public System.Threading.Tasks.Task GetADPrincipalGroupMembershipAsync(string Server, string PartitionDN, string PrincipalDN, string ResourceContextPartition, string ResourceContextServer) { ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest inValue = new ADWSProxy.ADWS.GetADPrincipalGroupMembershipRequest(); @@ -2651,13 +2796,29 @@ public AccountManagementClient(System.ServiceModel.Channels.Binding binding, Sys inValue.ResourceContextServer = ResourceContextServer; return ((ADWSProxy.ADWS.AccountManagement)(this)).GetADPrincipalGroupMembershipAsync(inValue); } - + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ADWSProxy.ADWS.SetPasswordResponse ADWSProxy.ADWS.AccountManagement.SetPassword(ADWSProxy.ADWS.SetPasswordRequest request) + { + return base.Channel.SetPassword(request); + } + + public void SetPassword(string Server, string AccountDN, string NewPassword, string PartitionDN) + { + ADWSProxy.ADWS.SetPasswordRequest inValue = new ADWSProxy.ADWS.SetPasswordRequest(); + inValue.Server = Server; + inValue.AccountDN = AccountDN; + inValue.NewPassword = NewPassword; + inValue.PartitionDN = PartitionDN; + ADWSProxy.ADWS.SetPasswordResponse retVal = ((ADWSProxy.ADWS.AccountManagement)(this)).SetPassword(inValue); + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.SetPasswordAsync(ADWSProxy.ADWS.SetPasswordRequest request) { return base.Channel.SetPasswordAsync(request); } - + public System.Threading.Tasks.Task SetPasswordAsync(string Server, string AccountDN, string NewPassword, string PartitionDN) { ADWSProxy.ADWS.SetPasswordRequest inValue = new ADWSProxy.ADWS.SetPasswordRequest(); @@ -2667,13 +2828,30 @@ public AccountManagementClient(System.ServiceModel.Channels.Binding binding, Sys inValue.PartitionDN = PartitionDN; return ((ADWSProxy.ADWS.AccountManagement)(this)).SetPasswordAsync(inValue); } - + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ADWSProxy.ADWS.ChangePasswordResponse ADWSProxy.ADWS.AccountManagement.ChangePassword(ADWSProxy.ADWS.ChangePasswordRequest request) + { + return base.Channel.ChangePassword(request); + } + + public void ChangePassword(string Server, string AccountDN, string NewPassword, string OldPassword, string PartitionDN) + { + ADWSProxy.ADWS.ChangePasswordRequest inValue = new ADWSProxy.ADWS.ChangePasswordRequest(); + inValue.Server = Server; + inValue.AccountDN = AccountDN; + inValue.NewPassword = NewPassword; + inValue.OldPassword = OldPassword; + inValue.PartitionDN = PartitionDN; + ADWSProxy.ADWS.ChangePasswordResponse retVal = ((ADWSProxy.ADWS.AccountManagement)(this)).ChangePassword(inValue); + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.ChangePasswordAsync(ADWSProxy.ADWS.ChangePasswordRequest request) { return base.Channel.ChangePasswordAsync(request); } - + public System.Threading.Tasks.Task ChangePasswordAsync(string Server, string AccountDN, string NewPassword, string OldPassword, string PartitionDN) { ADWSProxy.ADWS.ChangePasswordRequest inValue = new ADWSProxy.ADWS.ChangePasswordRequest(); @@ -2684,13 +2862,29 @@ public AccountManagementClient(System.ServiceModel.Channels.Binding binding, Sys inValue.PartitionDN = PartitionDN; return ((ADWSProxy.ADWS.AccountManagement)(this)).ChangePasswordAsync(inValue); } - + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupResponse ADWSProxy.ADWS.AccountManagement.GetADPrincipalAuthorizationGroup(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest request) + { + return base.Channel.GetADPrincipalAuthorizationGroup(request); + } + + public ADWSProxy.ADWS.ActiveDirectoryGroup[] GetADPrincipalAuthorizationGroup(string Server, string PartitionDN, string PrincipalDN) + { + ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest inValue = new ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest(); + inValue.Server = Server; + inValue.PartitionDN = PartitionDN; + inValue.PrincipalDN = PrincipalDN; + ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupResponse retVal = ((ADWSProxy.ADWS.AccountManagement)(this)).GetADPrincipalAuthorizationGroup(inValue); + return retVal.MemberOf; + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.GetADPrincipalAuthorizationGroupAsync(ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest request) { return base.Channel.GetADPrincipalAuthorizationGroupAsync(request); } - + public System.Threading.Tasks.Task GetADPrincipalAuthorizationGroupAsync(string Server, string PartitionDN, string PrincipalDN) { ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest inValue = new ADWSProxy.ADWS.GetADPrincipalAuthorizationGroupRequest(); @@ -2699,13 +2893,30 @@ public AccountManagementClient(System.ServiceModel.Channels.Binding binding, Sys inValue.PrincipalDN = PrincipalDN; return ((ADWSProxy.ADWS.AccountManagement)(this)).GetADPrincipalAuthorizationGroupAsync(inValue); } - + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ADWSProxy.ADWS.TranslateNameResponse ADWSProxy.ADWS.AccountManagement.TranslateName(ADWSProxy.ADWS.TranslateNameRequest request) + { + return base.Channel.TranslateName(request); + } + + public ADWSProxy.ADWS.ActiveDirectoryNameTranslateResult[] TranslateName(string Server, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatDesired, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatOffered, string[] Names) + { + ADWSProxy.ADWS.TranslateNameRequest inValue = new ADWSProxy.ADWS.TranslateNameRequest(); + inValue.Server = Server; + inValue.FormatDesired = FormatDesired; + inValue.FormatOffered = FormatOffered; + inValue.Names = Names; + ADWSProxy.ADWS.TranslateNameResponse retVal = ((ADWSProxy.ADWS.AccountManagement)(this)).TranslateName(inValue); + return retVal.NameTranslateResult; + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.AccountManagement.TranslateNameAsync(ADWSProxy.ADWS.TranslateNameRequest request) { return base.Channel.TranslateNameAsync(request); } - + public System.Threading.Tasks.Task TranslateNameAsync(string Server, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatDesired, ADWSProxy.ADWS.ActiveDirectoryNameFormat FormatOffered, string[] Names) { ADWSProxy.ADWS.TranslateNameRequest inValue = new ADWSProxy.ADWS.TranslateNameRequest(); @@ -2715,19 +2926,19 @@ public AccountManagementClient(System.ServiceModel.Channels.Binding binding, Sys inValue.Names = Names; return ((ADWSProxy.ADWS.AccountManagement)(this)).TranslateNameAsync(inValue); } - + public virtual System.Threading.Tasks.Task OpenAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } - - #if !NET6_0_OR_GREATER + +#if !NET6_0_OR_GREATER public virtual System.Threading.Tasks.Task CloseAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); } - #endif - +#endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_AccountManagement)) @@ -2750,7 +2961,7 @@ private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(Endpoi } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } - + private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_AccountManagement)) @@ -2763,94 +2974,129 @@ private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointCo } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } - + public enum EndpointConfiguration { - + NetTcpBinding_AccountManagement, - + NetTcpBinding_AccountManagement1, } } - + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] - [System.ServiceModel.ServiceContractAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", ConfigurationName="ADWSProxy.ADWS.TopologyManagement")] + [System.ServiceModel.ServiceContractAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", ConfigurationName = "ADWSProxy.ADWS.TopologyManagement")] public interface TopologyManagement { - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADDomainController", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + + // CODEGEN: Generating message contract since the wrapper name (GetADDomainControllerRequest) of message GetADDomainControllerRequest does not match the default value (GetADDomainController) + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADDomainController", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADDomainControllerResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADDomainControllerFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetADDomainControllerFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + ADWSProxy.ADWS.GetADDomainControllerResponse GetADDomainController(ADWSProxy.ADWS.GetADDomainControllerRequest request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADDomainController", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + "ent/GetADDomainControllerResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADDomainControllerFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetADDomainControllerFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task GetADDomainControllerAsync(ADWSProxy.ADWS.GetADDomainControllerRequest request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADDomain", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + + // CODEGEN: Generating message contract since the wrapper name (GetADDomainRequest) of message GetADDomainRequest does not match the default value (GetADDomain) + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADDomain", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADDomainResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADDomainFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetADDomainFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + ADWSProxy.ADWS.GetADDomainResponse GetADDomain(ADWSProxy.ADWS.GetADDomainRequest request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADDomain", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + "ent/GetADDomainResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADDomainFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetADDomainFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task GetADDomainAsync(ADWSProxy.ADWS.GetADDomainRequest request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/MoveADOperationMasterRole", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + + // CODEGEN: Generating message contract since the wrapper name (MoveADOperationMasterRoleRequest) of message MoveADOperationMasterRoleRequest does not match the default value (MoveADOperationMasterRole) + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/MoveADOperationMasterRole", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/MoveADOperationMasterRoleResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.MoveADOperationMasterRoleFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "MoveADOperationMasterRoleFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + ADWSProxy.ADWS.MoveADOperationMasterRoleResponse MoveADOperationMasterRole(ADWSProxy.ADWS.MoveADOperationMasterRoleRequest request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/MoveADOperationMasterRole", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + "ent/MoveADOperationMasterRoleResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.MoveADOperationMasterRoleFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="MoveADOperationMasterRoleFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task MoveADOperationMasterRoleAsync(ADWSProxy.ADWS.MoveADOperationMasterRoleRequest request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetADForest", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + + // CODEGEN: Generating message contract since the wrapper name (GetADForestRequest) of message GetADForestRequest does not match the default value (GetADForest) + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADForest", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADForestResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADForestFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetADForestFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + ADWSProxy.ADWS.GetADForestResponse GetADForest(ADWSProxy.ADWS.GetADForestRequest request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetADForest", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + "ent/GetADForestResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetADForestFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetADForestFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task GetADForestAsync(ADWSProxy.ADWS.GetADForestRequest request); - - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/ChangeOptionalFeature", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + + // CODEGEN: Generating message contract since the wrapper name (ChangeOptionalFeatureRequest) of message ChangeOptionalFeatureRequest does not match the default value (ChangeOptionalFeature) + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/ChangeOptionalFeature", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/ChangeOptionalFeatureResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.ChangeOptionalFeatureFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "ChangeOptionalFeatureFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + ADWSProxy.ADWS.ChangeOptionalFeatureResponse ChangeOptionalFeature(ADWSProxy.ADWS.ChangeOptionalFeatureRequest request); + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/ChangeOptionalFeature", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + "ent/ChangeOptionalFeatureResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.ChangeOptionalFeatureFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="ChangeOptionalFeatureFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task ChangeOptionalFeatureAsync(ADWSProxy.ADWS.ChangeOptionalFeatureRequest request); - + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetVersion", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetVersionResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetVersionFault), Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name = "GetVersionFault")] + [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults = true)] + ADWSProxy.ADWS.GetVersionResponse GetVersion(ADWSProxy.ADWS.GetVersionRequest request); + // CODEGEN: Generating message contract since the operation has multiple return values. - [System.ServiceModel.OperationContractAttribute(Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + - "ent/GetVersion", ReplyAction="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + [System.ServiceModel.OperationContractAttribute(Action = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + + "ent/GetVersion", ReplyAction = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions/TopologyManagem" + "ent/GetVersionResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(ADWSProxy.ADWS.GetVersionFault), Action="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data/fault", Name="GetVersionFault")] - [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task GetVersionAsync(ADWSProxy.ADWS.GetVersionRequest request); } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ActiveDirectoryDomainController : ActiveDirectoryDirectoryServer { - + private string computerDNField; - + private string domainField; - + private bool enabledField; - + private string forestField; - + private bool isGlobalCatalogField; - + private bool isReadOnlyField; - + private string oSHotFixField; - + private string oSNameField; - + private string oSServicepackField; - + private string oSVersionField; - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] public string ComputerDN { get @@ -2862,9 +3108,9 @@ public string ComputerDN this.computerDNField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] public string Domain { get @@ -2876,9 +3122,9 @@ public string Domain this.domainField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=2)] + [System.Xml.Serialization.XmlElementAttribute(Order = 2)] public bool Enabled { get @@ -2890,9 +3136,9 @@ public bool Enabled this.enabledField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=3)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 3)] public string Forest { get @@ -2904,9 +3150,9 @@ public string Forest this.forestField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=4)] + [System.Xml.Serialization.XmlElementAttribute(Order = 4)] public bool IsGlobalCatalog { get @@ -2918,9 +3164,9 @@ public bool IsGlobalCatalog this.isGlobalCatalogField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=5)] + [System.Xml.Serialization.XmlElementAttribute(Order = 5)] public bool IsReadOnly { get @@ -2932,9 +3178,9 @@ public bool IsReadOnly this.isReadOnlyField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=6)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 6)] public string OSHotFix { get @@ -2946,9 +3192,9 @@ public string OSHotFix this.oSHotFixField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=7)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 7)] public string OSName { get @@ -2960,9 +3206,9 @@ public string OSName this.oSNameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=8)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 8)] public string OSServicepack { get @@ -2974,9 +3220,9 @@ public string OSServicepack this.oSServicepackField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=9)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 9)] public string OSVersion { get @@ -2989,41 +3235,41 @@ public string OSVersion } } } - + /// [System.Xml.Serialization.XmlIncludeAttribute(typeof(ActiveDirectoryDomainController))] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ActiveDirectoryDirectoryServer { - + private string defaultPartitionField; - + private string hostNameField; - + private string invocationIdField; - + private int ldapPortField; - + private string nTDSSettingsObjectDNField; - + private string nameField; - + private ActiveDirectoryOperationMasterRole[] operationMasterRoleField; - + private string[] partitionsField; - + private string serverObjectDNField; - + private string serverObjectGuidField; - + private string siteField; - + private int sslPortField; - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 0)] public string DefaultPartition { get @@ -3035,9 +3281,9 @@ public string DefaultPartition this.defaultPartitionField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=1)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 1)] public string HostName { get @@ -3049,9 +3295,9 @@ public string HostName this.hostNameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=2)] + [System.Xml.Serialization.XmlElementAttribute(Order = 2)] public string InvocationId { get @@ -3063,9 +3309,9 @@ public string InvocationId this.invocationIdField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=3)] + [System.Xml.Serialization.XmlElementAttribute(Order = 3)] public int LdapPort { get @@ -3077,9 +3323,9 @@ public int LdapPort this.ldapPortField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=4)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 4)] public string NTDSSettingsObjectDN { get @@ -3091,9 +3337,9 @@ public string NTDSSettingsObjectDN this.nTDSSettingsObjectDNField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=5)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 5)] public string Name { get @@ -3105,9 +3351,9 @@ public string Name this.nameField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=6)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 6)] public ActiveDirectoryOperationMasterRole[] OperationMasterRole { get @@ -3119,10 +3365,10 @@ public ActiveDirectoryOperationMasterRole[] OperationMasterRole this.operationMasterRoleField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=7)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 7)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] Partitions { get @@ -3134,9 +3380,9 @@ public string[] Partitions this.partitionsField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=8)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 8)] public string ServerObjectDN { get @@ -3148,9 +3394,9 @@ public string ServerObjectDN this.serverObjectDNField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=9)] + [System.Xml.Serialization.XmlElementAttribute(Order = 9)] public string ServerObjectGuid { get @@ -3162,9 +3408,9 @@ public string ServerObjectGuid this.serverObjectGuidField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=10)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 10)] public string Site { get @@ -3176,9 +3422,9 @@ public string Site this.siteField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=11)] + [System.Xml.Serialization.XmlElementAttribute(Order = 11)] public int SslPort { get @@ -3191,140 +3437,140 @@ public int SslPort } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public enum ActiveDirectoryOperationMasterRole { - + /// PDCEmulator, - + /// RIDMaster, - + /// InfrastructureMaster, - + /// SchemaMaster, - + /// DomainNamingMaster, } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetADDomainControllerRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADDomainControllerRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetADDomainControllerRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] NtdsSettingsDN; - + public GetADDomainControllerRequest() { } - + public GetADDomainControllerRequest(string Server, string[] NtdsSettingsDN) { this.Server = Server; this.NtdsSettingsDN = NtdsSettingsDN; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetADDomainControllerResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADDomainControllerResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetADDomainControllerResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true)] public ADWSProxy.ADWS.ActiveDirectoryDomainController[] DomainControllers; - + public GetADDomainControllerResponse() { } - + public GetADDomainControllerResponse(ADWSProxy.ADWS.ActiveDirectoryDomainController[] DomainControllers) { this.DomainControllers = DomainControllers; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetADDomainRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADDomainRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetADDomainRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string Server; - + public GetADDomainRequest() { } - + public GetADDomainRequest(string Server) { this.Server = Server; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetADDomainResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADDomainResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetADDomainResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public ADWSProxy.ADWS.ActiveDirectoryDomain Domain; - + public GetADDomainResponse() { } - + public GetADDomainResponse(ADWSProxy.ADWS.ActiveDirectoryDomain Domain) { this.Domain = Domain; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="MoveADOperationMasterRoleRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "MoveADOperationMasterRoleRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class MoveADOperationMasterRoleRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] public ADWSProxy.ADWS.ActiveDirectoryOperationMasterRole OperationMasterRole; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] public bool Seize; - + public MoveADOperationMasterRoleRequest() { } - + public MoveADOperationMasterRoleRequest(string Server, ADWSProxy.ADWS.ActiveDirectoryOperationMasterRole OperationMasterRole, bool Seize) { this.Server = Server; @@ -3332,61 +3578,61 @@ public MoveADOperationMasterRoleRequest(string Server, ADWSProxy.ADWS.ActiveDire this.Seize = Seize; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="MoveADOperationMasterRoleResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "MoveADOperationMasterRoleResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class MoveADOperationMasterRoleResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] public bool WasSeized; - + public MoveADOperationMasterRoleResponse() { } - + public MoveADOperationMasterRoleResponse(bool WasSeized) { this.WasSeized = WasSeized; } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] public partial class ActiveDirectoryForest { - + private string[] applicationPartitionsField; - + private string[] crossForestReferencesField; - + private string domainNamingMasterField; - + private string[] domainsField; - + private int forestModeField; - + private string[] globalCatalogsField; - + private string nameField; - + private string rootDomainField; - + private string[] sPNSuffixesField; - + private string schemaMasterField; - + private string[] sitesField; - + private string[] uPNSuffixesField; - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=0)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 0)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] ApplicationPartitions { get @@ -3398,10 +3644,10 @@ public string[] ApplicationPartitions this.applicationPartitionsField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=1)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 1)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] CrossForestReferences { get @@ -3413,9 +3659,9 @@ public string[] CrossForestReferences this.crossForestReferencesField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 2)] public string DomainNamingMaster { get @@ -3427,10 +3673,10 @@ public string DomainNamingMaster this.domainNamingMasterField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=3)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 3)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] Domains { get @@ -3442,9 +3688,9 @@ public string[] Domains this.domainsField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(Order=4)] + [System.Xml.Serialization.XmlElementAttribute(Order = 4)] public int ForestMode { get @@ -3456,10 +3702,10 @@ public int ForestMode this.forestModeField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=5)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 5)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] GlobalCatalogs { get @@ -3471,9 +3717,9 @@ public string[] GlobalCatalogs this.globalCatalogsField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=6)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 6)] public string Name { get @@ -3485,9 +3731,9 @@ public string Name this.nameField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=7)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 7)] public string RootDomain { get @@ -3499,10 +3745,10 @@ public string RootDomain this.rootDomainField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=8)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 8)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] SPNSuffixes { get @@ -3514,9 +3760,9 @@ public string[] SPNSuffixes this.sPNSuffixesField = value; } } - + /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true, Order=9)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true, Order = 9)] public string SchemaMaster { get @@ -3528,10 +3774,10 @@ public string SchemaMaster this.schemaMasterField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=10)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 10)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] Sites { get @@ -3543,10 +3789,10 @@ public string[] Sites this.sitesField = value; } } - + /// - [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true, Order=11)] - [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + [System.Xml.Serialization.XmlArrayAttribute(IsNullable = true, Order = 11)] + [System.Xml.Serialization.XmlArrayItemAttribute(Namespace = "http://schemas.microsoft.com/2003/10/Serialization/Arrays")] public string[] UPNSuffixes { get @@ -3559,74 +3805,74 @@ public string[] UPNSuffixes } } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetADForestRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADForestRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetADForestRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string Server; - + public GetADForestRequest() { } - + public GetADForestRequest(string Server) { this.Server = Server; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetADForestResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetADForestResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetADForestResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public ADWSProxy.ADWS.ActiveDirectoryForest Forest; - + public GetADForestResponse() { } - + public GetADForestResponse(ADWSProxy.ADWS.ActiveDirectoryForest Forest) { this.Forest = Forest; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="ChangeOptionalFeatureRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "ChangeOptionalFeatureRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class ChangeOptionalFeatureRequest { - - [System.ServiceModel.MessageHeaderAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageHeaderAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions")] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string Server; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string DistinguishedName; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] public bool Enable; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] public string FeatureId; - + public ChangeOptionalFeatureRequest() { } - + public ChangeOptionalFeatureRequest(string Server, string DistinguishedName, bool Enable, string FeatureId) { this.Server = Server; @@ -3635,50 +3881,50 @@ public ChangeOptionalFeatureRequest(string Server, string DistinguishedName, boo this.FeatureId = FeatureId; } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - [System.ServiceModel.MessageContractAttribute(WrapperName="ChangeOptionalFeatureResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "ChangeOptionalFeatureResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class ChangeOptionalFeatureResponse { - + public ChangeOptionalFeatureResponse() { } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetVersionRequest", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetVersionRequest", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetVersionRequest { - + public GetVersionRequest() { } } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] - [System.ServiceModel.MessageContractAttribute(WrapperName="GetVersionResponse", WrapperNamespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped=true)] + [System.ServiceModel.MessageContractAttribute(WrapperName = "GetVersionResponse", WrapperNamespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", IsWrapped = true)] public partial class GetVersionResponse { - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=0)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 0)] public int VersionMajor; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=1)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 1)] public int VersionMinor; - - [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order=2)] - [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://schemas.microsoft.com/2008/1/ActiveDirectory/CustomActions", Order = 2)] + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] public string VersionString; - + public GetVersionResponse() { } - + public GetVersionResponse(int VersionMajor, int VersionMinor, string VersionString) { this.VersionMajor = VersionMajor; @@ -3686,56 +3932,71 @@ public GetVersionResponse(int VersionMajor, int VersionMinor, string VersionStri this.VersionString = VersionString; } } - + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public interface TopologyManagementChannel : ADWSProxy.ADWS.TopologyManagement, System.ServiceModel.IClientChannel { } - + [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")] public partial class TopologyManagementClient : System.ServiceModel.ClientBase, ADWSProxy.ADWS.TopologyManagement { - + /// /// Implement this partial method to configure the service endpoint. /// /// The endpoint to configure /// The client credentials static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); - - public TopologyManagementClient(EndpointConfiguration endpointConfiguration) : + + public TopologyManagementClient(EndpointConfiguration endpointConfiguration) : base(TopologyManagementClient.GetBindingForEndpoint(endpointConfiguration), TopologyManagementClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public TopologyManagementClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : + + public TopologyManagementClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : base(TopologyManagementClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public TopologyManagementClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : + + public TopologyManagementClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(TopologyManagementClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } - - public TopologyManagementClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + + public TopologyManagementClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } - + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ADWSProxy.ADWS.GetADDomainControllerResponse ADWSProxy.ADWS.TopologyManagement.GetADDomainController(ADWSProxy.ADWS.GetADDomainControllerRequest request) + { + return base.Channel.GetADDomainController(request); + } + + public ADWSProxy.ADWS.ActiveDirectoryDomainController[] GetADDomainController(string Server, string[] NtdsSettingsDN) + { + ADWSProxy.ADWS.GetADDomainControllerRequest inValue = new ADWSProxy.ADWS.GetADDomainControllerRequest(); + inValue.Server = Server; + inValue.NtdsSettingsDN = NtdsSettingsDN; + ADWSProxy.ADWS.GetADDomainControllerResponse retVal = ((ADWSProxy.ADWS.TopologyManagement)(this)).GetADDomainController(inValue); + return retVal.DomainControllers; + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.TopologyManagement.GetADDomainControllerAsync(ADWSProxy.ADWS.GetADDomainControllerRequest request) { return base.Channel.GetADDomainControllerAsync(request); } - + public System.Threading.Tasks.Task GetADDomainControllerAsync(string Server, string[] NtdsSettingsDN) { ADWSProxy.ADWS.GetADDomainControllerRequest inValue = new ADWSProxy.ADWS.GetADDomainControllerRequest(); @@ -3743,26 +4004,56 @@ public TopologyManagementClient(System.ServiceModel.Channels.Binding binding, Sy inValue.NtdsSettingsDN = NtdsSettingsDN; return ((ADWSProxy.ADWS.TopologyManagement)(this)).GetADDomainControllerAsync(inValue); } - + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ADWSProxy.ADWS.GetADDomainResponse ADWSProxy.ADWS.TopologyManagement.GetADDomain(ADWSProxy.ADWS.GetADDomainRequest request) + { + return base.Channel.GetADDomain(request); + } + + public ADWSProxy.ADWS.ActiveDirectoryDomain GetADDomain(string Server) + { + ADWSProxy.ADWS.GetADDomainRequest inValue = new ADWSProxy.ADWS.GetADDomainRequest(); + inValue.Server = Server; + ADWSProxy.ADWS.GetADDomainResponse retVal = ((ADWSProxy.ADWS.TopologyManagement)(this)).GetADDomain(inValue); + return retVal.Domain; + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.TopologyManagement.GetADDomainAsync(ADWSProxy.ADWS.GetADDomainRequest request) { return base.Channel.GetADDomainAsync(request); } - + public System.Threading.Tasks.Task GetADDomainAsync(string Server) { ADWSProxy.ADWS.GetADDomainRequest inValue = new ADWSProxy.ADWS.GetADDomainRequest(); inValue.Server = Server; return ((ADWSProxy.ADWS.TopologyManagement)(this)).GetADDomainAsync(inValue); } - + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ADWSProxy.ADWS.MoveADOperationMasterRoleResponse ADWSProxy.ADWS.TopologyManagement.MoveADOperationMasterRole(ADWSProxy.ADWS.MoveADOperationMasterRoleRequest request) + { + return base.Channel.MoveADOperationMasterRole(request); + } + + public bool MoveADOperationMasterRole(string Server, ADWSProxy.ADWS.ActiveDirectoryOperationMasterRole OperationMasterRole, bool Seize) + { + ADWSProxy.ADWS.MoveADOperationMasterRoleRequest inValue = new ADWSProxy.ADWS.MoveADOperationMasterRoleRequest(); + inValue.Server = Server; + inValue.OperationMasterRole = OperationMasterRole; + inValue.Seize = Seize; + ADWSProxy.ADWS.MoveADOperationMasterRoleResponse retVal = ((ADWSProxy.ADWS.TopologyManagement)(this)).MoveADOperationMasterRole(inValue); + return retVal.WasSeized; + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.TopologyManagement.MoveADOperationMasterRoleAsync(ADWSProxy.ADWS.MoveADOperationMasterRoleRequest request) { return base.Channel.MoveADOperationMasterRoleAsync(request); } - + public System.Threading.Tasks.Task MoveADOperationMasterRoleAsync(string Server, ADWSProxy.ADWS.ActiveDirectoryOperationMasterRole OperationMasterRole, bool Seize) { ADWSProxy.ADWS.MoveADOperationMasterRoleRequest inValue = new ADWSProxy.ADWS.MoveADOperationMasterRoleRequest(); @@ -3771,26 +4062,56 @@ public TopologyManagementClient(System.ServiceModel.Channels.Binding binding, Sy inValue.Seize = Seize; return ((ADWSProxy.ADWS.TopologyManagement)(this)).MoveADOperationMasterRoleAsync(inValue); } - + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ADWSProxy.ADWS.GetADForestResponse ADWSProxy.ADWS.TopologyManagement.GetADForest(ADWSProxy.ADWS.GetADForestRequest request) + { + return base.Channel.GetADForest(request); + } + + public ADWSProxy.ADWS.ActiveDirectoryForest GetADForest(string Server) + { + ADWSProxy.ADWS.GetADForestRequest inValue = new ADWSProxy.ADWS.GetADForestRequest(); + inValue.Server = Server; + ADWSProxy.ADWS.GetADForestResponse retVal = ((ADWSProxy.ADWS.TopologyManagement)(this)).GetADForest(inValue); + return retVal.Forest; + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.TopologyManagement.GetADForestAsync(ADWSProxy.ADWS.GetADForestRequest request) { return base.Channel.GetADForestAsync(request); } - + public System.Threading.Tasks.Task GetADForestAsync(string Server) { ADWSProxy.ADWS.GetADForestRequest inValue = new ADWSProxy.ADWS.GetADForestRequest(); inValue.Server = Server; return ((ADWSProxy.ADWS.TopologyManagement)(this)).GetADForestAsync(inValue); } - + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ADWSProxy.ADWS.ChangeOptionalFeatureResponse ADWSProxy.ADWS.TopologyManagement.ChangeOptionalFeature(ADWSProxy.ADWS.ChangeOptionalFeatureRequest request) + { + return base.Channel.ChangeOptionalFeature(request); + } + + public void ChangeOptionalFeature(string Server, string DistinguishedName, bool Enable, string FeatureId) + { + ADWSProxy.ADWS.ChangeOptionalFeatureRequest inValue = new ADWSProxy.ADWS.ChangeOptionalFeatureRequest(); + inValue.Server = Server; + inValue.DistinguishedName = DistinguishedName; + inValue.Enable = Enable; + inValue.FeatureId = FeatureId; + ADWSProxy.ADWS.ChangeOptionalFeatureResponse retVal = ((ADWSProxy.ADWS.TopologyManagement)(this)).ChangeOptionalFeature(inValue); + } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task ADWSProxy.ADWS.TopologyManagement.ChangeOptionalFeatureAsync(ADWSProxy.ADWS.ChangeOptionalFeatureRequest request) { return base.Channel.ChangeOptionalFeatureAsync(request); } - + public System.Threading.Tasks.Task ChangeOptionalFeatureAsync(string Server, string DistinguishedName, bool Enable, string FeatureId) { ADWSProxy.ADWS.ChangeOptionalFeatureRequest inValue = new ADWSProxy.ADWS.ChangeOptionalFeatureRequest(); @@ -3800,24 +4121,39 @@ public TopologyManagementClient(System.ServiceModel.Channels.Binding binding, Sy inValue.FeatureId = FeatureId; return ((ADWSProxy.ADWS.TopologyManagement)(this)).ChangeOptionalFeatureAsync(inValue); } - + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + ADWSProxy.ADWS.GetVersionResponse ADWSProxy.ADWS.TopologyManagement.GetVersion(ADWSProxy.ADWS.GetVersionRequest request) + { + return base.Channel.GetVersion(request); + } + + public int GetVersion(out int VersionMinor, out string VersionString) + { + ADWSProxy.ADWS.GetVersionRequest inValue = new ADWSProxy.ADWS.GetVersionRequest(); + ADWSProxy.ADWS.GetVersionResponse retVal = ((ADWSProxy.ADWS.TopologyManagement)(this)).GetVersion(inValue); + VersionMinor = retVal.VersionMinor; + VersionString = retVal.VersionString; + return retVal.VersionMajor; + } + public System.Threading.Tasks.Task GetVersionAsync(ADWSProxy.ADWS.GetVersionRequest request) { return base.Channel.GetVersionAsync(request); } - + public virtual System.Threading.Tasks.Task OpenAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } - - #if !NET6_0_OR_GREATER + +#if !NET6_0_OR_GREATER public virtual System.Threading.Tasks.Task CloseAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); } - #endif - +#endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_TopologyManagement)) @@ -3840,7 +4176,7 @@ private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(Endpoi } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } - + private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_TopologyManagement)) @@ -3853,27 +4189,27 @@ private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointCo } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } - + public enum EndpointConfiguration { - + NetTcpBinding_TopologyManagement, - + NetTcpBinding_TopologyManagement1, } } - - [System.Xml.Serialization.XmlSchemaProviderAttribute(null, IsAny=true)] + + [System.Xml.Serialization.XmlSchemaProviderAttribute(null, IsAny = true)] [System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil-lib", "8.0.0.0")] public partial class ArrayOfXElement : object, System.Xml.Serialization.IXmlSerializable { - + private System.Collections.Generic.List nodesList = new System.Collections.Generic.List(); - + public ArrayOfXElement() { } - + public virtual System.Collections.Generic.List Nodes { get @@ -3881,27 +4217,27 @@ public virtual System.Collections.Generic.List Nodes return this.nodesList; } } - + public virtual System.Xml.Schema.XmlSchema GetSchema() { throw new System.NotImplementedException(); } - + public virtual void WriteXml(System.Xml.XmlWriter writer) { System.Collections.Generic.IEnumerator e = nodesList.GetEnumerator(); for ( - ; e.MoveNext(); + ; e.MoveNext(); ) { ((System.Xml.Serialization.IXmlSerializable)(e.Current)).WriteXml(writer); } } - + public virtual void ReadXml(System.Xml.XmlReader reader) { for ( - ; (reader.NodeType != System.Xml.XmlNodeType.EndElement); + ; (reader.NodeType != System.Xml.XmlNodeType.EndElement); ) { if ((reader.NodeType == System.Xml.XmlNodeType.Element)) diff --git a/ADWSProxy/ADWS/Connection.cs b/ADWSProxy/ADWS/Connection.cs index 29257fd..6d0026e 100644 --- a/ADWSProxy/ADWS/Connection.cs +++ b/ADWSProxy/ADWS/Connection.cs @@ -3,7 +3,6 @@ using Flexinets.Ldap.Core; using log4net; using System.Net; -using System.Reflection; using System.Security.Authentication.ExtendedProtection; using System.ServiceModel; using System.ServiceModel.Channels; @@ -12,13 +11,13 @@ namespace ADWSProxy.ADWS { internal class Connection { - private static readonly ILog logger = LogManager.GetLogger(type: MethodBase.GetCurrentMethod()!.DeclaringType!); + private static readonly ILog logger = LogHelper.GetLogger(typeof(Connection)); private CustomBinding? _binding = null; - private ResourceClient? _resource = null; + private Resource? _resource = null; - private SearchClient? _search = null; + private Search? _search = null; public Connection(string server, int port, string instance, AdwsEndpoint mode, NetworkCredential? credential = null) { @@ -136,66 +135,63 @@ private EndpointIdentity? Identity } } - private ResourceClient ResourceClient + private T CreateChannel(string endpointName, Binding binding, NetworkCredential? credential, AdwsEndpoint mode) where T : class { - get + logger.Debug($"Constructing new {typeof(T).FullName} via {typeof(ChannelFactory)}"); + + var endpoint = new EndpointAddress(CreateUri(endpointName), Identity, []); + var factory = new ChannelFactory(binding, endpoint); + + if (credential != null) { - if (_resource == null || _resource.State == CommunicationState.Closed) + switch (mode) { - logger.Debug($"Constructing new {typeof(ResourceClient).FullName}"); + case AdwsEndpoint.Windows: + factory.Credentials.Windows.ClientCredential = credential; + break; + case AdwsEndpoint.Username: + factory.Credentials.UserName.UserName = $"{credential.UserName}@{credential.Domain}"; + factory.Credentials.UserName.Password = credential.Password; + factory.Credentials.ServiceCertificate.Authentication.CertificateValidationMode = + System.ServiceModel.Security.X509CertificateValidationMode.None; + break; + } + } + factory.Credentials.Windows.AllowedImpersonationLevel = + System.Security.Principal.TokenImpersonationLevel.Impersonation; - var endpoint = new EndpointAddress(CreateUri("Resource"), Identity, []); + // Create the channel + var channel = factory.CreateChannel(); - _resource = new ResourceClient(Binding, endpoint); - if (Credential != null) - { - switch (Mode) - { - case AdwsEndpoint.Windows: - _resource.ClientCredentials.Windows.ClientCredential = Credential; - break; - case AdwsEndpoint.Username: - _resource.ClientCredentials.UserName.UserName = $"{Credential.UserName}@{Credential.Domain}"; - _resource.ClientCredentials.UserName.Password = Credential.Password; - _resource.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None; - break; - } - } - _resource.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; + // Explicitly open the channel + if (channel is ICommunicationObject commObj) + { + commObj.Open(); + } + + return channel; + } + private Resource ResourceClient + { + get + { + if (_resource == null || ((IClientChannel)_resource).State == CommunicationState.Faulted || ((IClientChannel)_resource).State == CommunicationState.Closed) + { + _resource = CreateChannel("Resource", Binding, Credential, Mode); } return _resource; } } - private SearchClient SearchClient + private Search SearchClient { get { - if (_search == null || _search.State == CommunicationState.Closed) + if (_search == null || ((IClientChannel)_search).State == CommunicationState.Faulted || ((IClientChannel)_search).State == CommunicationState.Closed) { - logger.Debug($"Constructing new {typeof(SearchClient).FullName}"); - - var endpoint = new EndpointAddress(CreateUri("Enumeration"), Identity, []); - - _search = new SearchClient(Binding, endpoint); - - if (Credential != null) - { - switch (Mode) - { - case AdwsEndpoint.Windows: - _search.ClientCredentials.Windows.ClientCredential = Credential; - break; - case AdwsEndpoint.Username: - _search.ClientCredentials.UserName.UserName = $"{Credential.UserName}@{Credential.Domain}"; - _search.ClientCredentials.UserName.Password = Credential.Password; - _search.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None; - break; - } - } - _search.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; + _search = CreateChannel("Enumeration", Binding, Credential, Mode); } return _search; } @@ -223,7 +219,7 @@ public List GetRootDSE() var messageBuffer = new GetRequest(Instance).CreateBufferedCopy(); messageBuffer.WriteMessageToDebug(logger); - var rootDSEResponse = ResourceClient.GetAsync(messageBuffer.CreateMessage()).Result; + var rootDSEResponse = ResourceClient.Get(messageBuffer.CreateMessage()); var rootDSEResponseBuffer = rootDSEResponse.CreateBufferedCopy(); rootDSEResponseBuffer.WriteMessageToDebug(logger); @@ -293,7 +289,7 @@ internal void Enumerate(string dn, string filter, List fields, string sc var enumerateRequest = new EnumerateRequest(Instance, filter, dn, scope, fields).CreateBufferedCopy(); enumerateRequest.WriteMessageToDebug(logger); - var enumerateResponse = SearchClient.EnumerateAsync(enumerateRequest.CreateMessage()).Result; + var enumerateResponse = SearchClient.Enumerate(enumerateRequest.CreateMessage()); var enumerateResponseBuffer = enumerateResponse.CreateBufferedCopy(); enumerateResponseBuffer.WriteMessageToDebug(logger); @@ -317,7 +313,7 @@ internal void Enumerate(string dn, string filter, List fields, string sc var renewRequestBuffer = new RenewRequest(Instance, enumerateContext!, DateTime.Now.AddMinutes(25)).CreateBufferedCopy(); renewRequestBuffer.WriteMessageToDebug(logger); - var renewResponse = SearchClient.RenewAsync(renewRequestBuffer.CreateMessage()).Result; + var renewResponse = SearchClient.Renew(renewRequestBuffer.CreateMessage()); var renewResponseBuffer = renewResponse.CreateBufferedCopy(); renewResponseBuffer.WriteMessageToDebug(logger); @@ -338,7 +334,7 @@ internal void Enumerate(string dn, string filter, List fields, string sc var pullRequest = new PullRequest(Instance, parsedResponse.EnumerateContext!).CreateBufferedCopy(); pullRequest.WriteMessageToDebug(logger); - var pullResponse = SearchClient.PullAsync(pullRequest.CreateMessage()).Result; + var pullResponse = SearchClient.Pull(pullRequest.CreateMessage()); var pullResponseBuffer = pullResponse.CreateBufferedCopy(); pullResponseBuffer.WriteMessageToDebug(logger); @@ -367,7 +363,7 @@ internal void Enumerate(string dn, string filter, List fields, string sc logger.Info($"Releasing enumerateContext: {enumerateContext}"); var releaseRequest = new ReleaseRequest(Instance, enumerateContext).CreateBufferedCopy(); releaseRequest.WriteMessageToDebug(logger); - var releaseResponse = SearchClient.ReleaseAsync(releaseRequest.CreateMessage()).Result; + var releaseResponse = SearchClient.Release(releaseRequest.CreateMessage()); var releaseResponseBuffer = releaseResponse.CreateBufferedCopy(); releaseResponseBuffer.WriteMessageToDebug(logger); if (releaseResponse.IsFault) diff --git a/ADWSProxy/ADWS/Request/ADWSException.cs b/ADWSProxy/ADWS/Request/ADWSException.cs index c1ae09e..23e3984 100644 --- a/ADWSProxy/ADWS/Request/ADWSException.cs +++ b/ADWSProxy/ADWS/Request/ADWSException.cs @@ -1,5 +1,4 @@ -using Newtonsoft.Json; -using System.ServiceModel; +using System.ServiceModel; using System.ServiceModel.Channels; using System.Xml; @@ -9,8 +8,11 @@ internal class ADWSException(MessageFault fault, FaultReason reason, FaultCode c { public MessageFault Fault { get; private set; } = fault ?? throw new ArgumentNullException(nameof(fault)); - public override string Message => $"ADWS Encountered '{ErrorType}', {JsonConvert.SerializeObject(Errors)}"; - + public override string Message => + $"ADWS Encountered '{ErrorType}'. Details: " + + (Errors != null && Errors.Count > 0 + ? string.Join("; ", Errors.Select(e => $"[{e.Key}: {e.Value}]")) + : "No detailed errors provided."); public string? ErrorType { get; private set; } = ErrorType; public Dictionary Errors { get; private set; } = Errors; diff --git a/ADWSProxy/ADWSProxy.csproj b/ADWSProxy/ADWSProxy.csproj index c4c718c..bf9c865 100644 --- a/ADWSProxy/ADWSProxy.csproj +++ b/ADWSProxy/ADWSProxy.csproj @@ -10,15 +10,14 @@ 2.0.0.0 2.0.0.0 2.0.0-beta + true - - diff --git a/ADWSProxy/CommandLineOptions.cs b/ADWSProxy/CommandLineOptions.cs index 8463c20..1f7ccb0 100644 --- a/ADWSProxy/CommandLineOptions.cs +++ b/ADWSProxy/CommandLineOptions.cs @@ -1,98 +1,122 @@ -using CommandLine; -using System.Net; +using System.Net; namespace ADWSProxy { - - internal class CommandLineOptions + public class CommandLineOptions { - private string? globalCatalog; - private string? domainController; - - [Option("adwsdcport", Required = false, Default = 9389, HelpText = "The ADWS port to proxy to on the domain controller")] - public int ADWSDCPort { get; set; } - - [Option("adwsgcport", Required = false, Default = 9389, HelpText = "The ADWS port to proxy to on the global catalog")] - public int ADWSGCPort { get; set; } + private string? _globalCatalog; + private string? _domainController; - [Option("consoleloglevel", Required = false, Default = "INFO", HelpText = "Set the log level for the console output")] - public string? ConsoleLogLevel { get; set; } - - [Option('D', "domain", Required = false, Default = null, HelpText = "The domain to authenticate to ADWS")] + // Numeric and Boolean types map automatically from the command line + public int ADWSDCPort { get; set; } = 9389; + public int ADWSGCPort { get; set; } = 9389; + public string ConsoleLogLevel { get; set; } = "INFO"; public string? Domain { get; set; } - [Option("domaincontroller", Required = true, HelpText = "The domain controller to proxy to, full FQDN")] public string? DomainController { get { - if (string.IsNullOrWhiteSpace(domainController) || !domainController.Contains('.')) + if (string.IsNullOrWhiteSpace(_domainController)) { - throw new ArgumentException($"--domaincontroller '{domainController}' must be a full FQDN."); + throw new ArgumentException($"--domaincontroller '{_domainController}' must be a full FQDN."); } - return domainController; + return _domainController; + } + set + { + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException($"--domaincontroller is required."); + } + _domainController = Uri.CheckHostName(value).Equals(UriHostNameType.Dns) + ? value + : throw new ArgumentException($"--domaincontroller '{value}' must be a FQDN."); } - set => domainController = value; } - [Option("exitondnsstarterror", Required = false, Default = false, HelpText = "Exit the application if the DNS port is already in use")] - public bool? ExitOnDNSStartError { get; set; } - - [Option("gcport", Required = false, Default = (ushort)3268, HelpText = "The GC port to proxy from")] - public ushort GCPort { get; set; } + public bool ExitOnDNSStartError { get; set; } = false; + public ushort GCPort { get; set; } = 3268; - [Option("globalcatalog", Required = false, HelpText = "The global catalog to proxy to")] public string? GlobalCatalog { get { - if (string.IsNullOrWhiteSpace(globalCatalog)) + if (string.IsNullOrWhiteSpace(_globalCatalog)) { return null; } - else if (!globalCatalog.Contains('.')) - { - throw new ArgumentException($"--globalcatalog '{globalCatalog}' must be a full FQDN unless domain is specified."); - } - else + return _globalCatalog; + } + + set + { + if (string.IsNullOrWhiteSpace(value)) { - return globalCatalog; + _globalCatalog = null; } + _globalCatalog = Uri.CheckHostName(value).Equals(UriHostNameType.Dns) + ? value + : throw new ArgumentException($"--globalcatalog '{value}' must be a FQDN."); } - set => globalCatalog = value; } - [Option("hostip", Required = false, Default = null, HelpText = "Override the IP in the DNS respones")] public string? HostIP { get; set; } - [Option("only-use-gc-backend", Required = false, Default = false, HelpText = "Force ADWS to use GC instance (ldap:3268) for backend communication.")] - public bool? OnlyUseGCBacked { get; set; } - - [Option("ldapport", Required = false, Default = (ushort)389, HelpText = "The LDAP port to proxy from")] - public ushort LDAPPort { get; set; } - - [Option("logdirectory", Required = false, Default = ".", HelpText = "The log directory to output runtime logs. Defaults to the current working directory.")] - public string? LogDirectory { get; set; } - - [Option('p', "password", Required = false, Default = null, HelpText = "The password to authenticate to ADWS")] + private string _listenIP = "0.0.0.0"; + public string ListenIP + { + get => _listenIP; + set + { + if (IPAddress.TryParse(value, out var address) && + address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) + { + _listenIP = value; + } + else + { + throw new ArgumentException($"--hostip '{value}' is not a valid IPv4 address."); + } + } + } + public bool OnlyUseGCBackend { get; set; } = false; + public ushort LDAPPort { get; set; } = 389; + public string LogDirectory { get; set; } = "."; public string? Password { get; set; } - - [Option('u', "username", Required = false, Default = null, HelpText = "The username to authenticate to ADWS")] public string? Username { get; set; } - - [Option('m', "mode", Required = false, Default = AdwsEndpoint.Windows, HelpText = "ADWS Endpoint Mode: 'Windows' (default, NTLM/Kerberos) or 'Username' (Legacy TLS).")] - public AdwsEndpoint Mode { get; set; } - - [Option("skipdns", Required = false, Default = false, HelpText = "Skip starting the DNS listener")] - public bool? SkipDns { get; set; } + public AdwsEndpoint Mode { get; set; } = AdwsEndpoint.Windows; + public bool SkipDns { get; set; } = false; public NetworkCredential? GetNetworkCredential() { if (Username == null && Password == null && Domain == null) return null; - return Username == null || Password == null || Domain == null - ? throw new ArgumentException("Username, Password and Domain all need to be used when one value is entered") + return (Username == null || Password == null || Domain == null) + ? throw new ArgumentException("Username, Password, and Domain must all be provided if any one is entered.") : new NetworkCredential(Username, Password, Domain); } + + public static void ShowHelp() + { + Console.WriteLine("ADWSProxy - Active Directory Web Services Proxy"); + Console.WriteLine("Created by Rabobank Red Team"); + Console.WriteLine("=============================================="); + Console.WriteLine("Options:"); + Console.WriteLine(" --domaincontroller (Required) The DC to proxy to."); + Console.WriteLine(" --globalcatalog The GC to proxy to."); + Console.WriteLine(" --ldapport LDAP port to listen on (Default: 389)."); + Console.WriteLine(" --gcport GC port to listen on (Default: 3268)."); + Console.WriteLine(" --adwsdcport Target ADWS DC port (Default: 9389)."); + Console.WriteLine(" --hostip The IP used for the DNS responses (Default: IPv4 local IP)."); + Console.WriteLine(" --listenip The IP to listen on for LDAP/GC requests (Default: 0.0.0.0)."); + Console.WriteLine(" --mode ADWS Endpoint Mode (Default: Windows)."); + Console.WriteLine(" --skipdns Skip starting the DNS listener."); + Console.WriteLine(" --username Username for ADWS authentication."); + Console.WriteLine(" --password Password for ADWS authentication."); + Console.WriteLine(" --domain Domain for ADWS authentication."); + Console.WriteLine(" --help Show this help message."); + Console.WriteLine(); + } } } \ No newline at end of file diff --git a/ADWSProxy/DNS/Resolver.cs b/ADWSProxy/DNS/Resolver.cs index f5c7dbc..4cee7e4 100644 --- a/ADWSProxy/DNS/Resolver.cs +++ b/ADWSProxy/DNS/Resolver.cs @@ -1,13 +1,12 @@ using ARSoft.Tools.Net; using ARSoft.Tools.Net.Dns; using System.Net; -using System.Reflection; namespace ADWSProxy.DNS { internal class Resolver { - private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod()!.DeclaringType!); + private static readonly log4net.ILog logger = LogHelper.GetLogger(typeof(Resolver)); public Resolver(ushort ldapPort, ushort gcPort, IPAddress? localIP = null) { @@ -25,8 +24,7 @@ public Resolver(ushort ldapPort, ushort gcPort, IPAddress? localIP = null) public Task OnQueryReceived(object sender, QueryReceivedEventArgs e) { - var query = e.Query as DnsMessage; - if (query == null) return Task.CompletedTask; + if (e.Query is not DnsMessage query) return Task.CompletedTask; // Create a response based on the query DnsMessage response = query.CreateResponseInstance(); diff --git a/ADWSProxy/LDAP/DataHolder.cs b/ADWSProxy/LDAP/DataHolder.cs index bfe9681..78b3f0a 100644 --- a/ADWSProxy/LDAP/DataHolder.cs +++ b/ADWSProxy/LDAP/DataHolder.cs @@ -7,5 +7,10 @@ internal class DataHolder(string name, object data, UniversalDataType? dataType) public object Data { get; } = data; public UniversalDataType DataType { get; } = dataType ?? throw new ArgumentNullException(nameof(dataType)); public string Name { get; } = name; + + public override string ToString() + { + return $"Name:{Name}, DataType:{DataType}, Data:{Data}"; + } } -} \ No newline at end of file +} diff --git a/ADWSProxy/LDAP/Helpers.cs b/ADWSProxy/LDAP/Helpers.cs index 8dc5d23..f9130c4 100644 --- a/ADWSProxy/LDAP/Helpers.cs +++ b/ADWSProxy/LDAP/Helpers.cs @@ -1,7 +1,6 @@ using Flexinets.Ldap.Core; using log4net; using System.Reflection; -using System.Runtime.InteropServices; using System.Security.Principal; using System.Text; @@ -9,7 +8,7 @@ namespace ADWSProxy.LDAP { internal static class Helpers { - private static readonly ILog logger = LogManager.GetLogger(MethodBase.GetCurrentMethod()?.DeclaringType!); + private static readonly ILog logger = LogHelper.GetLogger(typeof(Helpers)); public static string ConvertByteSidToStringSid(byte[] bytes) { @@ -20,7 +19,7 @@ public static string ConvertByteSidToStringSid(byte[] bytes) string manualSid = ParseSidManually(bytes); // 2. Perform Windows-specific validation if requested - if (logger.IsDebugEnabled && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + if (logger.IsDebugEnabled && OperatingSystem.IsWindows()) { try { diff --git a/ADWSProxy/LDAP/Listener.cs b/ADWSProxy/LDAP/Listener.cs index 716ed71..ddbb062 100644 --- a/ADWSProxy/LDAP/Listener.cs +++ b/ADWSProxy/LDAP/Listener.cs @@ -8,7 +8,7 @@ namespace ADWSProxy.LDAP { internal class Listener : IDisposable { - private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod()!.DeclaringType!); + private static readonly log4net.ILog logger = LogHelper.GetLogger(typeof(Listener)); public Listener(IPEndPoint endpoint, string domainController, int adwsPort, string instance, AdwsEndpoint mode, NetworkCredential? credential = null) { diff --git a/ADWSProxy/LogHelper.cs b/ADWSProxy/LogHelper.cs new file mode 100644 index 0000000..1b4a013 --- /dev/null +++ b/ADWSProxy/LogHelper.cs @@ -0,0 +1,15 @@ +using log4net; + +namespace ADWSProxy +{ + internal static class LogHelper + { + private static readonly string RepoName = LogManager.GetRepository(typeof(LogHelper).Assembly).Name; + + public static ILog GetLogger(Type type) + { + // This overload is AOT-safe because it doesn't call GetCallingAssembly() + return LogManager.GetLogger(RepoName, type); + } + } +} diff --git a/ADWSProxy/LoggerConfig.cs b/ADWSProxy/LoggerConfig.cs index 0f3fed2..eef7605 100644 --- a/ADWSProxy/LoggerConfig.cs +++ b/ADWSProxy/LoggerConfig.cs @@ -11,7 +11,7 @@ internal class LoggerConfig { public static void ConfigureLogger(string ConsoleFilterLevel, string LogDirectory) { - var hierarchy = (Hierarchy)LogManager.GetRepository(); + var hierarchy = (Hierarchy)LogManager.GetRepository(typeof(LoggerConfig).Assembly); // Pattern layout var patternLayout = new PatternLayout diff --git a/ADWSProxy/Program.cs b/ADWSProxy/Program.cs index 9990c5e..1dd0298 100644 --- a/ADWSProxy/Program.cs +++ b/ADWSProxy/Program.cs @@ -1,18 +1,15 @@ using ADWSProxy.DNS; using ADWSProxy.LDAP; using ARSoft.Tools.Net.Dns; -using CommandLine; -using CommandLine.Text; using log4net; -using Newtonsoft.Json; -using System.Globalization; +using Microsoft.Extensions.Configuration; using System.Net; namespace ADWSProxy { - internal class Program + public class Program { - private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod()?.DeclaringType!); + private static readonly ILog logger = LogHelper.GetLogger(typeof(Program)); // Handles IPv4 and IPv6 notation. private static IPEndPoint CreateIPEndPoint(string endPoint) @@ -34,34 +31,54 @@ private static IPEndPoint CreateIPEndPoint(string endPoint) throw new FormatException("Invalid ip-adress"); } } - if (!int.TryParse(ep[^1], NumberStyles.None, NumberFormatInfo.CurrentInfo, out int port)) + if (!int.TryParse(ep[^1], out int port)) { throw new FormatException("Invalid port"); } return new IPEndPoint(ip, port); } - private static void Main(string[] args) + public static void Main(string[] args) { - var parser = new Parser(with => with.HelpWriter = null); - var parsedArgs = parser.ParseArguments(args); + if (args.Any(a => a.Equals("--help", StringComparison.OrdinalIgnoreCase) || a.Equals("-h", StringComparison.OrdinalIgnoreCase))) + { + CommandLineOptions.ShowHelp(); + return; + } - if (parsedArgs.Tag == ParserResultType.NotParsed) + var configuration = new ConfigurationBuilder() + .AddCommandLine(args, new Dictionary{ + { "-u", "username" }, + { "-p", "password" }, + { "-D", "domain" }, + { "-m", "mode" }, + { "-dc", "domaincontroller" }, + { "-gc", "globalcatalog" } + }) + .Build(); + + var options = new CommandLineOptions(); + configuration.Bind(options); + + if (string.IsNullOrWhiteSpace(options.DomainController)) { - var helpText = HelpText.AutoBuild(parsedArgs, h => - { - h.Copyright = $"Created by Rabobank Red Team"; - h.AutoVersion = true; - return h; - }); - Console.WriteLine(helpText); - Console.WriteLine("Press enter to close"); - Console.ReadLine(); - Environment.Exit(1); + logger.Error("Error: --domaincontroller is required."); + CommandLineOptions.ShowHelp(); return; } - LoggerConfig.ConfigureLogger(parsedArgs.Value.ConsoleLogLevel!, parsedArgs.Value.LogDirectory!); + try + { + _ = options.GetNetworkCredential(); + } + catch (Exception ex) + { + logger.Error($"Error: {ex.Message}"); + CommandLineOptions.ShowHelp(); + return; + } + + LoggerConfig.ConfigureLogger(options.ConsoleLogLevel, options.LogDirectory); logger.Info("Starting ADWSproxy."); @@ -69,35 +86,33 @@ private static void Main(string[] args) Listener? LDAPListener = null; Listener? GCListener = null; - var credentials = parsedArgs.Value.GetNetworkCredential(); - try { const string gcInstance = "ldap:3268"; - string ldapInstance = parsedArgs.Value.OnlyUseGCBacked!.Value ? gcInstance : "ldap:389"; - var LDAPEndpoint = $"0.0.0.0:{parsedArgs.Value.LDAPPort}"; - var dc = parsedArgs.Value.DomainController; + string ldapInstance = options.OnlyUseGCBackend ? gcInstance : "ldap:389"; + var LDAPEndpoint = $"{options.ListenIP}:{options.LDAPPort}"; + var dc = options.DomainController; ArgumentNullException.ThrowIfNullOrWhiteSpace(dc); - LDAPListener = new Listener(CreateIPEndPoint(LDAPEndpoint), dc, parsedArgs.Value.ADWSDCPort, ldapInstance, parsedArgs.Value.Mode, credentials); + LDAPListener = new Listener(CreateIPEndPoint(LDAPEndpoint), dc, options.ADWSDCPort, ldapInstance, options.Mode, options.GetNetworkCredential()); LDAPListener.Start(); logger.Info($"Succesfully started the LDAPListener on {LDAPEndpoint} using instance {ldapInstance}"); - var gc = parsedArgs.Value.GlobalCatalog; + var gc = options.GlobalCatalog; if (string.IsNullOrWhiteSpace(gc)) { logger.Info($"No Global Catalog server defined so no Global Catalog listener has been started"); } else { - var GCEndpoint = $"0.0.0.0:{parsedArgs.Value.GCPort}"; + var GCEndpoint = $"{options.ListenIP}:{options.GCPort}"; - GCListener = new Listener(CreateIPEndPoint(GCEndpoint), gc, parsedArgs.Value.ADWSGCPort, gcInstance, parsedArgs.Value.Mode, credentials); + GCListener = new Listener(CreateIPEndPoint(GCEndpoint), gc, options.ADWSGCPort, gcInstance, options.Mode, options.GetNetworkCredential()); GCListener.Start(); logger.Info($"Succesfully started the GCListener on {GCEndpoint} using instance {gcInstance}"); } - if (parsedArgs.Value.SkipDns!.Value) + if (options.SkipDns) { logger.Info("Skipping DNS listener startup"); } @@ -105,7 +120,7 @@ private static void Main(string[] args) { try { - if (StartDNS(parsedArgs.Value.ExitOnDNSStartError ?? false, parsedArgs.Value.LDAPPort, parsedArgs.Value.GCPort, parsedArgs.Value.HostIP)) + if (StartDNS(options.ExitOnDNSStartError, options.LDAPPort, options.GCPort, options.HostIP)) { logger.Info($"Succesfully started the DNSListener"); } @@ -126,7 +141,7 @@ private static void Main(string[] args) { var rootDSE = LDAPListener.ADWSConnection.GetRootDSE(); logger.Info("Succesfully got RootDSE via LDAPListener"); - logger.Debug($"LDAP RootDSE: {JsonConvert.SerializeObject(rootDSE)}"); + logger.Debug($"LDAP RootDSE: {string.Join("; ", rootDSE.Select(d => d.ToString()))}"); } catch (Exception ex) { @@ -139,7 +154,7 @@ private static void Main(string[] args) { var rootDSE = GCListener.ADWSConnection.GetRootDSE(); logger.Info("Succesfully got RootDSE via GCListener"); - logger.Debug($"GC RootDSE: {JsonConvert.SerializeObject(rootDSE)}"); + logger.Debug($"GC RootDSE: {string.Join("; ", rootDSE.Select(d => d.ToString()))}"); } } catch (Exception ex) diff --git a/ADWSProxyCore.slnx b/ADWSProxyCore.slnx index b9f45aa..8d07981 100644 --- a/ADWSProxyCore.slnx +++ b/ADWSProxyCore.slnx @@ -1,4 +1,12 @@ - - + + + + + + + + + + diff --git a/Readme.md b/Readme.md index 3a50fa5..0db1772 100644 --- a/Readme.md +++ b/Readme.md @@ -23,10 +23,11 @@ A high-performance, cross-platform Active Directory Web Services (ADWS) proxy bu --exitondnsstarterror (Default: true) Exit if the DNS port is already in use --gcport (Default: 3268) The GC port to proxy from --globalcatalog (Default: only DC/NTDS is used) The global catalog to proxy to - --hostip (Default: system IP) Override the IP in the DNS respones + --hostip (Default: system IPv4) Override the IP in the DNS respones --ldapport (Default: 389) The LDAP port to proxy from + --listenip (Default: 0.0.0.0) The IP to listen on for LDAP/GC requests --logdirectory (Default: .) The log directory for runtime logs - -m, --mode (Default: Windows) Set the ADWS endpoint mode: Windows or Username. + -m, --mode (Default: Windows) Set the ADWS endpoint mode: Windows or Username --only-use-gc-backend (Default: false) Force ADWS to use GC instance (ldap:3268) for all backend communication --skip-dns (Default: false) Skip starting the DNS listener @@ -67,8 +68,25 @@ Older versions of Windows do support the `/UserName` endpoints so we can also us ``` ### Linux/Docker Example: + +Building the image from source: + +```bash +$ git clone https://github.com/RabobankRedTeam/ADWSProxy.git +$ cd ADWSProxy +$ docker build -f ADWSProxy/Dockerfile -t adwsproxy -q . +$ docker images +REPOSITORY TAG IMAGE ID CREATED SIZE +adwsproxy latest 3cffdc74a52f 4 minutes ago 248MB +``` + +Using the image: + ```bash -docker run -p 389:389 -p 9389:9389 adwsproxy:latest \ +$ docker run \ + -p 53:53/tcp -p 53:53/udp -p 389:389/tcp -p 3268:3268/tcp \ + --hostname DESKTOP-KGL8YVZ \ + -it adwsproxy:latest \ --mode Windows \ --username "user" \ --password "password" \ @@ -87,12 +105,13 @@ To ensure full Linux compatibility, this version of ADWSProxy bypasses the `Syst The ADWS client proxy code (`ActiveDirectoryWebService.cs`) is generated using `dotnet-svcutil`. This ensures compatibility with the .NET 8.0 `System.ServiceModel` stack. ```powershell -dotnet --fx-version 8.0.23 "C:\Users\luc\.dotnet\tools\.store\dotnet-svcutil\8.0.0\dotnet-svcutil\8.0.0\tools\net8.0\any\dotnet-svcutil.dll" \ - net.tcp://dc01.[...]:9389/ActiveDirectoryWebServices/mex \ - --namespace "*,ADWSProxy.ADWS" \ - --outputFile "ActiveDirectoryWebService.cs" \ - --serializer XmlSerializer \ - --targetFramework net8.0 +dotnet --fx-version 8.0.23 "C:\Users\luc\.dotnet\tools\.store\dotnet-svcutil\8.0.0\dotnet-svcutil\8.0.0\tools\net8.0\any\dotnet-svcutil.dll" ` + net.tcp://dc01.[...]:9389/ActiveDirectoryWebServices/mex ` + --namespace "*,ADWSProxy.ADWS" ` + --outputFile "ActiveDirectoryWebService.cs" ` + --serializer XmlSerializer ` + --targetFramework net8.0 ` + --sync ``` ### Mandatory RPC Sealing and Signing diff --git a/TestClient/Program.cs b/TestClient/Program.cs index 8e37347..03101b6 100644 --- a/TestClient/Program.cs +++ b/TestClient/Program.cs @@ -10,7 +10,7 @@ internal class Program // Helper to convert binary SID to LDAP hex filter string: \01\05\00... static string ConvertSidToHexFilter(byte[] sidBytes) { - StringBuilder sb = new StringBuilder(); + StringBuilder sb = new(); foreach (byte b in sidBytes) { sb.Append(@"\" + b.ToString("X2")); @@ -110,7 +110,7 @@ public static string ConvertSidToReadable(byte[] bytes) authority = (authority << 8) | bytes[i]; } - StringBuilder sb = new StringBuilder(); + StringBuilder sb = new(); sb.Append($"S-{revision}-{authority}"); // The rest are 4-byte sub-authorities (little-endian) @@ -130,7 +130,9 @@ static string GetNamingContext(LdapConnection connection) return response.Entries[0].Attributes["defaultNamingContext"][0].ToString()!; } +#pragma warning disable IDE0060 // Remove unused parameter static async Task Main(string[] args) +#pragma warning restore IDE0060 // Remove unused parameter { Console.WriteLine("--- ADWS Proxy Test Client ---"); Console.WriteLine("Waiting for Proxy to initialize..."); diff --git a/TestClient/TestClient.csproj b/TestClient/TestClient.csproj index 5a6f2fa..af070a8 100644 --- a/TestClient/TestClient.csproj +++ b/TestClient/TestClient.csproj @@ -1,16 +1,16 @@  - - Exe - net8.0 - enable - enable - Linux - + + Exe + net8.0 + enable + enable + Linux + - - - - + + + +