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