This project is read-only.

Remote Ad Source Cookies

Topics: Windows Phone 8
Jul 2, 2013 at 4: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.

Jul 2, 2013 at 10: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 9: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
                             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 -
Please help