Link to home
Start Free TrialLog in
Avatar of sbornstein2
sbornstein2

asked on

C# - Calling Web Service Invoke

Hey guys,

I have an issue that is going on that is driving me pretty much to insanity :).  I have a windows forms based application that stays up running and each night at a certain form timer event it kicks off some processing then after the processing is done I call an async web method that does processing of course.    Almost 50% of the time the web service method ends up stopping and not completing all it's processing.  However, if I manually click the invoke button on the asmx page, it never stops or fails.   I changed all the timeouts to like 'infinite' I tried both sync and async etc. to no avail and I end up babysitting this app every night seeing if it ran.  

My next try was going to be to take the web service method call out of the windows forms application, place it into a console application and scheduling it.  I am trying to mimic exactly what I do when I invoke it manually which really should be what I am doing when calling the method.  Any suggestions or ideas why this would be happening?   It seems like because windows forms is maybe not a certain apartment mode like single or MTA I think it's called may be why this is happening.
Avatar of Shahan Ayyub
Shahan Ayyub
Flag of Pakistan image

Can you please check in your code that you have no break points and then update web reference in your windows application.

Also try to write some test messages in a file during the process, so that you may have a track where it takes time.
ASKER CERTIFIED SOLUTION
Avatar of Aaron Jabamani
Aaron Jabamani
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial