locked
Webservice returns a 400:Bad Request RRS feed

  • Question

  • I've got a win-forms app calling a some web services..

    I have one process that goes through a loop and calling serivces.  I am suddenly now finding that on one of my calls I get a HTTP:400.. but it's coming on like the 15th time through the loop.. it calls things fine and then suddenly Pffft... The only difference that is the (decimal) id value that I'm putting in to the object that I'm passing to my service...

    With the http 400 I obviously don't get into my service.. so I'm at a loss as to why ID's 1-15 work fine, but suddenly ID 16 is dieing!

     

    Any suggestions??

     

    My Code :

     

    Proxies.WAFAppFunctionService s = this.GetAppFunctionProxy();

    QuarterlyFeeForMgrResponse resp;

    QuarterlyFeeForMgrRequest req = new QuarterlyFeeForMgrRequest();

    try

    {

    req.Quarter = quarter;

    req.ID = ID;

    resp = s.GetFeesForManager(req);

    }

    catch (System.Exception ex)

    {

    throw new System.Exception("Error calling the service to retireve the fee information for Manager id " + ID ,ex);

    }

    s.Dispose();

     

     

     

    Thanks!

    Wednesday, July 18, 2007 8:02 PM

Answers

  • I have never heard of any issue with Web Services that would cause them to fail after four requests.

     

    I think you should diagnose this as though it had nothing to do with web services, but was simply some other kind of object. For instance, you are not calling the method with the same parameters, you're calling it with a different first parameter each time. Try calling it with exactly the same parameter. Try calling it with a delay between the calls. Try breaking this down into six separate little programs, each calling the service once, and see what happens. Simplify the problem: is this really all that your test program does, or is there something else going on that might be affecting the results?

     

     

    Sunday, November 18, 2007 6:11 PM
    Moderator
  • Hi,

    I change the code approach by using dataset and now the program works like charm, i think the error was raised due to the web server load or maximum thread for application was defined too low, or could be the deadlock on webservice side.

    Tuesday, November 20, 2007 2:19 AM

All replies

  • i have the same problem as yours.


    try to call webservice 10x, the first 4 went through without problem, but the 5th always give HTTP 400.

    any solution on this?
    Saturday, November 17, 2007 6:25 PM
  • Did you look in the Windows Event logs? In the IIS logs?

     

    Does it always fail after the first four? Do you call the service with the exact same parameters each time? Are you making synchronous or asynchronous calls?

     

    I suspect that the reason the original poster didn't get any answers is that he didn't supply any information, and that he doesn't appear to have done anything to diagnose the problem. He may have done so, but if he did, he didn't post that information in this forum.

     

    Saturday, November 17, 2007 9:39 PM
    Moderator
  • Yes, it always failed at the first four. I call the service with the exact same parameters each time.

     

    WS.save("1 storey");

    WS.save("2 storey");

    WS.save("3 storey");

    WS.save("4 storey");

    WS.save("5 storey");

    WS.save("6 storey");

    ...

     

    The first 4 is saved to DB without error, but the 5 and 6 gone no where.

     

    I can't see the IIS logs, it's shared hosting.

     

    Sunday, November 18, 2007 3:22 PM
  • I have never heard of any issue with Web Services that would cause them to fail after four requests.

     

    I think you should diagnose this as though it had nothing to do with web services, but was simply some other kind of object. For instance, you are not calling the method with the same parameters, you're calling it with a different first parameter each time. Try calling it with exactly the same parameter. Try calling it with a delay between the calls. Try breaking this down into six separate little programs, each calling the service once, and see what happens. Simplify the problem: is this really all that your test program does, or is there something else going on that might be affecting the results?

     

     

    Sunday, November 18, 2007 6:11 PM
    Moderator
  • Hi,

    I change the code approach by using dataset and now the program works like charm, i think the error was raised due to the web server load or maximum thread for application was defined too low, or could be the deadlock on webservice side.

    Tuesday, November 20, 2007 2:19 AM
  •  

    I'm running out of options, here, so any help would be appreciated. Every time I try to get online with IExplorer, for some reason- no mater what I do- it returns a bad request. I've restarted my computer, and it worked alight for a minute or two, but didn't let me get past my homepage, and when I hit 'back' it simply gives me the same bad request. The intenet itself works fine- I can use all my messengers, and I have Norton 360, so I couldn't imagine it would be a virus. HELP!
    Saturday, January 5, 2008 11:15 PM
  • Sorry, you've posted in the wrong place. This is a forum about creating Web Services.

     

    Saturday, January 5, 2008 11:19 PM
    Moderator