Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Nguyen Dung Tri 106 posts 605 karma points
    Oct 04, 2016 @ 10:16
    Nguyen Dung Tri

    How to create a connection string which points to Azure Active Directory in Web.Config?

    Hello Dan Lister,

    I have use your "Active Directory Providers" on my project. When I go to the line of "create connection string which points to Azure Active Directory", I don't know how to create a connection string myself.

    Here are the information I got from Azure Active Directory:

    ClientId: a92a056f-????-????-????-3a86545656e2
    My account to log into
    Pass: xxxxxxxxx

    What should I put in connectionUsername, connectionPassword, and connectionstring?


        <add name="MyMembershipConnectionString" connectionString="LDAP://,OU=somedomain,DC=somedomain,DC=onmicrosoft,DC=com" />

    <add name="MyMembersMembershipProvider" 
               type="RB.ActiveDirectoryProviders.ActiveDirectoryUmbracoMembersMembershipProvider, RB.ActiveDirectoryProviders" 
               defaultMemberType="MemberType" />

    When I run my website, it generate an error: Parser Error Message: Unable to establish secure connection with the server

    So that my sample connection string is not correct. Do you have any suggestion?

    Regards, Dung Tri

  • cronywalls 2 posts 72 karma points
    Mar 15, 2019 @ 06:10

    You can encrypt the connectionstring section of a web.config file by using aspnetregiis.exe command line tool, so it is never stored as plain text. This file is located in the %systemroot%\Microsoft.NET\Framework\versionNumber folder and you can use with -pef option. Consider you have an application named as MyWebApp. You can encrypt the connectionStrings section of the Web.config file by using aspnetregiis.exe as follows :

    aspnet_regiis.exe -pef "connectionStrings" "/MyWebApp"
Please Sign in or register to post replies

Write your reply to: