Danny Douglass created an excellent flickr photo gallery for Blogengine.NET. It's located here. Since GoDaddy is my host, I have to deal with medium trust issues, so Danny's gallery wouldnt work for me. Fortunately, Danny released the source for this module, so I modified it for my purposes.
After debugging a bit, I found that the security on my IIS 7 hosted site wouldn't allow me to cache downloaded flickr photos. You would think that I could just point the cache folder to one on my site with write permissions. Unfortunately, the FlickrNET provider that the gallery was built with asks for a location in the <drive>:\<folder> format (for example: c:\Inetpub\temp). I noticed that it would be possible to find out the drive/folder location of my site on my webhost, but its likely my website wouldn't be able to access the local file system, so I didn't go wandering down that road. Besides, who knows when they might change it.
To get things going, I simply disabled the the flickr caching. The first function that is called when the gallery is accessed is called GetPhotoSets(). I added Flickr.CacheDisabled = true; as the first line of module to make this happen. I rearranged some other code as well, but this was the main thing.
To use my modified version:
BlogEngineFlickrPhotos.zip (115.79 kb)
Web.Config (14.29 kb)
Related posts
Comments
8/18/2008 3:59:14 AM
I'm also use godaddy to host my page and getting the error below while using your code. any ideas how to fix this? I'm not a dotnet developer though :-( Server Error in '/' Application. -------------------------------------------------------------------------------- Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?) Line 3: using System.Collections.Generic; Line 4: using System.Configuration; Line 5: using System.Linq; Line 6: using System.Text; Line 7: using FlickrNet; Source File: d:\hosting\vp\App_Code\FlickrConnector\Gallery.cs Line: 5
vp
8/18/2008 11:25:02 AM
I tried the tweak you suggested and getting the error below. any idea how I can fix this? The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)
8/19/2008 5:36:21 AM
I have my website running on IIS 7 in integrated mode using .NET 3.5. Basically, your error is a result of not referencing .NET 3.5 libraries, linq to be specific. I have attached my web.config; you could use it as a template to modify your web.config. By doing this, your site would reference .NET 3.5 assemblies as opposed to only .NET 2.0. In the meantime, I will recompile an assembly for use in a .NET 2.0 environment. My apologies...I should have mentioned that I converted my site to .NET 3.5. Let me know if this helps!
Alex Tafoya
8/19/2008 5:39:27 AM
I should mention that you would need to be using IIS7 in integrated mode for my web.config to be of any use. Cheers!
8/19/2008 1:45:24 PM
Could you please send me the libraries for .NET 2.0 alteast. Thanks!
8/19/2008 2:33:08 PM
I can't download your web.config file either...
8/23/2008 8:46:31 AM
You should be able to download the files now. I upgraded to a new build and somehow broke the original links.
Alex
11/17/2008 7:39:53 AM
its such a good blog thanks for the view
SEO Test
11/22/2008 9:57:55 PM
I figured out how to get this working with GoDaddy running under IIS, with .NET 2.0. If anyone needs the files, please let me know.
Phil
11/27/2008 4:14:41 AM
Nice tips about Flickr Gallery Modified for GoDaddy
Busby SEO Test
12/6/2008 8:34:02 AM
These are all great tips. I am glad I can work with Flckr and Godaddy.
speed dating testimonials
1/16/2009 7:31:12 AM
This is really a good tips for flicker gallery & godaddy. Everyone should read it
busby seo test
1/16/2009 7:50:41 PM
lickr Gallery Modified for GoDaddy
4/8/2009 7:31:55 AM
Could you just send me the libraries for .NET 2.0 alteast please. Many thanks
Leadership Expert
4/9/2009 8:09:19 AM
Several people have shown interest in this. I am going to revive it. Would .NET 3.5 be okay?
4/13/2009 8:41:50 PM
Well written. Thanks for sharing this great info
seminyak villas
4/24/2009 8:54:55 AM
Flickr Gallery Modified for GoDaddy?really?great job and nice post
My Little Blog
6/4/2009 1:39:18 PM
That's great, I never thought about Flickr Gallery Modified for GoDaddy like that before.
yachtcharter griechenland
6/5/2009 10:07:59 PM
I've only just jumped onto godaddys windows hosting a week ago, so I'm sure this will come in handy once I've sorted the basics out!
Leadership Styles
6/25/2009 9:07:00 AM
Thanks for sharing this great article! That is very interesting Smile I love reading and I am always searching for informative information like this.
tukang nggame
7/2/2009 6:42:18 AM
Flickr is the best and big source for photo collection.
Halifax dentists
Add comment