ews-javascript-api icon indicating copy to clipboard operation
ews-javascript-api copied to clipboard

using StreamingSubscriptionConnection, onDisconnect called,but args is null

Open wustwg opened this issue 5 years ago • 5 comments
trafficstars

[onDisconnect args {"Subscription":null,"Exception":null}] whait's wrong??? How can I solve this problem??? When I using outlook email test ,it's ok.The problem occured only when I using my test exchange server.

wustwg avatar May 27 '20 12:05 wustwg

I guss that it's a problem about exchange config, but I don't know how to config . thanks!

wustwg avatar May 27 '20 12:05 wustwg

see https://docs.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.subscriptionerroreventargs?view=exchange-ews-api

you can have both of them null which could be due to some other issue.

gautamsi avatar May 27 '20 13:05 gautamsi

see https://docs.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.subscriptionerroreventargs?view=exchange-ews-api

you can have both of them null which could be due to some other issue.

thank you for your reply, but what should I do when it occured? Close connection and unsubscribe the old subscriptionId, then resubscribe and open connection later?

wustwg avatar May 29 '20 01:05 wustwg

Yes, after disconnect you can try reconnecting. You can also enable debug log to see xml being received and post back here if there was error but you received null.

gautamsi avatar May 29 '20 04:05 gautamsi

thanks! Now I usually create a new connection directly after the disconnect is triggered. Because I found that there are some inexplicable problems when I call open directly in ondisconnect, such as the subscription ID is empty or the connection object has been disposed

wustwg avatar Jun 01 '20 09:06 wustwg