Just hit an issue where I was using the WCF REST Starter kit and their wrapper methods for handling HttpWebRequest and HttpWebResponse for consuming ATOM. All was fine -- until I deployed. Then I was getting a securtiy exception.  So, I ported the code to use raw HttpWebRequest and all worked. My guess is that my provider has configured something to explicitly allow for HttpWebRequest but not wrapper methods around it. Or something. Anyway, here was my old code:

        private SyndicationFeed GetFeed(string url)
        {
            using (HttpClient http = new HttpClient())
            {
                using (HttpResponseMessage resp = http.Get(url))
                {
                    resp.EnsureStatusIsSuccessful();
                    return resp.Content.ReadAsSyndicationFeed();
                }
            }
        }
 

And here's my new code:

   private SyndicationFeed GetFeed(string url)
    {
        HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
        using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
        {
            if (response == null)
                return null;
            if (response.StatusCode != HttpStatusCode.OK)
                return null;
            using (XmlReader reader = XmlReader.Create(response.GetResponseStream()))
            {
                try
                {
                    return SyndicationFeed.Load(reader);
                }
                catch (Exception)
                {
                    return null;
                }
            }
        }