Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Subscription to push notification successful but not receiving any push notifications

$
0
0

I have written a simple EWS client using EWS Managed API. It was working fine till last week and I am able to subscribe to the push notifications (for new mail event on one of the email ids) and was able to receive push subscription too. After receiving notification my code was able to fetch the mail and do the rest processing.

However now I am finding some weird behavior. I am able to subscribe to the push notification but not receiving push notification on any new mail event.

subscription = service.SubscribeToPushNotifications(folders, new Uri(listenUri), 1, "", events);

Above call to SubscribeToPushNotifications() returns subscription object. Also if I enable traces, I get following traces for push subscription request and response:

<Trace Tag="EwsRequestHttpHeaders" Tid="11" Time="2014-01-01 14:22:25Z"> POST /EWS/Exchange.asmx HTTP/1.1 Content-Type: text/xml; charset=utf-8 Accept: text/xml User-Agent: ExchangeServicesClient/15.00.0516.014 Accept-Encoding: gzip,deflate</Trace><Trace Tag="EwsRequest" Tid="11" Time="2014-01-01 14:22:25Z" Version="15.00.0516.014"><?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><t:RequestServerVersion Version="Exchange2007_SP1" /><t:TimeZoneContext><t:TimeZoneDefinition Id="India Standard Time" /></t:TimeZoneContext></soap:Header><soap:Body><m:Subscribe><m:PushSubscriptionRequest><t:FolderIds><t:DistinguishedFolderId Id="inbox" /></t:FolderIds><t:EventTypes><t:EventType>NewMailEvent</t:EventType></t:EventTypes><t:StatusFrequency>1</t:StatusFrequency><t:URL>http://machine.domain.com:49809/EwsListener/</t:URL></m:PushSubscriptionRequest></m:Subscribe></soap:Body></soap:Envelope></Trace><Trace Tag="EwsResponseHttpHeaders" Tid="11" Time="2014-01-01 14:22:31Z"> HTTP/1.1 200 OK Content-Encoding: gzip Vary: Accept-Encoding Persistent-Auth: false Content-Length: 602 Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Date: Wed, 01 Jan 2014 14:22:31 GMT Server: Microsoft-IIS/7.5 WWW-Authenticate: Negotiate oYGgMIGdoAMKAQChCwYJKoZIgvcSAQICooGIBIGFYIGCBgkqhkiG9xIBAgICAG9zMHGgAwIBBaEDAgEPomUwY6ADAgEXolwEWqEyBA+k49zjZTsC9/D/pHfyErSWJ42j1fdYSHFAIbOEJYcaN8dxJBqHFG5UbQ30zGZF51Y5FKNmslGWGNoPqBdBJ3KP3ebNirnqHbmprghBE6scm6Job/nEzQ== X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET</Trace>

<Trace Tag="EwsResponse" Tid="11" Time="2014-01-01 14:22:31Z" Version="15.00.0516.014"><?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><t:ServerVersionInfo MajorVersion="8" MinorVersion="3" MajorBuildNumber="83" MinorBuildNumber="4" Version="Exchange2007_SP1" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" /></soap:Header><soap:Body><m:SubscribeResponse xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"><m:ResponseMessages><m:SubscribeResponseMessage ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode><m:SubscriptionId>GgBjZGNkZXZlbWNleGNuZy50YXRhZGV2LmNvbRAAAAC6E+AIuBdLTbZUhzI8iQC9</m:SubscriptionId><m:Watermark>AQAAALAln1WeWtJAkpDzH4QvIq7IcAIAAAAAAAE=</m:Watermark></m:SubscribeResponseMessage></m:ResponseMessages></m:SubscribeResponse></soap:Body></soap:Envelope></Trace>

I did coded to make HttpListener listen on http://machine.domain.com:49809/EwsListener/ . When I hit this link in browser I could see listener callback breakpoint hitting in Visual Studio. That means this listener is up and listening properly. But when I open up Outlook and send the mail to the user for whom I made push subscription using EWS Managed API, I could see that mail coming back in outlook's Inbox folder, but listener callback does not get hit in Visual Studio. It means somehow exchange is notifying that push subscription is successful but it is not notifying to my EWS client on new mail event. This was not the case earlier, I was very well able to get notifications from exchange server and listener callback breakpoint was hitting in Visual Studio as desired (continuing to the rest of the processing). I tried subscribing to new mail events on other email addresses too, but it is not working also, while it was working earlier.

I am unaware of if there have been any server side configuration changes that are restricting notifications being pushed to my EWS client. Also I am less experienced in Exchange Server side administration. Will like any help to fix this and enable push notifications on my exchange server.




Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>