none
ADOwaVirtualDirectory class initialization issue RRS feed

  • Question

  • Hi,
    I want to use logonpagepublicprivateselectionenabled property of class ADOwaVirtualDirectory in my C# project.  I have manually enabled, i.e. set it to true, the property through Exchange Manager console, Now I want to check its value in my C# project, but I am still getting its value as false. I suspect initialization is the issue for that, Please suggest me how to initialize it properly?

    Thanks

    -Sumit

    Wednesday, July 5, 2017 10:52 AM

All replies

  • Hi sumithansa,

    For your question, based on my search, I get the code from VB. I convert it to C#, you could try the following code. 

     public bool? LogonPagePublicPrivateSelectionEnabled { get; set; }
            
            static void Main(string[] args)
            {
                ADOwaVirtualDirectory instance = new ADOwaVirtualDirectory();
                bool value;
                value = instance.LogonPagePublicPrivateSelectionEnabled;
                instance.LogonPagePublicPrivateSelectionEnabled = value;
            }

    Here is the samples of VB for your reference.

    https://technet.microsoft.com/pt-br/subscriptions/microsoft.exchange.data.directory.systemconfiguration.adowavirtualdirectory.logonpagepublicprivateselectionenabled

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 6, 2017 11:23 AM
    Moderator
  • Hi Wendy,

    Thanks for the reply,

    I tried the same way, but still I am getting value of logonpagepublicprivateselectionenabled property as 'false', even though it is set to 'true' on Exchange Management console. 

    I suspect the initialization part is the key for the problem. 

    Friday, July 7, 2017 3:58 AM
  • Hi sumithansa,

    Thank you for feedback.

    In the MSDN article, it shows the ADOwaVirtualDirectory class has the

    LogonPagePublicPrivateSelectionEnabled property.

    When I add reference of Microsoft.Exchange.Data.Directory.dll, there is no LogonPagePublicPrivateSelectionEnabled property in the code.

    Maybe you could post a new thread in Exchange Server Development forum.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, July 7, 2017 6:55 AM
    Moderator
  • Hi Wendy,

    Thanks for the reply,

    I have raised new ticket @ Exchange server Development forum..

    I will close this thread once the other raised thread is closed.

    Thanks

    -Sumit

    Wednesday, July 12, 2017 5:35 AM
  • Hi sumithansa,

    If you have something else about CLR, please feel free to contact us. We will try our best to help to.

    If you have solution, welcome to share with us.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, July 12, 2017 6:18 AM
    Moderator
  • Hi Wendy,

    Just cross-checked When I add reference of Microsoft.Exchange.Data.Directory.dll, there is LogonPagePublicPrivateSelectionEnabled property present in the code.

            [System.Management.Automation.ParameterAttribute]
            public bool? ForceWebReadyDocumentViewingFirstOnPublicComputers { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public bool? GlobalAddressListEnabled { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public string InstantMessagingCertificateThumbprint { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public bool? InstantMessagingEnabled { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public string InstantMessagingServerName { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public InstantMessagingTypeOptions? InstantMessagingType { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public bool? IntegratedFeaturesEnabled { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public bool? IRMEnabled { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public bool? JournalEnabled { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public bool? JunkEmailEnabled { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public LegacyRedirectTypeOptions? LegacyRedirectType { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public int LogonAndErrorLanguage { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public LogonFormats LogonFormat { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public bool? LogonPageLightSelectionEnabled { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public bool? LogonPagePublicPrivateSelectionEnabled { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public bool? NotesEnabled { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public int? NotificationInterval { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public bool? OrganizationEnabled { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public OutboundCharsetOptions? OutboundCharset { get; set; }
            [System.Management.Automation.ParameterAttribute]
            public bool? OWALightEnabled { get; set; }
            public OwaVersions OwaVersion { get; }


    But still not resolved

    Wednesday, July 12, 2017 9:56 AM
  • Hi sumithansa,

    I am deploy win10 and install ExchangeServer. If I have something new, I will post back.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, July 18, 2017 9:14 AM
    Moderator
  • Hi sumithansa,

    When I install it on Win10, there is something wrong for me. I have install the Exchange Server 2016 on Win 8.1.

    On my test, I could set the property to ture.

     ADOwaVirtualDirectory instance = new ADOwaVirtualDirectory();
    
                instance.LogonPagePublicPrivateSelectionEnabled = true;
                bool? value;
                value = instance.LogonPagePublicPrivateSelectionEnabled;

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, July 19, 2017 6:47 AM
    Moderator
  • Hi Wendy,

    We might be able to set the property but my issue is with getting the value of the property.

    Thanks

    -Sumit

    Monday, July 24, 2017 9:09 AM
  • Hi sumithansa,

    I am not good at the exchange server. And on the MSDN article about the property, there is no more details. Could you provide more information about when the property get the value "true"? I will do the test.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 27, 2017 9:49 AM
    Moderator