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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Retrieve LOGON_USER with an Expression BuilderRetrieve LOGON_USER with an Expression Builder
Previous
 
Next
New Post
9/11/2007 10:11 AM
 

I have a requirement to retrieve DOMAIN\UserName credentials here on my intranet for several web applications written in Cold Fusion. Needless to say getting this variable has proven cumbersome until recently. My question is, does DNN have something in the core already that provides the following functionality?  It's an awesome addition to my arsenal. I'm not the author or creator of this functionality so please review the source here.

My stored procedure's Select statement in my custom module requires my LOGON credentials to query an external database. I created an ExpressionBuilder.vb file and placed it in the App_Code directory.

Imports System.Web.Compilation
Imports System.CodeDom
<ExpressionPrefix("Code")> _
Public Class CodeExpressionBuilder
Inherits ExpressionBuilder
Public Overloads Overrides Function GetCodeExpression(ByVal entry As BoundPropertyEntry, ByVal parsedData As Object, ByVal context As ExpressionBuilderContext) As CodeExpression
Return New CodeSnippetExpression(entry.Expression)
End
Function
End
Class

 Finally, my SelectParameter for the Stored Procedure looks like this.

 

<asp:Parameter Name="UserName" Type="String" DefaultValue='<%$ Code:Page.User.Identity.Name %>' />

If DNN has something similar I would rather use the core to accomplish this task. If anyone has any insight on a better solution for retrieving this information for an Intranet environment please share. For now this is what I have.

Jon

 
New Post
9/14/2007 2:22 PM
 

Did you already consider using the ActiveDirectory Authentificationprovider? If you enable this, the dotnetnuke username is simply domain\user.

 
New Post
9/15/2007 6:18 PM
 

Yes I did. Until the Authentication Provider gets seperated from the core and works flawlessly in child sites it's not an option. Unfortunately, this is all tied to external databases with web sites having anonymous turned off.

DNN's maturity for Intranets is evolving, albeit too slowly. Unfortunately, with many large organizational consolidation efforts (particularly DoD) and DNN's competition from Sharepoint my ability to continue leveraging DNN in my environment is becoming more difficult to sell.

 
New Post
9/15/2007 7:22 PM
 

PaskettJ wrote

Yes I did. Until the Authentication Provider gets seperated from the core ...

did you look at the changes to authentification of the upcoming DNN4.6.0 release? 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Retrieve LOGON_USER with an Expression BuilderRetrieve LOGON_USER with an Expression Builder


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