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

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...How to configure DotNetDuke.dll for my application?How to configure DotNetDuke.dll for my application?
Previous
 
Next
New Post
2/5/2014 1:31 PM
 

I am very new to DNN.  I'm trying to create a WCF service that will create roles/user for our new DNN portal.  I've found the DotNetNuke.dll, but I'm not sure how to configure my WCF project to utilize this interface.  I've fumbled through the DNN website's web.config file, but I must be missing something, b/c I'm getting a "object not set to an instance..." error when trying to call this method.

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>




 

 

 
New Post
2/5/2014 6:03 PM
 
it's a little old, but is suspect the blog series at http://www.dnnsoftware.com/community-... will have the answers you want

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
2/7/2014 8:50 AM
 
Thank you for your quick reply. This article explains how to add a WCF to the exiting DNN website. I'd prefer to create a WCF service that resides outside of the core, DNN web site. My biggest hurdle is configuring the web.config file of my WCF service that will allow me to reference/use the DotNetNuke.dll. My fallback plan is to just call the Stored Procedures in the DNN SQL database, but I'd much prefer to reference the dll, so I don't miss any business logic that may be encapsulated in the DNN dll.
 
New Post
2/7/2014 8:53 AM
 
Thank you for the quick reply. The article explains on how to add a WCF service to the existing DNN site, but I'd like to create a separate WCF project. My biggest hurdle is getting my web.config file configured correctly, so I can reference/use the DotNetNuke.dll. My fallback plan is to call the DNN stored procedures directly, but I'm afraid that I may bypass any business logic that may be encapsulated within the DNN assembly.
 
New Post
2/7/2014 3:00 PM
 
if you're just using DNN API methods you don't need to configure the web.config - you simply add a reference to it in your WCF class library project (you'll likely need to add some system.web references as well)-This is exactly the same as creating a module with a class library project

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...How to configure DotNetDuke.dll for my application?How to configure DotNetDuke.dll for my application?


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