Add contact... NOTHING HAPPENS

Last post 05-12-2010, 10:28 PM by Kenneth. 4 replies.
Sort Posts: Previous Next
  •  05-10-2010, 6:48 AM 60856

    Add contact... NOTHING HAPPENS

    Hi
     
    I just installed the cutemessenger and didnt have any problems with it. It shows up fine on my dnn site as well
     
    However, i cannot add any contacts?! As expected i get a user not found if i type something bogus in the name. But if i type in a real name registered on my site nothing happens... No error, no contact NOTHING.
     
    I have just installed the trial and im not on the internet as im on a closed environment
     
    Any tips?
  •  05-10-2010, 4:17 PM 60881 in reply to 60856

    Re: Add contact... NOTHING HAPPENS

    I tested this issue in DNN04.09.04 , I can add contact person. My steps are as follows,
     
    1. Register one new user called "test1","test3"
    2. Login to DNN as user "admin" , then open cute messenger, and add "test1" and "test3" as contact person
    3. Login to DNN as user "test1", and add "test3" as contact person.
     
    What's your DNN version? You can send your site url and detailed reproduce steps to eric@cutesoft.net, I will test it.
     
    Regards,
    Eric
     
     
  •  05-11-2010, 3:29 AM 60896 in reply to 60881

    Re: Add contact... NOTHING HAPPENS

    im running on dnn04.09.04 as well
     
    I did exactly what you said, NO LUCK
     
    my dnnusers are synched via ActiveDirectory. Im just saying but I assume this doesnt matter as cuteMessenger validates vs dnn users?
     
    I tried a complete reinstall... Same thing. It does not work. I cannot provide you with an URL. I said i have no internet connection as im on a closed environment
     
    normal chat seems to work fine. The only thing missing is the add contact (pretty vital for messenger ;-))
  •  05-11-2010, 5:29 AM 60903 in reply to 60896

    Re: Add contact... NOTHING HAPPENS

    Do you have a script or something that could add all my dnn users to the database meaning that all users have all contacts out of the box
  •  05-12-2010, 10:28 PM 60975 in reply to 60903

    Re: Add contact... NOTHING HAPPENS

    genvej:
    Do you have a script or something that could add all my dnn users to the database meaning that all users have all contacts out of the box
     
    Hi genvej,
     
    Create a new file name 'DNNChatProvider.vb' use the below cdoe. It will make all users add each other as friends.
     
    Replace "DNN4.09\App_Code\DNNChatProvider.vb".
     
    1. Imports System.IO   
    2. Imports System.Security   
    3. Imports System.Security.Principal   
    4. Imports System.Threading   
    5. Imports System.Web   
    6. Imports System.Web.Security   
    7.   
    8. Imports DotNetNuke.Common.Utilities   
    9. Imports DotNetNuke.Entities.Portals   
    10. Imports DotNetNuke.Security.Roles   
    11. Imports DotNetNuke.Services.Exceptions   
    12. Imports DotNetNuke.Services.Log.EventLog   
    13. Imports DotNetNuke.Services.Scheduling   
    14. Imports DotNetNuke.Services.Upgrade   
    15.   
    16. Imports Microsoft.VisualBasic   
    17.   
    18. Public Class DNNChatProvider   
    19.   
    20.     Inherits CuteChat.ChatProvider   
    21.   
    22.     Protected Function CurrentPortal() As DotNetNuke.Entities.Portals.PortalSettings   
    23.   
    24.         Dim ps As DotNetNuke.Entities.Portals.PortalSettings   
    25.   
    26.         ps = PortalController.GetCurrentPortalSettings()   
    27.   
    28.         If ps Is Nothing Then  
    29.   
    30.             Throw (New Exception("PortalSettings Not Ready"))   
    31.   
    32.         End If  
    33.   
    34.         Return ps   
    35.   
    36.     End Function  
    37.   
    38.     Public Function GetLogonUser() As DotNetNuke.Entities.Users.UserInfo   
    39.   
    40.         If Not HttpContext.Current.Request.IsAuthenticated Then  
    41.   
    42.             Return Nothing  
    43.   
    44.         End If  
    45.   
    46.         Dim username As String = HttpContext.Current.User.Identity.Name   
    47.   
    48.         Return DotNetNuke.Entities.Users.UserController.GetUserByName(CurrentPortal().PortalId, username)   
    49.   
    50.     End Function  
    51.   
    52.     Public Overrides Function GetConnectionString() As String  
    53.   
    54.         Return System.Configuration.ConfigurationManager.ConnectionStrings("SiteSqlServer").ConnectionString   
    55.   
    56.     End Function  
    57.   
    58.     Public Overrides Function GetLogonIdentity() As CuteChat.AppChatIdentity   
    59.   
    60.         Dim user As DotNetNuke.Entities.Users.UserInfo = GetLogonUser()   
    61.   
    62.         If user Is Nothing Then  
    63.   
    64.             Return Nothing  
    65.   
    66.         End If  
    67.   
    68.         Return New CuteChat.AppChatIdentity(user.Username, False, ToUserId(user.Username), HttpContext.Current.Request.UserHostAddress)   
    69.   
    70.     End Function  
    71.   
    72.     Public Overrides Function GetUserInfo(ByVal loginName As StringByRef nickName As StringByRef isAdmin As BooleanAs Boolean  
    73.   
    74.         Try  
    75.   
    76.             Dim user As DotNetNuke.Entities.Users.UserInfo = DotNetNuke.Entities.Users.UserController.GetUserByName(CurrentPortal().PortalId, loginName)   
    77.   
    78.             If user Is Nothing Then  
    79.   
    80.                 Return False  
    81.   
    82.             End If  
    83.   
    84.             nickName = user.Username   
    85.   
    86.             isAdmin = user.IsInRole("Administrators"Or (user.Username = "admin")   
    87.   
    88.             Return True  
    89.   
    90.         Catch ex As Exception   
    91.   
    92.             Return False  
    93.   
    94.         End Try  
    95.   
    96.     End Function  
    97.   
    98.     Public Overrides Function FindUserLoginName(ByVal nickName As StringAs String  
    99.   
    100.         Try  
    101.   
    102.             Dim totalRecords As Integer  
    103.   
    104.             For Each user As DotNetNuke.Entities.Users.UserInfo In DotNetNuke.Entities.Users.UserController.GetUsersByUserName(CurrentPortal().PortalId, nickName, 0, 100, totalRecords)   
    105.   
    106.                 If String.Equals(user.Username, nickName, StringComparison.OrdinalIgnoreCase) Then  
    107.   
    108.                     Return user.Username   
    109.   
    110.                 End If  
    111.   
    112.             Next  
    113.   
    114.             Return Nothing  
    115.   
    116.         Catch ex As Exception   
    117.   
    118.             Return Nothing  
    119.   
    120.         End Try  
    121.   
    122.     End Function  
    123.   
    124.     Public Overrides Function ValidateUser(ByVal loginName As StringByVal password As StringAs Boolean  
    125.   
    126.         If System.Web.Security.Membership.ValidateUser(loginName, password) Then  
    127.   
    128.             System.Web.Security.FormsAuthentication.SetAuthCookie(loginName, False)   
    129.   
    130.             Return True  
    131.   
    132.         End If  
    133.   
    134.     End Function  
    135.   
    136.     Public Class MyDataManager   
    137.   
    138.         Inherits CuteChat.AppDataManager   
    139.   
    140.         Public Sub New(ByVal portal As CuteChat.AppPortal)   
    141.   
    142.             MyBase.New(portal)   
    143.   
    144.         End Sub  
    145.   
    146.         Public Overrides Sub AddContact(ByVal identity As CuteChat.ChatIdentity, ByVal userid As String)   
    147.   
    148.         End Sub  
    149.   
    150.         Public Overrides Sub RemoveContact(ByVal identity As CuteChat.ChatIdentity, ByVal userid As String)   
    151.   
    152.         End Sub  
    153.   
    154.         Public Overrides Function GetContacts(ByVal identity As CuteChat.ChatIdentity) As CuteChat.IChatUserInfo()   
    155.   
    156.             Dim portalid As Integer = 0   
    157.   
    158.             Dim list As ArrayList = DotNetNuke.Entities.Users.UserController.GetUsers(portalid)   
    159.   
    160.             Dim res As New ArrayList   
    161.   
    162.             Dim provider As CuteChat.ChatProvider = CuteChat.ChatProvider.Instance   
    163.   
    164.             Dim myname As String = provider.FromUserId(identity.UniqueId)   
    165.   
    166.             For Each info As DotNetNuke.Entities.Users.UserInfo In list   
    167.   
    168.                 If Not String.Equals(info.Username, myname, StringComparison.OrdinalIgnoreCase) Then  
    169.   
    170.                     res.Add(Me.GetUserInfo(provider.ToUserId(info.Username)))   
    171.   
    172.                 End If  
    173.   
    174.             Next  
    175.   
    176.             Return res.ToArray(GetType(CuteChat.IChatUserInfo))   
    177.   
    178.         End Function  
    179.   
    180.     End Class  
    181.   
    182.   
    183.   
    184.     Public Overrides Function CreateDataManagerInstance(ByVal portal As CuteChat.AppPortal) As CuteChat.AppDataManager   
    185.   
    186.         Return New MyDataManager(portal)   
    187.   
    188.     End Function  
    189.   
    190. End Class  
     
     
    Regards,
     
    ken
View as RSS news feed in XML