Web Service timed out - InfoPath Dev
in

InfoPath Dev

Web Service timed out

Last post 11-08-2006 06:37 AM by dgibson5531. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 11-09-2005 11:47 PM

    Web Service timed out

    I have a web service which enumerates an Active Directory group with around 90 members. When hosted on my development machine, the web service takes around 4-5 seconds to return.

    Unfortunately when the web service is hosted on the development virtual server it takes considerably longer and causes the following error:

    "InfoPath cannot run the specified query.
    InfoPath either cannot connect to the data source or the service has timed out."

    Does anyone know of some way in which to increase the timeout that InfoPath uses for web services?

    Thanks,
    David.
  • 11-10-2005 12:17 AM In reply to

    Hi David

    if you are using managed code, just set the timeout property of your web reference class to a higher value.

    hth
    //AndersR


  • 11-10-2005 12:38 AM In reply to

    Hi Anders,

    Thanks for the suggestion. Unfortunately I've tried setting the Timeout property and the request still times out after around 30 seconds, even though I do the following:

    // 'GetGroupMembers' web service...
    adapterWeb = (WebServiceAdapterObject)thisXDocument.DataAdapters["GetGroupMembers"];
    // Set the timeout to be longer for this service...
    adapterWeb.Timeout = 60;

    Have I missed something?
  • 11-10-2005 03:37 AM In reply to

    I am going through a similar issue with webservice in a production environment. Setting the timeout has not seemed to fixed the issue. You are not alone.
    Jason
    http://www.k2distillery.com/
  • 11-10-2005 05:44 AM In reply to

    I have the same problem, but i dont think so that the problem is on infopath, because i test the same webservice AD from another .net app and still take a long time to respond me.
    My solution:
    change the way to use this webservice on infopath to retrieve only user o group that login on my infopath form and not all users or groups.

    Fred Darwin Villareal
  • 11-10-2005 12:42 PM In reply to

    Is it a custom web service?

    If so set the maxRequestLength in the web.config of the server running the web service.

    I did both those two things, but the one that did the trick was setting the timeout in InfoPath. The time my WS needs to run is pretty extreme, since the attachments passed can be up to 10 mb! After setting up the timeout of the web service in IP, the problem was solved.

    //AndersR


  • 11-10-2005 07:31 PM In reply to

    Fred, I agree, the timeout issue I get has nothing to do with InfoPath. But I just have not been able to resolve yet. I am interested in your solution but would like a little more info. Are you saying you noticed there were issues associated to Active Directory when accessing your webservices? I am using windows integrated authentication for access to these webservices that are timing out.
    Jason
    http://www.k2distillery.com/
  • 02-20-2006 10:29 AM In reply to

    vt_asparagus,
    u can give fast acceleration to your active directory search
    (i am query about 1000 people in my domain in just 4 seconds)
    using the following code:

    System.DirectoryServices.DirectoryEntry entry =
    new DirectoryEntry("LDAP://PATH ");
    System.DirectoryServices.DirectorySearcher mySearcher =
    new DirectorySearcher(entry);
    mySearcher.Filter = ("(anr=Patrick Halsted)");
    System.DirectoryServices.SearchResultCollection results = mySearcher.FindAll();
    Console.WriteLine("El numero de resultados es: " + results.Count.ToString());
    foreach(System.DirectoryServices.SearchResult result in results)
    {
    foreach(string propiedad in
    result.Properties.PropertyNames)
    {

    foreach( object myCollection in
    result.Properties[propiedad])
    {
    Console.Write(myCollection + "\n");
    }

    }
    }

    The problem with your web service is that you're probably using the GetDirectoryEntry() Method. This is very slow Because you're requerying the active directory for each result.

    Need more help Send me an e-mail, I have a web service and I'll be happy to give you the code ...

    Happy codding



    Fred Darwin Villareal
  • 11-08-2006 06:37 AM In reply to

    How do you increase the "InfoPath" timeout ?
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.