Flickr.GroupsPoolsGetPhotos() gives System.Net.WebPermission error

Topics: Developer Forum, User Forum
Apr 8, 2011 at 11:20 AM

I was using an older version of the dll and it was working fine, but I wasn't able to get the description of the image. So, I downloaded the latest version and now when I have the following line:

PhotoCollection photos = flickr.GroupsPoolsGetPhotos(FlickrGroupID, 1, 1);

I get the WebPermission error.

Anyone else had something similar?

My full code is as follows:

Flickr.CacheDisabled = true;               
Flickr flickr = new Flickr(FlickrKey,FlickrSecret);
PhotoCollection photos = flickr.GroupsPoolsGetPhotos(FlickrGroupID, 1, 1);
               
foreach (Photo photo in photos)
{
        ltlPhotoTitle.Text = photo.Title;
        ltlPhotoDescription.Text = photo.Description;
        ltlPhotoUploadDate.Text = string.Format("{0:d MMMM yyyy at h:mm tt}", photo.DateTaken);
}

Apr 8, 2011 at 2:25 PM

This is a fix that worked for me: http://dbvt.com/blog/post/AspNetHostingPermission-Security-Exception-Fix-with-Ajax-in-IIS7.aspx

Coordinator
Apr 9, 2011 at 8:01 AM

Glad you got it working. 

Sam