Remote Ad Source Cookies

Topics: Windows Phone 8
Jul 2, 2013 at 3:58 PM
Hi Guys,
The Remote Ad source does not support Cookies, and as a result of which I get an empty VAST response from the ad server.

Is there any way to fix this.

Thanks
Ronak
Coordinator
Jul 2, 2013 at 9:56 PM
Ronak, there are a couple options:
1) When you construct the RemoteAdSource, you can pass in a WebRequest object that you have initialized in your app instead of a Uri. You can set the Uri on the WebRequest object and also initialize it to accept & store cookies.
2) You can also create your own implemention of IRemoteAdSource and use it instead. This give you complete control over how the ad source is retrieved. Note: You can use our implementation (RemoteAdSource.cs) as a staring point if it helps.
Jul 3, 2013 at 8:09 AM
Hi Tim,

Thanks for the quick response =)

I have tried to pass a WebRequest object like so:
Created Request and CookieConatiner objects
HttpWebRequest adReq;
CookieContainer CC;
Initialized the items
CC = new CookieContainer();
adReq = (HttpWebRequest)WebRequest.Create(ad.ad_url);
adReq.CookieContainer = CC;
Added a new Ad passing into it the webRequest
adScheduler.Advertisements.Add(
                             new PrerollAdvertisement()
                             {
                                 Source = new RemoteAdSource(adReq,VastAdPayloadHandler.AdType)
                             });
And yet I am still getting empty responses from the Ad server I have used fiddler as a proxy to monitor the calls from the phone, perhaps I have missed a step somewhere ?
Extra Info:-
Device - Nokia Lumia 820
Proxy - Fiddler
Ad URL - http://pubads.g.doubleclick.net/gampad/ads?ciu_szs=1280x720&correlator=1372838100&cust_params=pos%3D01c%26d%3Dl&dt=1372838100&env=vp&gdfp_req=1&impl=s&iu=%2F5113%2Fmbcshahed%2Far_falta&output=xml_vast2&scor=1438903936483328&sz=1280x720&unviewed_position_start=1
Please help

Thanks
Ronak