Developer forum

Forum » Development » ASP.NET Membership provider

ASP.NET Membership provider

Alec Stubbs
Reply

Does anyone know if dw can integrate with standard asp.net membership providers?
Out client currently uses the standard asp.net membership and roles provider on their website. The client would understandably prefer not replace their user management system if DW can work with it.
I’d like to integrate asp.net membership into the extranet module but wonder if anyone has experience of doing this and if so what is required.


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Alec

 

It cannot run directly on the membership provider. You can use it though, but you would have to make a 'virtual' login into Dynamicweb's extranet feature to have it work.

 

After logging in - how do you need to use the user information? Do you need to set up permissions (Groups etc.) or do you need the information for checkout flows or what is your scenario. Just so I can provide some code that will help you in the right direction.

 

BR Nicolai

 
Alec Stubbs
Reply

Hi Nicolai,

 

Thanks for your reply. The client is not using roles provided by asp.net's membership provider. They just use the membership provider to authorise access into the site then have a custom method for permissions. We'll need to authorise the users using the membership provider and set permission groups in DW by talking to the clients database.

 

Cheers,

Alec

 
Nicolai Høeg Pedersen
Reply

Hi Alec

 

Create a custom solution and in that solution create a .aspx file next to Default.aspx, i.e. Login.aspx. Change web.config so that Login.aspx is protected by forms authentication (or what you need), and make a link to Login.aspx for logging in people (You can also do this on Default.aspx if it goes for the entire website).

 

In your Login.aspx after authorisation, set these information on the session:

Dim groups As New ArrayList
groups.Add("1")
groups.Add("23")
groups.Add("123")
'Required:
HttpContext.Current.Session("DW_extranet_groups") = groups
HttpContext.Current.Session("DW_extranet_AccessUserName") = "Name of user, John Doe"
HttpContext.Current.Session("DW_extranet_AccessUserUserName") = "Username"
'Optional:
HttpContext.Current.Session("DW_extranet_AccessUserAddress") = ""
HttpContext.Current.Session("DW_extranet_AccessUserAddress2") = ""
HttpContext.Current.Session("DW_extranet_AccessUserZip") = ""
HttpContext.Current.Session("DW_extranet_AccessUserCity") = ""
HttpContext.Current.Session("DW_extranet_AccessUserState") = ""
HttpContext.Current.Session("DW_extranet_AccessUserCountry") = ""
HttpContext.Current.Session("DW_extranet_AccessUserJobTitle") = ""
HttpContext.Current.Session("DW_extranet_AccessUserCompany") = ""
HttpContext.Current.Session("DW_extranet_AccessUserPhone") = ""
HttpContext.Current.Session("DW_extranet_AccessUserPhonePriv") = ""
HttpContext.Current.Session("DW_extranet_AccessUserMobile") = ""
HttpContext.Current.Session("DW_extranet_AccessUserEmail") = ""
HttpContext.Current.Session("DW_extranet_AccessUserFax") = ""

The list of groups are ID's from AccessUser table in Dynamicweb where we have groups.

 

Hope this makes sense.

 

BR Nicolai

 

You must be logged in to post in the forum