Products

Solutions

Resources

Partners

Community

About

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.0Login to DNN from outside website?????Login to DNN from outside website?????
Previous
 
Next
New Post
10/22/2008 11:37 PM
 

Hi,

I have been facing this issue for almost a month now, logging through an ASP page into DotNetNuke. The DNN website will be used as an intranet and the company's user detail is stored on an external source. The database doesnt have any membership or roles feature instead the employees are based on the organization, projects and location which makes it more difficult to create a custom membership provider without membership and roles being present.

 

Been going through forums and where i came upon this post by cniknet http://forums.asp.net/p/451853/453543.aspx which answers my problem. I had studies the code and made some slight changes regarding encryption since its an intranet and not required at the current stage. The code basically reads the asp cookie and grabs the UID and replaces it with DNN UID. This works as we speak but have minor glitches which has to be sorted out.

For eg: In the forum users cant post, since nt registered where as implemented Screwturn wiki through IFRAME where cookies are utilized and users can post and their name can be displayed.

 

Imported quite a few namespaces in order to make this authentication work


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)

        Dim wwCookie As HttpCookie = Request.Cookies.Get("Cookie Name")
        Dim requestUsername = wwCookie.Values("UID")
        Dim requestPassword = wwCookie.Values("PWD")
        Response.Write("User name : " & requestUsername)
        Response.Write("Password : " & requestPassword)
   
        'Dim _portalSettings As PortalSettings = CType(HttpContext.Current.Items("PortalSettings"), PortalSettings)
        'Dim _portalSecurity As New PortalSecurity()
        'Dim requestUsername = Server.UrlDecode(Request.QueryString("UID")) + ""
        'Dim requestPassword = Server.UrlDecode(Request.QueryString("PWD")) + ""

        'If ((requestUsername <> "") And (requestPassword <> "")) Then
        '    Dim username As String = _portalSecurity.Decrypt(_portalSettings.HostSettings("EncryptionKey").ToString(), requestUsername)
        '    Dim password As String = _portalSecurity.Decrypt(_portalSettings.HostSettings("EncryptionKey").ToString(), requestPassword)
        '    Dim userId As Integer = _portalSecurity.UserLogin(requestUsername, requestPassword, _portalSettings.PortalId)
      
      
  Dim txtVerification As String = " "
        Dim IPAddress As String = " "
        Dim loginStatus As UserLoginStatus = UserLoginStatus.LOGIN_FAILURE


        'Dim objUser As UserInfo = UserController.ValidateUser(_portalSettings.PortalId, requestUsername, requestPassword, "DNN", txtVerification, "StayinFront", IPAddress, LoginStatus)


        formsAuthentication.SetAuthCookie(requestUsername, False)
        Response.Redirect("Default.aspx")

     
       
    End Sub

This is just a basic grab and utilise feature, is there a possiblitly of actually implementing a membership based on this.

 

I knw this is a bit confusing and vague, do bear with me.

 

Many thanks for your time,

 

Gerald    

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Login to DNN from outside website?????Login to DNN from outside website?????


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