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.0Login Problems with some Internet Explorer usersLogin Problems with some Internet Explorer users
Previous
 
Next
New Post
10/7/2009 9:52 AM
 

This is a cross-post from dnncreative, but I'm dying here, so I thought I'd try here as well :)

Hoping maybe someone has had a similar issue to mine.

Some of the users of my Portal are experiencing login problems when using Internet Explorer. I've seen the problem on IE 5.5 (win2k), IE 7 & 8 (XP and Vista), but on the majority of machines there is no problem. On the machines that do not work, Google's Chrome also does not work but Firefox does work fine. Any thoughts about what I could do would be very very very appreciated...


My Login structure is a bit strange tho:

My DNN Users are actually a mirror of User accounts from an external site. My auto-Login script updates (or creates) a User, their Profile and their Roles based on a QueryString value passed from the external site.

The login script runs and is successful, but when it forwards the user to the homepage, they get kicked back to the login screen.

My Login process is as follows:

  1. Check for a proper QueryString value and the presence of the User in the external database
  2. Save the pertinent user information in string variables (username, password, external site UserID, a list of RoleIDs, and one other bool value) and attempt to create a User object
    • DotNetNuke.Entities.Users.UserInfo objUserInfo = DotNetNuke.Entities.Users.UserController.GetUserByName(PortalId,strUserName);
  3. If the User object is found, the password is updated
    • bool blnUpdatePassword = DotNetNuke.Entities.Users.UserController.ChangePassword(objUserInfo, strOldPassword, strPassword);
  4. If the User object is not found, a new User is created:
    • objUserInfo = new DotNetNuke.Entities.Users.UserInfo();
    • objUserInfo.Username = strUserName;
    • objUserInfo.Membership.Password = strPassword;
    • objUserInfo.PortalID = PortalId;
    • objUserInfo.Email = reader.GetValue(reader.GetOrdinal ("Email")).ToString().Trim();
    • objUserInfo.FirstName = reader.GetValue(reader.GetOrdinal ("FirstName")).ToString().Trim();
    • objUserInfo.LastName = reader.GetValue(reader.GetOrdinal ("LastName")).ToString().Trim();
    • objUserInfo.DisplayName = reader.GetValue(reader.GetOrdinal ("FirstName")).ToString().Trim() + " " + reader.GetValue(reader.GetOrdinal ("LastName")).ToString().Trim();
    • DotNetNuke.Security.Membership.UserCreateStatus objUserCreateStatus = DotNetNuke.Entities.Users.UserController.CreateUser(ref objUserInfo);
  5. The Profile Properties for the User are then created:
    • ProfilePropertyDefinitionCollection ppdc = UserInfo.Profile.ProfileProperties.GetByCategory("MyCategory");
    • ProfilePropertyDefinitionCollection myProps = ProfileController.GetPropertyDefinitionsByCategory(PortalId,"MyCategory");
    • UserInfo.Profile.ProfileProperties.AddRange(myProps);
    • ppdc = UserInfo.Profile.ProfileProperties.GetByCategory("MyCategory");
  6. ...and values assigned:
    • for (int i = 0; i < ppdc.Count; i++) {
    • string strName = ppdc[i].PropertyName;
    • ProfilePropertyDefinition ppd2 = objUserInfo.Profile.ProfileProperties.GetByName(strName);
    • switch (strName) {
    • case "PropName":
      • ppd2.PropertyValue = myValue;
      • break;
      • etc, etc... }
    • UserInfo.Profile.SetProfileProperty(strName, ppd2.PropertyValue);
    • ProfileController.UpdateUserProfile(objUserInfo, objUserInfo.Profile.ProfileProperties); }
  7. Roles to which the User is assigned in DNN but not the external site are removed:
    • DotNetNuke.Security.Roles.RoleController rc2 = new DotNetNuke.Security.Roles.RoleController();
    • while (reader.Read()) {
    • rc2.DeleteUserRole(PortalId, UserId, Int32.Parse(reader.GetValue (0).ToString())); }
  8. Roles to which the User is assigned in the external site but not DNN are added:
    • while (reader2.Read()) {
    • DateTime dt = new DateTime();
    • rc2.AddUserRole(objUserInfo.PortalID, objUserInfo.UserID, Int32.Parse(reader2.GetValue(0).ToString()), dt); }
  9. The User is logged in:
      string strPortalName = DotNetNuke.Entities.Portals.PortalSettings.Current.PortalName.ToString();
    • DotNetNuke.Entities.Users.UserController.UserLogin (objUserInfo.PortalID, objUserInfo, strPortalName, Request.ServerVariables ["REMOTE_ADDR"].ToString(), true);
  10. The logged in user is forwarded to the site:
    • Response.Redirect("~" + strDirect);



a million thanks...

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Login Problems with some Internet Explorer usersLogin Problems with some Internet Explorer users


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