none
Error RRS feed

  • Question

  • Our IT division made an application in .NET which is being deployed for a client. Afterwords they told us to integrate with their Active directory which we had done and the application was running fine. Now after two months one error came when the user put its credentials to login. The client also have developers and they say its our code problem not an issue with our server. They also say that the developers doesnt follow the basic standard while doing coding and they just completed the coding to getrid of it.

    Error Details:


    Error Details:


    Unknown Error (0X5011)


    Exception Details: System Runtime.InteropServices.COMException: unknown Error (0x5011)


    Source Error:


    Line 51: string groups = LdapAuthentication.GetUserGroups(tbLoginID.Text);
    Line 52: //Create the ticket, and add the groups.


    Source File: d:\InfoAims\Default.aspx    Line 51


    Stack Trace:


    [COMException (0x5011): Unknown error (0x5011)


    Can anyone can help me resolve this issue or let me know is it coding problem or something else. Previously the login id was only alpha but now they put numeric .


    Umair Siddiqi

    Tuesday, February 14, 2012 10:47 AM

All replies

  • Can't say what is the problem since the details are not enough. But, From outside view, it looks to be a coding issue (also you mentioned loginId was working previously and now not working after the login id has numeric values in it). May be a proper exception handling is required.


    Please mark this post as answer if it solved your problem. Happy Programming!

    Tuesday, February 14, 2012 11:00 AM
  • Can you give more information? What COM Component are you using? And you directly use a user entered text? Did you validate it?

    Maybe we can help if you provide more information. Withou this I can only say: If soemthing worked in the past and stopped working: Something should have changed. Regarding Coding Standards - It is a very important point but did you hand over the source? How did they coem to this point? But maybe they meant the design - so maybe you did some kind of Ldap Authentication that is uncommon?

    With kind regards,

    Konrad

    Tuesday, February 14, 2012 11:03 AM
  • We didnt handover the code to the client and this is the default file in which the calling of the function is explained:

    {


                string groups = LdapAuthentication.GetUserGroups(tbLoginID.Text);


                //Create the ticket, and add the groups.
                bool isCookiePersistent = false;
                FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(1,
                          tbLoginID.Text, DateTime.Now, DateTime.Now.AddMinutes(60), isCookiePersistent, groups);


                //Encrypt the ticket.
                string encryptedTicket = FormsAuthentication.Encrypt(authTicket);


                //Create a cookie, and then add the encrypted ticket to the cookie as data.
                HttpCookie authCookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket);


                if (true == isCookiePersistent)
                    authCookie.Expires = authTicket.Expiration;


                //Add the cookie to the outgoing cookies collection.
                Response.Cookies.Add(authCookie);


                //You can redirect now.
                Response.Redirect(FormsAuthentication.GetRedirectUrl(tbLoginID.Text, false));


                //UserName
                Session["UserName"] = tbLoginID.Text;
            }


    Umair Siddiqi

    Wednesday, February 15, 2012 7:23 AM
  • I also checked that the .net version at the client is 4.0 and back at the developers its 10.2.4.0 so does this can create a problem???

    Umair Siddiqi

    Wednesday, February 15, 2012 9:51 AM