ArrayList roles = DotNetNuke.Security.Roles.DNNRoleProvider.Instance().GetRoles(0);
Any documentation on how to get this configured would be greatly appreciated. Thanks!
My web.config file looks like this.
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Foundation.Security.PortalService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
<sectionGroup name="dotnetnuke">
<section name="data" requirePermission="false" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke"/>
<section name="members" requirePermission="false" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke"/>
<section name="roles" requirePermission="false" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke"/>
</sectionGroup>
</configSections>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true"/>
</appSettings>
<dotnetnuke>
<data defaultProvider="SqlDataProvider">
<providers>
<clear/>
<add name="SqlDataProvider"
type="DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider"
connectionStringName="DNN"
upgradeConnectionString=""
providerPath="\bin\" objectQualifier="" databaseOwner="dbo"/>
</providers>
</data>
<members defaultProvider="AspNetMembershipProvider">
<providers>
<clear/>
<add name="AspNetMembershipProvider" type="DotNetNuke.Security.Membership.AspNetMembershipProvider, DotNetNuke" providerPath=""/>
</providers>
</members>
<roles defaultProvider="DNNRoleProvider">
<providers>
<clear/>
<add name="DNNRoleProvider" type="DotNetNuke.Security.Roles.DNNRoleProvider, DotNetNuke" providerPath=""/>
</providers>
</roles>
</dotnetnuke>
<connectionStrings>
<add name="DNN" connectionString="Data Source=sqlappdev;Initial Catalog=ouf;???ID=dnn;Password=???" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.5.1"/>
<httpRuntime targetFramework="4.5"/>
<membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="DNN"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="0"
requiresUniqueEmail="false"
passwordFormat="Hashed"
applicationName="DotNetNuke"
description="Stores and retrieves membership data from the local Microsoft SQL Server database"/>
</providers>
</membership>
</system.web>
<system.serviceModel>
<services>
<service name="Foundation.Security.PortalService.RoleService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="secureHttpBinding" contract="Foundation.Security.PortalService.ServiceContract.IRoleService"/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="secureHttpBinding" maxReceivedMessageSize="524288" maxBufferSize="524288">
<readerQuotas maxStringContentLength="196608"/>
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="false"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
</system.webServer>
<applicationSettings>
<Foundation.Security.PortalService.Properties.Settings>
<setting name="OUFPortalId" serializeAs="String">
<value>0</value>
</setting>
</Foundation.Security.PortalService.Properties.Settings>
</applicationSettings>
</configuration>