How

Last post 10-18-2006, 2:54 AM by cdgregory. 2 replies.
Sort Posts: Previous Next
  •  10-17-2006, 9:07 AM 23624

    How

    Hi

    I am using the vb.net integration but cannot get it to work - the example code in the global.asax file shows ibuySpy or DNN examples but how about simple examples to use on a standard website?

    EG If I use the supplied file I get:


    BC30002: Type 'UsersDB' is not defined.

    Source Error:


    Line 58:         
    Line 59: 'EXAMPLE 1 (IbuySpy):
    Line 60: Dim udb As New UsersDB
    Line 61: Dim email As String = useruniquename


  •  10-17-2006, 9:33 AM 23627 in reply to 23624

    Re: How

    cdgregory,
     

        'Check the user is an administrator or not.
        Public Function IsAdministrator(ByVal useruniquename As String) As Boolean Implements CuteSoft.Chat.IHttpApplicationDataProvider.IsAdministrator
           
            'EXAMPLE 1 (IbuySpy):
            'Dim udb As New UsersDB
            'Dim email As String = useruniquename
            'Dim roles As String() = udb.GetRoles(email)
            'Return Array.IndexOf(roles, "Admins") <> -1
           
            'EXAMPLE 2 (DNN4):       
            'Dim user As DotNetNuke.Entities.Users.UserInfo = GetUser(useruniquename)
            'If user.IsSuperUser Then
            '       Return True
            'End If
            'Dim roles() As String = New DotNetNuke.Security.Roles.RoleController().GetRolesByUser(user.UserID, CurrentPortal().PortalId)
            'Return Array.IndexOf(roles, "Administrators") <> -1
           
            Return "NOT IMPLEMENTED"
        End Function
     
    UsersDB is a class of IbuySpy. If your application doesn't have this class, you will get an error.
     
    Every application has it's own method to detect the current user is admin or not based on her/his useruniquename.
     
    We provide the example code of IbuySpy and DotNetNuke for your reference.
     
    If you can't find this part of code in your application, please contact the developer who wrote your application.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  10-18-2006, 2:54 AM 23662 in reply to 23627

    Re: How

    Hi

    I see - it is not ready 'out of the box' for a standard asp.net website using membership.

    I have to write the global.asax functions in order to get this working..

    hmm, ok.

    Thanks

    CG

View as RSS news feed in XML