This project has moved and is read-only. For the latest updates, please go here.

That assembly does not allow partially trusted callers

Topics: Developer Forum
Jul 12, 2010 at 2:49 AM
Edited Jul 12, 2010 at 2:54 AM

I am attempting to use this within a site hosted within the Rackspace Cloud. However, I'm receiving the following error:

System.Security.SecurityException: That assembly does not allow partially trusted callers.

I did attempt the following code and did not receive an error:

HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create("");

Some more information about the Rackspace Modified Medium Trust environment is available at

Is there anything that I can do to get this running? I have to have this site done ASAP and I'll be pretty boned if I have to figure out a different way to access Flickr. The API works great!

Jul 12, 2010 at 3:44 AM

I was able to figure this out and wanted to post it in case any other Rackspace cloud users stumble in.

First, the download link contains two DLLs. Be sure to use the "FlickrNet.dll" for your web application.

Also, you will probably have to change the Flickr Cache location. You can do this within the Web.config by using the following code

<flickrNet cacheLocation="path"></flickrNet>

This should point to a directory you have permission to write to. This also appears to be an absolute path (C:\directory), so if you can't figure out that path within a cluster or cloud, simply build a test page with the following:

Response.Write( Server.MapPath("~/directory/") );

Just put that in place of your "path" in the web.config and you should be ready to go!

Jul 12, 2010 at 10:58 AM
The other DLL is for Compact Framework projects only. Glad you got this sorted.