locked
Script timing out... call to function AuthenticateUser RRS feed

  • Question

  • I am working on some custom code to do an authentication call to an active directory repository. This code is in validate.inc (placed in internalsite/inc/customupdate). The call is to the function "AuthenticateUser" and it seems to be timing out.

    Here's the call:
    set varAuthenticateRepositoryUser = AuthenticateUser("<repoName>",sUser,sPassword,"<domain>",Empty,g_site_name,g_secure)

    * <> indicate removed identifying information

    I have debug enabled and can see in the logs that the code gets right up to this call and doesn't proceed any further.

    In the browser, I can hit the IAG, enter my credentials, then submit them. After the browser churns for a minute or two, I get an ASP error 0113 (script timed out).

    Has anyone ever seen this before or have any idea as to why this would be timing out? Before I started this code, the trunk was configured with a repository that was straight active directory and that worked just fine.

    Thanks!

    Tuesday, August 4, 2009 3:17 PM

Answers

  • The code you quoted seems pretty straight forward. I'd suggest you add some debug trace using something like:
    LIGHT_TRACE "Custom User Auth with " & "<repoName>" & " " & sUser & " " & sPassword & " " & "<domain>" & " " & Empty & " " & g_site_name & " " & g_secure)

    Add it before you launch the function, and then inspect the trace to make sure the vars make sense. Other than that, I guess we'll have to learn a little more about your customization...



    Ben Ari
    Microsoft CSS IAG Support
    Sammamish, WA
    • Marked as answer by Erez Benari Tuesday, August 4, 2009 5:26 PM
    Tuesday, August 4, 2009 5:26 PM

All replies

  • The code you quoted seems pretty straight forward. I'd suggest you add some debug trace using something like:
    LIGHT_TRACE "Custom User Auth with " & "<repoName>" & " " & sUser & " " & sPassword & " " & "<domain>" & " " & Empty & " " & g_site_name & " " & g_secure)

    Add it before you launch the function, and then inspect the trace to make sure the vars make sense. Other than that, I guess we'll have to learn a little more about your customization...



    Ben Ari
    Microsoft CSS IAG Support
    Sammamish, WA
    • Marked as answer by Erez Benari Tuesday, August 4, 2009 5:26 PM
    Tuesday, August 4, 2009 5:26 PM
  • Hi Bryan--

    I don't what your trying to do but could you try breaking down your function first? 

    Example::

    'Set your variable first
    dim varAuthenticateRepositoryUser

    'Your function starts here
    Function AuthenticateUser(var1,var2,var3,var4,var5,var6,var7)
    'do whatever here
    End function

    'Assign your variable here using the functions logic ... dont use a set here
    varAuthenticateRepositoryUser = AuthenticateUser("<repoName>",sUser,sPassword,"<domain>",Empty,g_site_name,g_secure


    Thank you.
    Dennis

    Wednesday, August 5, 2009 7:02 AM
  • Hi Bryan,

    I find it a bit weird that the name of the file you created in InternalSite/inc/CustomUpdate is "validate.inc".
    While such a "hook" script could be created and indeed invoked by the default validate.inc found in /InternalSite/inc, this hook is normally used for other manipulations, before the actual authentication.
    In your case I believe that what you want to do, which is to implement your own customized version of "AuthenticateUser", is to create a file named with the same of your repository (e.g. MyRepo.inc) and place it in /InternalSite/inc/CustomUpdate

    Take a look at this article: http://technet.microsoft.com/en-us/library/dd278163.aspx and also note that you have a sample that you can use: /InternalSite/samples/Repository.inc

    HTH,
    -Ran


    Wednesday, August 5, 2009 9:35 AM