Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Need Duplicate Nodes in Web.configNeed Duplicate Nodes in Web.config
Previous
 
Next
New Post
9/29/2010 5:39 PM
 

Can I have duplicate nodes in Web.config and if so, how do I reference the desired node at run-time?

For example, the DNN Web.config contains the following connection string:

  <connectionStrings>
    <add name="SiteSqlServer" connectionString="Data Source=TestServer\SQLExpress;Initial Catalog=DNNdb;providerName="System.Data.SqlClient" />
  </connectionStrings>

I want to maintain the default "Account Login" in the TopPane of my DNN webiste. But I have also developed a custom, user-defined login page that still uses Forms Authentication, without adding the "Account Login" module that ships with DNN. The reason I did this is because I want to use Forms Authentication that accesses the Active Directory on my server, and to my knowledge, you cannot do this with the built-in "Account Login" module. Plus, my boss is not interested in purchasing a 3rd-party module, like the one from DataSpring.
 
I had no problem developing the custom login page (ADLogin.aspx), but I need to modify the above connection string so that it is more like this:

  <connectionStrings>
    <add name="SiteSqlServer" connectionString="Data Source=TestServer\SQLExpress;Initial Catalog=DNNdb;providerName="System.Data.SqlClient" />
    <add name="ADConnString" connectionString="LDAP://xyz.local.com/CN=Users,DC=xyz,..." />
  </connectionStrings>

I need both connection strings. Is having 2 connection strings allowed? If so, how do I get my custom page (ADLogin.aspx) to reference ADConnString at run-time? In addition, the DNN Web.config has:

    <membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15">
      <providers>
        <clear />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SiteSqlServer" ... />
      </providers>
    </membership>

I believe that the above provider is used by the built-in "Account Login" module when authenticating users and passwords (among other DNN tasks). I need a membership that points to MyADProv provider without changing the defaultProvider that is already specified by DNN. I need something like:

    <membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15">
      <providers>
        <clear />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SiteSqlServer" ... />
        <add name="MyADProv" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, connectionStringName="ADConnString" />
      </providers>
    </membership>

Note the 2nd provider (MyADProv) above and it, in turn, points to my 2nd connection string (ADConnString) above. I don't think what I want to do is possible, but if it is, I have not been able to get this to work.

Thanks

 
New Post
9/30/2010 5:34 AM
 
it should be possible to use multiple providers / connection strings with different names, though I remember issues reported in DNN 5.4/.5.5.0

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Need Duplicate Nodes in Web.configNeed Duplicate Nodes in Web.config


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out