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.0Psuedo "Single Sign On" from Intranet to Public PortalPsuedo "Single Sign On" from Intranet to Public Portal
Previous
 
Next
New Post
8/25/2006 12:18 AM
 
To properly create an account in DNN, at minimun you need Last, First, Email, and Username.  You could pass a unique value (but not easy to tamper with, ex. the MS SQL uniqueidentifier data type) via URL paramerter  to the custom login module.  The cutom login module will use this unique value to look up last, first, etc. from a data source (could be a table, web services, etc) to get information to setup the account. 

Fuji Nguyen
FREE Visitor Hit Counter
Visit opensource.indyneinc.com for detail.
 
New Post
8/25/2006 11:35 AM
 

I was hoping to do something like this:

Private Sub DoPost()

Dim dnnRequest As New WebClient

Dim response As Byte()

Dim loginURL As String = "https://www.sitename.com/default.aspx?ctl=login"

response = dnnRequest.DownloadData(loginURL)

Dim viewStateString As String = Me.ExtractViewState(Encoding.ASCII.GetString(response))

Dim postData As String

postData = String.Format _

("__VIEWSTATE={0}&dnn:ctr:Signin:txtUsername={1}&dnn:ctr:Signin:txtPassword={2}", _

viewStateString, usernameFromDB, passwordFromDB)

 

dnnRequest.Headers.Add("Content-Type", "application/x-www-form-urlencoded")

 

response = dnnRequest.UploadData(loginURL, "POST", Encoding.ASCII.GetBytes(postData))

'Set Cookies from response then redirect to portal....

End Sub

Private Function ExtractViewState(ByVal input As String) As String

 

Dim viewStateDelimiter As String = "__VIEWSTATE"

Dim valueDelimiter As String = "value=""/"

Dim viewStateNamePosition As Integer = input.IndexOf(viewStateDelimiter)

Dim viewStateValuePosition As Integer = input.IndexOf(valueDelimiter, viewStateNamePosition)

Dim viewStateStartPosition As Integer = viewStateValuePosition + valueDelimiter.Length

Dim viewStateEndPosition As Integer = input.IndexOf(""" /", viewStateStartPosition)

Return HttpUtility.UrlEncodeUnicode(input.Substring _

(viewStateStartPosition, viewStateEndPosition - viewStateStartPosition))

End Function

---------------------

 

Is this not possible or not a good way to go about it?

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Psuedo "Single Sign On" from Intranet to Public PortalPsuedo "Single Sign On" from Intranet to Public Portal


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