vb.net - Calling Async WCF service at Application_Exit -
i have following code..
private sub application_exit(byval o object, byval e eventargs) handles me.exit if mainpage.modeofoperation = "proposalmodification" mainpage.initializeserviceendpoint(client.endpoint) messagebox.show("this test") client.flagquotationwithuserasync(mainpage.fetchquotationno, mainpage.fetchreferenceno, "f", "", "", "") end if end sub
but doesnot work think async calls not allowed @ time of application exit.
i have done following
- converting async method sync following code in wcf service :
operationcontract(asyncpattern:=false)
and calling xaml
client.sr_iservice1_beginflagquotationwithuser(fetchquotationno, id, "t", userrole, prodcode, userid, nothing, nothing)
but still function not being called @ time of application exit.
please note : main problem want @ time of application close/exit , have call wcf webservice. please have no clue now..
i'd consider change method call sync "one way".
afterthis, i'd call aplication_exit code behind method.
i think in case app still "exists" (until method execution not done).
take on simple post short example: need sample fire , forget async call wcf service
this solution may help: http://www.codeproject.com/articles/564450/callingplusintoplusyourplusdatabaseplusonplussilve
Comments
Post a Comment