Tales from the Evil Empire

Bertrand Le Roy's blog

News


Bertrand Le Roy

BoudinFatal's Gamercard

Tales from the Evil Empire - Blogged

Blogs I read

My other stuff

Archives

A simple ASP.NET photo album

In June, Dmitry posted a very simple photo album on his blog. I immediately liked it because it's both easy to set-up (just drop the ashx file into your web site's photo directory) and to manage (no need to upload images one by one using a clumsy web upload field, just upload new photos using ftp or the file system). It's also nice to browse. Sure, there are no fancy ratings or comments features, you can't add titles or descriptions, but frankly, I didn't need all these features.

Still, I wanted to change a few things so I went ahead and added the following to Dmitry's handler:

  • XHTML output
  • CSS styling
  • EXIF meta-data reading and displaying
  • Sorting by date shot
  • Stacked photos folder icons (uses default.jpg if it exists)
  • Folder names respect casing and special characters
  • In-handler pseudo-config (just modify the handler's configuration block with any text editor)
  • Thumbnail caching on disk or in memory
The thumbnail caching on disk is an essential improvement because if you have a large number of heavy pictures, memory won't be the right place to cache. If the handler is configured to save on disk (which is the default), the thumbnails are stored in the application's temporary folder, the very same place where pages are compiled. This means that you don't need to set writing permissions, but it also means that you need to run in high or full trust. If you can't do that, you should configure the handler to cache in memory or not at all.

Photo album folders
Viewing folders

Photo Album List View
Viewing thumbnails

Photo Album Details View
Viewing details

The handler is under a shared source licence, which means that you can do pretty much what you want with it. It uses the Metadata public domain library by Drew Noakes and adapted for .NET by Renaud Ferret to extract the EXIF information from the jpeg files. This library can be downloaded from http://renaud91.free.fr/MetaDataExtractor. Please use the dll from the workspace below, though, as I've made a small correction. I've also sent the correction to Renaud, but he may not publish a new version immediately...

Download the code for the handler here:
http://www.codeplex.com/PhotoHandler

Special thanks should go to Dmitry Robsman and David Ebbo.

UPDATE: the handler is now hosted on Codeplex.

Comments

Martin Dolphin said:

Hi

Tried this and it's very nice indeed - thanks for your efforts. Is the version on gotdotnet the same as your demo pics? When I tried it the output doesn't look as neat and the pictures all appear in a single column.
# September 9, 2005 3:54 AM

Mischa Kroon said:

Wow looks very nice... I will definately be testing this out for a image gallery part of a personal website :)
# September 9, 2005 4:23 AM

Bertrand Le Roy said:

You're absolutely right, the CSS that's included in release 1.1 is an old version. You can now download the right CSS file from release 1.1.1 or from source control.
Please tell me how that works for you.
# September 9, 2005 1:27 PM

Mischa Kroon said:

Stupid question but how do I get this to work.

Just putting it in the right directory didn't do much for me.
# September 12, 2005 2:51 AM

Bertrand Le Roy said:

Mischa, what happens when you browse to the handler?
# September 12, 2005 1:35 PM

Rio said:

Can u tell me how implement this.
I mean that how to create simple album application.
Pls
# June 27, 2006 4:11 AM

Bertrand Le Roy said:

Rio, why don't you start by downloading the source code and studying it?
# June 27, 2006 4:19 AM

Infinity said:

possible to support bmp, gif and png also ?
# September 20, 2006 3:01 AM

Bertrand Le Roy said:

Infinity: it's shared source, so feel free to implement that, but I won't in the near future, jpeg being the dominant format for photos. Sorry.

# September 20, 2006 7:53 PM

Tom said:

This is a great software.

But I can only run it on Windows 2000 Server. I've tried two different Windows 2003 servers. With no luck.

Does anybody know how to get this running on Windows 2003 Server?

# December 31, 2006 4:52 AM

Bertrand Le Roy said:

Tom, I'm running it at home on Windows 2003 Server without a problem. What exactly is the problem you're seeing? Are you sure you have ASP.NET 2.0 installed? Is ASP.NET activated in IIS?

# December 31, 2006 3:15 PM

Lloyd said:

I dropped the files in an image directory, and I'm getting the following error: "The type or namespace name 'com' could not be found" on the com.drew.metadata namespaces.

# January 2, 2007 2:03 AM

Bertrand Le Roy said:

For the moment, you also need to copy the dll to the bin folder. I'm working on a new version that removes that requirement.

# January 2, 2007 2:08 AM

Lloyd said:

Thanks for the quick response.  To clarify, I moved MetaDataExtractor.dll to my site's root bin directory, and that solved the problem.  Looks like a great tool.

# January 2, 2007 2:15 AM

Jared said:

Looks good, but the link to download isn't working.  This is a long shot, but would you want to code in a user management system so only certain users could access certain folders?

# January 24, 2007 6:26 PM

Bertrand Le Roy said:

Jared: I just tried the link and it's working for me. Maybe the site was down when you tried. I don't think there's a need for a specific user management system: the built-in membership system of ASP.NET should work fine with it.

# January 24, 2007 10:31 PM

Jared said:

Looks like the link was down when I last tried, thanks.  I've been playing around with it a bit (mainly to get it to play with a different source directory, a networked drive) and noticed it has trouble with hidden/corrupted .jpg files (these are being created by Mac users somehow).  Also, is there any way to add in non-jpeg files (gif, tif, png, etc.)?  It seems it is limited to what the MetaDataExtractor can read.

# January 29, 2007 2:32 PM

Bertrand Le Roy said:

Jared: I think you'd have to fix those jpgs before you use them with the handler. Both corrupt jpg and non-jpg file handling are features I don't plan on adding for the moment as I have little time and more important features to implement but feel free to modify the code any way you want and implement those.

# January 29, 2007 2:55 PM

Vincent said:

Bertrand: i downloaded the albumhandler.zip (2.0 and 2.1) and extract the files into the image folder... when i run it, i got the following message:  

Parser Error Message: Type 'AlbumHandler' does not inherit from 'System.Web.UI.UserControl'.

Source Error:

Line 2:  <%@ Register Src="~/album.ashx" TagPrefix="photo" TagName="album" %>

Do you have any idea what causes the problem?

# February 13, 2007 11:32 PM

Bertrand Le Roy said:

You probably don't have ASP.NET 2.0 installed, or it's not active on that application.

# February 14, 2007 1:29 PM

Mike said:

Hey it's really great!!

Is it possible to scan only a certain folder? Because right now it scans everything in my website ehhe

# April 12, 2007 3:38 PM

Bertrand Le Roy said:

Mike: just put the handler in the folder you want to scan.

# April 12, 2007 3:51 PM

Neeraj said:

I am not able to use this code please help

# April 16, 2007 1:46 AM

Bertrand Le Roy said:

Neeraj: you're going to have to give more details. First check that the web site you're trying to use it on has ASP.NET 2.0.

# April 16, 2007 12:27 PM

Daniel said:

I can get the album to work great if I put it in the root of my site, but if I put it in one directory then it loads all the links, but no thumbnails....

Any ideas?

Thanks in advance!

# May 2, 2007 5:37 PM

Bertrand Le Roy said:

Daniel, please file a bug on GotDotNet.

# May 3, 2007 1:32 AM

Daniel Booth said:

Daniel, I had the same trouble getting the album to work on a directory other than root as well, but I was able to figure out what was causing the problem. Though it has been a few weeks I believe you can solve it by specifying the HandlerUrl on the control. I am pretty sure that is what I found. I don't know that it is really a bug, but it should be noted in the instructions at least. The best structure I've found is to have a Subfolder as the root of your photoalbum. Put the ashx & the display page (aspx) in this folder, and create subfolders under that for each of your "albums".
# May 16, 2007 2:13 PM

Vincent said:

Hey, this is a great control! I have a question though: I have a subdirectory 'photos', it contains the ashx and aspx files as well as the directories containing the photos I'd like to display on my site. On my localhost everything works perfectly, but after I uploaded everything to my webspace (after compiling of course) I can see only the links, no thumbnails or pictures (only those little red crosses). When I try to visit a permanent link to one of the albums I get a Server Error ("invalid path - not in the handler scope"). Any ideas on how to fix this? Thanks in advance!
# May 24, 2007 10:03 AM

Vincent said:

Found the solution: the disk caching was the problem (I didn't have writing rights).
# May 24, 2007 10:40 AM

Bertrand Le Roy said:

Calios: thanks for the suggestion, that's a really good point.

# June 8, 2007 9:31 PM

Calios said:

Found a little bug/annoyance - im posting it here since gotdotnet will phase out in a few days(19th of June 2k7). in CreateFolderImage you didnt fill in the BackGround - thus using any other background than black will look wierd :-O I added this to fix it: g.FillRectangle(new SolidBrush(BackGround), 0, 0, size, size); Right after the stacked Graphcis has been declared (was line 477 of the .ashx file for me - v 2.1 of the handler) :-)
# June 8, 2007 9:33 PM

Bertrand Le Roy said:

Calios: thanks for the fix.

# June 8, 2007 9:41 PM

Judge said:

How about using this in Windows Home Server? Possible? How To? etc. Pretty Please? LOL Thanks.
# June 9, 2007 4:14 PM

Bertrand Le Roy said:

Judge: I've thought the exact same thing ever since I learned about Home Server. Unfortunately, I don't own one so I can't try it. However, from what I know I don't see what could prevent it from working. If anyone wants to try, I'd love to know how it goes...

# June 10, 2007 2:48 AM

Bertrand Le Roy said:

Thanks Mike! This rocks!

# June 11, 2007 2:19 AM

Haywire said:

This thing is outstanding. I love it. Now, having said that, I am having one small issue. I have a folder called Pictures where the web files reside. I have dirs 2002, 2003, 2004, and in those dirs 01, 02, 03. I can get into the year folder to see my months folder, but when I click on the link for the month folder nothing happens. What is the level of folders this can handle. Root + 1? Root + inf?
# June 12, 2007 8:40 PM

Bertrand Le Roy said:

There shouldn't be a limit on the folder depth. Can you package a repro into a small zip file and send it to me at bleroy at microsoft dot com?

# June 12, 2007 9:09 PM

Russ said:

Bertrand, Kudos to you and all who contributed to this fine tool! Very easy to use and gives a great aesthetic look for a simple Photo Album. I do have a one question. I cant seem to get the stacked photos folder icon to work. I was hoping you could clarify "Stacked photos folder icons (uses default.jpg if it exists)".
# June 16, 2007 11:43 PM

Bertrand Le Roy said:

Russ: how exactly does it not work? What I meant was that if you have a photo named default.jpg, the handler will use it as the top of the stack. Other photos will be randomly selected. If you don't have a default.jpg, it takes a random photo for the top of the stack. Does that help?

# June 18, 2007 12:24 AM

Bertrand Le Roy said:

Russ: can you look for the UpFolderStackHeight setting in the handler and check that it's not set to 1?

# June 18, 2007 4:21 PM

Russ said:

UpFolderStackHeight  = 3

# June 18, 2007 8:42 PM

Bertrand Le Roy said:

Russ: then I have no idea, sorry. Never seen that happen.

# June 19, 2007 12:37 AM

Bas Bakker said:

Your photohandler works great in Internet Explorer.

In Firefox, however, it shows the pictures (and directories) all in one column.

Any idea how to fix this?

Thanks!

Bas

# July 7, 2007 11:10 PM

Bertrand Le Roy said:

Bas: did you make any changes to the style sheet? I just checked and it displays fine in Firefox, Opera, Safari and IE.

# July 9, 2007 1:03 PM

Bertrand Le Roy said:

Sona: not sure I'm following you, it seems to work fine on your site.

# July 25, 2007 12:43 AM

Bertrand Le Roy said:

John: you forgot to drop the meta data extractor dll into the applicaiton's bin folder.

# July 29, 2007 7:25 PM

Axeman said:

Ok first and foremost thank you for this awesome app!

Now I've been trying to get this to work but to no avail. The issue I'm having is that it is scanning all my folders. I only need it to scan one specific folder and all subfolders under it. When I move the .ashx file and page to the folder that I want to show (meaning the main folder or first folder that should display) all I get are X's for all the images. Any ideas?

Also, for those interested in changing the background color and aren't necessarily using a "named" color they can substitute the

Color BackGround = Color.Black

for

Color BackGround = ColorTranslator.FromHtml("#XXXXXX")

Where the X's stand for the Hex code of the color.

Any help for my issue described above would be great!!!

# July 31, 2007 8:55 PM

Bertrand Le Roy said:

Axeman: you can try to see what the response was using Firebug or Fiddler for those images. I'd guess a trust level mismatch with your configuration. We can also continue this conversation offline (bleroy at microsoft dot com)

# August 1, 2007 2:12 AM

Beau said:

Great app!!!

Is there a way to pass a different stylesheet to the handler, or have it use a different background.  I have the app within a container on my home page and I would like to have it use a differnet background.  It keeps using the background image of the main page and I can't figure out how to change it.

thanks

# August 8, 2007 5:06 PM

John G. said:

Ok I got everything to run fine on my local machine.  When I publish to my site hosted by Godaddy.com I get a problem with the following code.  Apparantly they are not giving me rights to the temporary asp.net folder this is using.  Thanks in advance for your assistance.

Static IMagehelper()

{

..

..

_imageCacheDir = Path.Combine(HttpRuntime.CodegenDir, "Album");

                   Directory.CreateDirectory(_imageCacheDir);

This  is the error:

Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

# August 9, 2007 10:48 PM

Bertrand Le Roy said:

Beau: the stylesheet is inside the handler. It's very easy to change.

Manoj: the license is MS-PL. See www.codeplex.com/.../License.aspx

John: there's a setting in the handler for the cache location. Disk only works if you have a high enough trust level. Memory and none works everywhere.

# August 10, 2007 1:44 AM

John G. said:

ok I found it and changed it to memory and all is well.

Thank you

# August 10, 2007 8:48 PM

Bertrand Le Roy said:

Robert: that's weird. Are you sure you included the same version of the dll that came with the release file? Just unzipping the release in a web app should works out of the box. Does it or did you do something different from that?

# August 22, 2007 2:53 PM

Robert Macnair said:

D'Oh i was being an idiot...

I went to the link, clicked on the 'Source' tab and downloaded that. it only came with a samples folder etc and was wondering was was going on.

I must be needing sleep!

Thanks for the help Betrand

# August 22, 2007 6:58 PM

Phil Fostini said:

Just a quick question. I have 70 pictures in the share folder but only 22 show up on the web page. Am I missing something? I am using Windows Home Server RC1. My page is the above URL. I also posed this question on Andrew Grant's site.

I like how easy it is to use.

# September 27, 2007 11:52 PM

Bertrand Le Roy said:

Are all 70 photos .jpg files?

# September 28, 2007 2:14 AM

Phil Fostini said:

Actually 18 are jpeg and the balance is bitmap. Is that where I have gone wrong? The bitmaps are 1,800 - 2000 KB and the jpegs are 130 - 200 kb.

# September 28, 2007 9:37 AM

Bertrand Le Roy said:

Phil: yes, the handler only takes jpg files.

# September 28, 2007 12:03 PM

Phil Fostini said:

Thanks, I converted all to Jpeg and they all show up now

# September 29, 2007 11:06 AM

M Anderson said:

A little more explaintion of the fix for black background on thumbnails please tried

Found a little bug/annoyance - im posting it here since gotdotnet will phase out in a few days(19th of June 2k7). in CreateFolderImage you didnt fill in the BackGround - thus using any other background than black will look wierd :-O I added this to fix it: g.FillRectangle(new SolidBrush(BackGround), 0, 0, size, size); Right after the stacked Graphcis has been declared (was line 477 of the .ashx file for me - v 2.1 of the handler) :-)

but did not change anything

# October 4, 2007 7:26 PM

Bertrand Le Roy said:

M Anderson: thanks, but this is a known issue (and the project moved to Codeplex long ago):

www.codeplex.com/.../View.aspx

# October 5, 2007 1:06 PM

danilm said:

Hi, I have the same problems with

"using com.drew.metadata.exif" error.

I've downloaded latest album files (AlbumHandler2_1), extracted to wwwroot.

May I have to do anything else in IIS? (winxp)

thanks

# October 8, 2007 3:09 AM

Bertrand Le Roy said:

Danilm: I'll give you the same answer I gave to other users who had the same problem and which you can read above... You probably forgot to copy the dll into the bin directory.

# October 8, 2007 3:13 AM

danilm said:

I'm sorry but I have copied the dll into the bin directory and it doesn't work

is the right version: 2.2.2.41745?

I've downloaded AlbumHandler2_1 that contains all the files and folders

thanks

# October 8, 2007 4:57 AM

Bertrand Le Roy said:

Is the bin directory directly below the IIS application folder?

# October 8, 2007 12:35 PM

Trynyti said:

Awesome App Bertrand!  I love how easy it is to use just the .ashx page!  Now of course I have a question...

My file structure is such:

<Root>/Family/Photos/album.ashx

<Root>/Family/Photos/default.aspx

<Root>/Family/Photos/2007/<photos>

I had to change the CacheLocation to CacheLocation.Memory because of my host.

When I run just the album.ashx it works perfectly, all the images display, only the 2007 and sub-directories show and navigation works fine.  

When I try and run the default.aspx (which I modified the original to have the src="album.ashx" instead of src="~/album.ashx") I see all directories from the root (minus hidden/protected ones) and only the red X image, no images anywhere, even in the 2007 and subs, but if I click "Details" it does show the EXIF details of the photo.  The navigation still works fine, and when I get to the point where the tool tip would normally read "Click to view picture at full resolution", if I click that it opens a new browser and shows the photo as expected.

Two Questions:

1. Any idea why it doesn't show any of the photos when being called from the Default.aspx but works fine in the album.ashx?

2. How do I make it so it only scans sub-directories from it's location when being called from the default.aspx file?

Thanks for the awesome utility!

# November 1, 2007 3:45 AM

Bertrand Le Roy said:

Trinity: I think that may be a bug. Please file it on the CodePlex site.

The control will always limit what photos it displays to the directory where the handler is (not the page) and subdirectories.

# November 1, 2007 12:48 PM

Bertrand Le Roy said:

Cab: what's the error?

# November 28, 2007 2:42 PM

Pedro Torres said:

Hi,

I am trying to costumize the application, although I am not being able to change the backgroudn color for the upfolder and thunbnailfolder icons... I want my background to be white and for those its in black... any one can help?

# January 12, 2008 10:32 PM

Bertrand Le Roy said:

Pedro: there are config entries in the handler as wel as forum posts and bugs on the CodePlex site that should get you started.

# January 13, 2008 8:13 PM

Mike D said:

Is there a way to have handler pull images from a certain directory?

Example file structure:

Bin

App_Data

images

---->Folder 1

---->Folder 2

---->Folder 3

defualt.aspx

ablum.ashx

# January 23, 2008 5:29 AM

Bertrand Le Roy said:

Mike: why don't you put the handler in the images folder?

# January 23, 2008 1:12 PM

ttoomm said:

Bertrand-

You should not have blown M Anderson off like that.  He/She is reporting a different issue (October 4, 2007 7:26 PM.)

1. Calios'  June 8, 2007 fix for the background of the stacked  Folder Immages works just fine.  So it is no longer a "known issue" but rather a fixed issue.

2. What M Anderson is reporting is a peculiarity that I do not fully understand but can discribe.  If you make the change Calios describes, the thumbnails don't change until you change the folder names.  The thumbnails are stored in the application's temporary folder, background and all.  They do not change just becuase you say you wnat them to look different.  You have to do something to cause them to re-write.

# January 27, 2008 12:45 PM

Bertrand Le Roy said:

ttomm: right, and this is a known issue too. If you want to regenerate the thumbnails, for the moment, you need to physically delete them or somehow restart the appdomain (touching web.config should do the trick). The original issue is not fixed in the sense that the fix is not yet in the current release, so it's a "known fix" rather than a "fixed".

# January 28, 2008 2:35 PM

Jeff said:

Awesome little app, however I have some issues with it, when I add the required files to the directory, it shows everything as it is supposed to, however when I click on an image, to see if in the center of the screen, it doesnt show at all, it only shows the 'Details', 'Previous Image' and 'Return to Folder View'.

I like this app very much, but I would LOVE for it to show the image in the center of the screen.

I'm running this on WHS (Home Server) and the client OS is Vista, with IE7.

# February 21, 2008 11:14 PM

Bertrand Le Roy said:

Jeff, please contact me  through the contact form, and I'll look into it.

# February 22, 2008 1:54 PM

Cathy said:

Hi Bertrand,

I want to change background color of thumbnail. I changed the following code:

private static readonly Color BackGround = Color.White;

However, the color remains blank.

Please help. Thanks.

# February 26, 2008 10:12 PM

Bertrand Le Roy said:

Cathy: that's this issue:

www.codeplex.com/.../View.aspx

The bug is not fixed in the current release but the discussion on it contains a fix.

# February 27, 2008 12:55 PM

Lou said:

hello, seems to be a nice album, but it's not working on my hoster. sohosted.com

I also have this problem:

The issue I'm having is that it is scanning all my folders. I only need it to scan one specific folder and all subfolders under it. When I move the .ashx file and page to the folder that I want to show (meaning the main folder or first folder that should display) all I get are X's for all the images. Any ideas?

sohosted.com is running on medium trust, changin the location of the cache to none or memory doesn't fix the problem....

somebody knows what to do?

Regards

Lou

# March 3, 2008 8:04 AM

Bertrand Le Roy said:

@Lou: it seems like you're using the user control version. If that's the case, you can try to set the HandlerUrl property to point at the ashx file, and also the Path property on non-postback requests.

# March 3, 2008 2:28 PM

Bertrand Le Roy said:

Sridhar: I have no idea. The image isn't even in the dom. Drop me e-mail at bleroy at microsoft com and we'll try to debug into it.

# March 17, 2008 1:31 PM

Bertrand Le Roy said:

@Michael: I have no idea. You should check that with your hoster. Let me know what you find.

# March 30, 2008 5:11 PM

MichaelR said:

I was wrong...Memory Caching sorted it out.

But I get some links and red croses though in some of

the pictures though...Is this a bug or Is there a work around with this.

Thanks very much

# April 1, 2008 3:40 AM

Bertrand Le Roy said:

@Michael: are the broken images consistently the same images? Are they jpeg images? Is there a public url where I could have a look?

# April 1, 2008 12:50 PM

MichaelR said:

Hi Bertrand,

My images are in jpeg format.

(thumbnails) red crosses and link are coming out inconsistently in these series...

thummnail ok   thummnail ok  thumbnail ok    red cross  red cross  red cross link link link thumbnail ok...

I say inconsistenly, I mean sometimes when you view the gallery red crosses and links come out the other time they are fine.

url: www.aikidoclub.net

Thanks very much

# April 2, 2008 3:45 AM

Bertrand Le Roy said:

@Michael: we should take that offline. Please write me e-mail at bleroy at microsoft. There is a server error on these images but I'm unable to diagnose it because you have cutom errors on (which you should, this is absolutely the right setting). We should be able to sort this out via e-mail. Thanks.

# April 2, 2008 12:45 PM

masterMunkus said:

This is working fine on my local machine

but on the server it just shows white bg , missing images and links , I have set my server to allow the application write permission. Any thoughts

# April 8, 2008 9:08 PM

Bertrand Le Roy said:

Check that you configured the directory where the handler is as a web application.

# April 8, 2008 9:10 PM

Wil said:

Need Help, I get the album to work when I debug but when I publish I get the following error.

Error 13 There is no build provider registered for the extension '.ashx'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'. E:\Visual Studio 2005\WebSites\xxxxxx\Entertainment\Gallery.aspx 3

# April 27, 2008 3:42 PM

Bertrand Le Roy said:

@Wil: check that the server has ASP.NET 2.0 or higher installed, then check the web.config file.

# April 28, 2008 12:20 AM

Jeff Haluska said:

I am having the smae problem, able to debug, but publish....   ASP.net 2.0 is installed on my local machine, and the web config for the website had the build providers included....  Any other suggestions...

# May 21, 2008 4:17 PM

Bertrand Le Roy said:

@Jeff: difficult to say without looking at the server. Drop me a mail through the contact form and I'll have a look.

# May 28, 2008 8:16 PM

Bartek said:

Hello,

I copied album.ashx and MetaDataExtractr.dll to directory with jpgs but I get this message:

"Błąd serwera w aplikacji '/PhotoHandler-6410'.

--------------------------------------------------------------------------------

Błąd kompilacji

Opis: Wystąpił błąd w czasie kompilowania zasobu wymaganego do obsłużenia tego żądania. Przejrzyj poniższe szczegółowe informacje o błędzie i zmodyfikuj odpowiednio kod źródłowy.

Komunikat o błędzie kompilatora: CS0246: Nie można znaleźć nazwy typu lub obszaru nazw 'com' (czy nie brakuje dyrektywy „using” lub odwołania do zestawu?)

Błąd źródła:

Wiersz 52: using System.Web.UI.WebControls;

Wiersz 53:

Wiersz 54: using com.drew.metadata.exif;

Wiersz 55: using com.drew.metadata.jpeg;

Wiersz 56: using com.drew.metadata.iptc;"

this line is red:

Wiersz 54: using com.drew.metadata.exif;

this: Komunikat o błędzie kompilatora: CS0246: Nie można znaleźć nazwy typu lub obszaru nazw 'com' (czy nie brakuje dyrektywy „using” lub odwołania do zestawu?)

means: compilator error message: CS026: Could not find type name or namespace 'com' (check whether "using"  is missing.

Hope You'll help me.

Greetings

# June 15, 2008 7:00 PM

Bertrand Le Roy said:

@Bartek: it's hard for me to understand the localized error message but I'm suspecting you didn't put the dll into the bin directory of the web application.

# June 16, 2008 3:45 PM

Bartek said:

i checked it once again and MetaDataExtractr.dl is in this directory;/

# June 19, 2008 8:37 AM

Bertrand Le Roy said:

@Bartek: is the bin directory in a directory that is configured in IIS as a web application?

# June 19, 2008 12:41 PM

Bartek said:

I assured that I put MetaDataExtractr.dll into the appropriate directory.;/

# June 19, 2008 1:57 PM

Bertrand Le Roy said:

@Bartek: I believe you. The question I was asking was on the *parent* directory of bin. Is the parent of bin configured in IIS to be a web application? We can take that offline. Please contact me using the contact link.

# June 19, 2008 2:33 PM

Ty Johnson said:

Has anyone been able to get this into a DNN Module? Can I use this in DNN?

# June 30, 2008 10:48 AM

Bertrand Le Roy said:

@Ty: I never tried, but if you use it as a user control, I don't see why not.

# June 30, 2008 1:52 PM

Dominic Bundy said:

Is there any way to display the folders in date order and not alphabetically

# July 21, 2008 10:18 AM

Bertrand Le Roy said:

@Dominic: it already is in date shot order. If that's not the case for your photos, maybe they are using an exotic EXIF tag. Feel free to send me one of those at bleroy at microsoft and I'll have a look.

# July 21, 2008 11:59 AM

Fredrik E. Nilsen said:

I'm running the photo album on my Windows Home Server but I've run into problems with a few photos. Some photos shows as thumbnails but they are not shown in full size when I click the thumbnails. It seems like they won't load at all. If the photo doesn't load, the next thumbnail will not appear. If I open the photo in an image editor and save it with a new name, it seems to work.

# July 25, 2008 10:05 AM

Brian Wagner said:

Mine problem is all on godaddy when the default.aspx hit this line of code it stops

<photo:album runat="server" ID="Album1" />

If I remove it the style sheet loads, but obviously the ablum doesn't work.

I can only get the original Album.ASHX to work. I an out of options until my contract with gofatty is up, cause I don't know what else to do.

# July 28, 2008 11:22 AM

Brian Wagner said:

Ok I got everything to run fine on my local machine.  When I publish to my site hosted by Godaddy.com I get a problem with the following code.  Apparantly they are not giving me rights to the temporary asp.net folder this is using.  Thanks in advance for your assistance.

Static IMagehelper()

{

..

..

_imageCacheDir = Path.Combine(HttpRuntime.CodegenDir, "Album");

                  Directory.CreateDirectory(_imageCacheDir);

This  is the error:

Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I saw mention earlier that changing the Caching == CacheLocation.Disk to Caching == CacheLocation.Memory in the ashx file will work for godaddy. But I have tried changing all the string to memory and I still get the same error. I gues I am unsure on how to change the handler.

# July 28, 2008 12:10 PM

Dave OS said:

Hi Bertrand.

Excellent work with this photo handler. Well done. I have just one question. I would like to display a subset of the EXIF meta-data. Ie.. If I wanted to view Model, Exposure and F-Number details. Is it possible?

Thanks

Dave OS

# August 15, 2008 11:46 PM

Bertrand Le Roy said:

@Dave: sure, for the moment I'm just dumping all the available info but you could certainly modify the code to only display a subset.

# August 18, 2008 2:27 PM

Dave OS said:

Thanks. I've tried but to no avail. My skill set dos'nt include C# :(. Any idea where i can start?

Dave OS

# August 18, 2008 3:11 PM

Bertrand Le Roy said:

@Dave: if you go to GeneratePreviewPage, there is a double loop in there that loops over Image.Metadata. You could modify the code in there so that it continues the loop if the data is not in your predefined list. Something like if (!["OneKeyIWant", "AndAnotherOne"].Contains(data.Key)) continue;

# August 18, 2008 3:23 PM

Dave OS said:

Thanks for that Bertrand. I played around with it for a bit and got it working. Here it is below. I removed the qoutes from each side of the commas. :)

if (!"Model, Exposure Time".Contains(data.Key)) continue;

Again.... Thanks for your help.

Dave OS

# August 18, 2008 5:30 PM

Jeff T. said:

I am working on converting this code to a VB format, but before I continue has anyone here already done that?

Thanks in advance!!

-Jeff

# December 22, 2008 4:31 PM

Bertrand Le Roy said:

@Jeff: no, nobody is working of that that I know of. How would you keep up with new releases though?

# December 22, 2008 6:29 PM

Jeff T. said:

Bertrand,

You are correct, that is my dilemma. I am now looking for a option. Thanks for your response!

# December 23, 2008 7:16 AM

Bertrand Le Roy said:

@Jeff: actually I'm not quite sure why you would want to do that in the first place. If you really want to do it, I'd at least wait for the next update, which will be quite major.

# December 23, 2008 1:37 PM

babji.sunny@gmail.com said:

Hi,

Can you please let me know "How do I make the code to select the Images present in a particular folder and subfloders present in that folder"?

I mean to say "If I have placed a folder with the name ALBUMS and this folder ALBUM contains so many subfloders with the related images". So in this case how would I make the code to select the folders present only in the ALBUM Folder?

# December 31, 2008 12:32 AM

Bertrand Le Roy said:

@babji.sunny: I'm not following you. The photo album already works with subfolders.

# January 5, 2009 3:46 PM

Sunil kumar said:

its very nice to use....thanks dude....

# January 14, 2009 2:10 AM

Jeremy said:

This is a cool app. Thanks for sharing it!

Here is my question: Does this work if it's used with a Master Page? I am using a Master Page so that I have the same look on each page. It seems that the photo album is starting at the root of my web application and trying to grab images and directories from there. Have you ever tried this with a Master Page before?

# January 14, 2009 8:47 PM

Bertrand Le Roy said:

@Jeremy: sure, it should work just fine with a master. You should be able to set the path property on the control to any directory you want.

# January 15, 2009 1:42 AM

Sunil said:

how to change bgcolor of folder, I want white color..............

:((((((((((((((((((((

pls tell me how to change....pls

# January 20, 2009 10:58 AM

Jerry van de Beek said:

Thanks for this quick an nice solution.

It took me less than 2 minutes to get it up-and running.

Nice application for jpg handling.

# January 23, 2009 2:09 AM

Len said:

Awsome app,  Worked great right off the bat additional user privledges needed to get the app creating its folder icons but I figured it out. Thanks for putting this together. Most companies are chrging through the nose for the ability to have a nice photo album on a website!

# January 23, 2009 2:30 PM

George said:

Hi, This looks great and something I think I can really use, but unfortunately I am encountering problems trying it on brinkster.  Here is the error I am receiving.  Any help you can provide is greatly appreciated.  Thanks much in advance.

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: CS0246: The type or namespace name 'com' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 52: using System.Web.UI.WebControls;

Line 53:

Line 54: using com.drew.metadata.exif;

Line 55: using com.drew.metadata.jpeg;

Line 56: using com.drew.metadata.iptc;

# January 28, 2009 2:58 PM

Bertrand Le Roy said:

@George: you probably didn't upload the dll into the bin folder of the application.

# January 28, 2009 3:02 PM

George said:

Hi, thanks for the quick response, but yes, I have uploaded the bin file to the application.  Any other ideas?

# January 28, 2009 3:35 PM

Bertrand Le Roy said:

Are you sure that bin folder is at the root of the configured IIS web application? (this is the only reason why you'd see that message)

# January 28, 2009 3:47 PM

George said:

Ahh ha... thanks again for the quick responses.  I had the dll in the bin folder under the webroot folder.  I just copied up the file album.ashx to my webroot folder though and it works fine there.  I have not been able to get it to work in just a subdirectory yet though.  I will try again tomorrow.  Thanks very much for your assistance!!  Great utility!!

# January 28, 2009 4:29 PM

Tango said:

Do you have a VB.NET Version?

# January 28, 2009 9:18 PM

Bertrand Le Roy said:

@Tango: no.

# January 28, 2009 11:22 PM

George said:

Hi, this is great, but I can still only  get it working in my webroot directory.  If I put album.ashx in a sub folder I get the error "type or namespace com could not be found".  I do have the dll in the bin folder of webroot though.  Do you have any ideas on how I might resolve this?  I really only want to display images from the subfolder.  Thanks in advance.

# January 29, 2009 11:34 AM

George said:

some additional information... the version of the dll I am using is 2.2.2.41745.  Thanks - George

# January 29, 2009 11:39 AM

Bertrand Le Roy said:

@George: you can use the album as a user control and set its path property.

# January 29, 2009 3:10 PM

miraz912 said:

Hi great job. Working fine on mine. Just wondering if it is possible to have image titles or description added.

Thanks

# January 29, 2009 6:55 PM

Bertrand Le Roy said:

@miraz: that's failry easy if you use it as a user control (there are templates for precisely that), otherwise you can delve into the rendering code and add it.

# January 29, 2009 7:00 PM

George said:

Hi, I dont' mean to be a pain (fairly new to this), but where do I set the path and property?  Do I do it in album.ashx?  If so, do you know which line, or do you have an example.  Thanks again very much in advance.  Again, it works fine in my webroot, but I receive the error "The type or namespace name 'com' could not be found" when I try it in a sub directory.

Thanks

# January 30, 2009 11:51 AM

Bertrand Le Roy said:

@George: look at the sample that comes with the handler. It uses the handler as a control inside a page. You can set the path property on this control.

# January 30, 2009 12:31 PM

danpep said:

This is just what I needed! Thanks for sharing this wonderful app.

I have close to zero experience with IIS and ASP.NET yet I was still able to get up and running in about an hour or 2 with help from these messages and google.

I plan to create a mobile.ashx/aspx with smaller image dimensions so I can view my photos from anywhere on my phone.

Thanks again.

# February 10, 2009 11:23 AM

Rick said:

I am a newbie and I have this handler up and running. I need to restrict the handler to pick up a specific directory. I have tried dropping the handler(album.ashx) in the specific directory but then when I run it, I get the thumbnails with red x's. I am simply trying to get the folder \Photos with Sub Dir's \Album1, \Album2, etc. to display without pulling from the root of the website. I have treid multiple configurations and seem to run into issues. It lloks like I can set the path in the control properties but that gives me another error ~/Photos/album.ashx. Please help!

# February 18, 2009 10:23 AM

Bertrand Le Roy said:

@Rick: You don't *need* to use the page and control if you're not going to add stuff around the album or modify the templates. You can use just the handler on its own, and drop it into the photo directory.

If you do want to use it as a control, the path must not point at the handler but rather at the photo path.

# February 18, 2009 12:31 PM

Rick said:

Got it working. Thanks! I did not realize that you could use the .ashx directly as a page. Is there a simple way to use this with an MSACCESS database BLOB for your pics?

# February 24, 2009 10:20 AM

Bertrand Le Roy said:

@Rick: no, no database support, sorry, unless you add it yourself. But why would you want to do that? Is it an existing database that you have from which you want to extract pictures?

# February 24, 2009 1:21 PM

Pouya Vatanpour said:

I'm looking for source code to extract metadata from jpeg file in IPTC format, please help with C# or VB.NET

vatanpour@msn.com

# March 1, 2009 2:10 AM

Bertrand Le Roy said:

@Rima: the metadata in the image files themselves is more than capable to do that, and the album handler already knows how to read that information. Adding an xml file seems unnecessary.

# March 3, 2009 11:54 PM

Nathan Duby said:

The issue I am having is that it creates the initial album perfectly, but I am pointing to a virtual folder through IIS and the script seems to set all the addresses as f/photos instead of /photos, so I cannot click on the thumbnails for the folders to look inside...any ideas?

# March 4, 2009 4:17 PM

Bertrand Le Roy said:

@Nathan: I don't understand. Can you send me e-mail at bleroy at microsoft with some more details about what you're trying to do?

# March 4, 2009 8:44 PM

Greg said:

Is the CSS in the current version on codeplex the newest version? because the layout doesnt look the same as the one on those images, I think i have the same problem as posted by Martin Dolphin in the very first post here

# March 5, 2009 4:59 PM

Bertrand Le Roy said:

@Rima: the library that I'm using currently doesn't support writing the meta-data back to the image files but that sounds like the right thing to do in principle (and I believe .NET now has read/write APIs for EXIF data). Storing that data in a database might get you there faster though.

@greg: let's follow up offline on that.

# March 5, 2009 5:22 PM

Rima said:

I did not add the editing.. just added file upload, directories and files names editing and deleting.

I still can't get this PATH attribute work.

keeps getting:

Value cannot be null.

Parameter name: value

on the line:

if (path != _requestDir && !path.StartsWith(_requestPathPrefix)) {

I can't use the default album.ashx,  I need to edit the template.

I have the images in a directory called: Gallery

So I tried setting the path:

~/Gallery

Gallery

~/Gallery/

Gallery/

/Gallery/

And keeping the Register

<%@ Register Src="album.ashx" TagPrefix="photo" TagName="album" %>

HELP :( :(

# March 6, 2009 8:27 AM

Mike said:

Same here...  images in a subfolder and Path property wont work. where's the documentation for this thing??  nice application isn't so nice without docs.

# April 11, 2009 4:04 PM

Raghavendran said:

how put paging in the photo thumbnails page..

# April 15, 2009 11:47 AM

Shankar Nath said:

Sir,

Your Development (A simple ASP.NET photo album) is Excellent.

But I need a Small thing.

I Have Three Folders in my web directory,

Folder 1: images     (some JPG images are there)

Folder 2: Products (some JPG images are there)

Folder 3: Album

  Album_one  (subfolder of Album)

  Album_two  (subfolder of Album)

I want this photo album is only applicable for

Album folder and subfolders of Album_one, and Album_two.

How to Change the code.

Thank you.

Nath

www.nathworks.net

# April 27, 2009 4:21 AM

Bertrand Le Roy said:

@Shankar: no need to change the code, just put the handler in that Album folder.

# April 27, 2009 12:05 PM

Tyson said:

If you want to use this with disk caching on godaddy and aren't afraid of using your disk quota, change the following in album.ashx.

Line 209

_imageCacheDir = Path.Combine(HttpRuntime.CodegenDir, "_imgCache");

to

_imageCacheDir = Path.Combine(HttpRuntime.AppDomainAppPath, "_imgCache");

and surround lines 1973-1985 with an if block like so

if ((folder.Name.Equals("Album") || folder.Name.Equals("_hcc_thumbs")) == false) {

// code from lines 1973-1985

}

# July 14, 2009 3:25 PM

Nealio said:

I just moved this website to Godaddy. Of course the photo album was working own my own 2003 server no problem. Now its not showing thumbnails. I adjusted the album.ashx to use memory instead of disk but no luck. Can anyone help fix this? This is a great photo album and it seems from this post that some people may have gotten it to work at GoDaddy but maybe I missed something.

Also I did change permissions on the IIS mgmt at GoDaddy and create and application for that folder. Its running IIS7

# August 11, 2009 2:40 PM

Nealio said:

Actually, Tyson's post worked great. I must of had something wrong. Its working great now

If you want to use this with disk caching on godaddy and aren't afraid of using your disk quota, change the following in album.ashx.

Line 209

_imageCacheDir = Path.Combine(HttpRuntime.CodegenDir, "_imgCache");

to

_imageCacheDir = Path.Combine(HttpRuntime.AppDomainAppPath, "_imgCache");

and surround lines 1973-1985 with an if block like so

if ((folder.Name.Equals("Album") || folder.Name.Equals("_hcc_thumbs")) == false) {

// code from lines 1973-1985

}

# August 11, 2009 9:02 PM

jamie_dixon said:

I am getting

Error Creating Control - Album1Type 'System.Web.UI.UserControl' does not have a public property named 'FolderModeTemplate'

when trying to view Templated.aspx in design view.  

MetaDataExtractor is referenced

Templated.aspx, Default.aspx, album.ashx and Album.css are all in the same directory.  

In addition, the Default.aspx page works fine until I move the album.ashx file into a subdirectory and change the control path.  In this case:

<%@ Register Src="album.ashx" TagPrefix="photo" TagName="album" %>

to

<%@ Register Src="~/Images/album.ashx" TagPrefix="photo" TagName="album" %>

# August 12, 2009 10:50 AM

jamie_dixon said:

I got the control to work - you need to set the HandlerURL and Register Src="" to the same amount

I have 1 question though

I see 2 other people asked about the images showing up in a column.  How do I change that so the control is only a shortcut image ot he directory where the album.asxh is located?  Is that in the .css embedded in the class?

# August 12, 2009 1:07 PM

Bertrand Le Roy said:

@Jamie: not sure I understand your question. Do you want to follow-up offline with me (bleroy at microsoft)?

# August 12, 2009 2:33 PM

Russ Kimball said:

I love the look and interface; works great with my site but only on my system.  When I upoaded it to my web host, I do not have permissions as you stated in your discription.  

How can I change the cashing?

# August 18, 2009 5:21 PM

Bertrand Le Roy said:

@Russ: do a search for "CacheLocation" in the code for the handler. Change the first line you find to:

private const CacheLocation Caching = CacheLocation.Memory;

# August 18, 2009 5:33 PM

Russ Kimball said:

Thanks so much that did it.  I have one more question; is there a way to point the image search to a selected folder?

I have multiple sites and it just makes for too many images.

Thanks again

Russ

# August 18, 2009 6:49 PM

Bertrand Le Roy said:

@Russ: not sure that's what you're asking, but you can put one handler in each of the folders.

# August 18, 2009 7:15 PM

Russell Kimball said:

Sorry for not being clear; I have 4 other sites that I host for friends of mine.  They have pictures at appear on their site that I really do not want in my gallery.  All site folders reside in the same main directory each URL pointing to each sites folder; my site resides intact in the same main directory.  When the album is launched it shows pictures from all teh sites; I would like it to only search in the image folder.

Russ

# August 18, 2009 10:38 PM

Bertrand Le Roy said:

@Russ: why don't you put a handler.ashx in each of the image directories?

# August 18, 2009 11:56 PM

Russell Kimball said:

I hate to say this but I am just learning ASP.net; I usually work with Frontpage, I trying to learn.  I do not know how to put a handler.ashx on the image folders so that they are the only ones viewed.  Can you tell me or send me a link?

Russ

# August 19, 2009 10:57 AM

Bertrand Le Roy said:

@Russ: no problem, feel free to e-mail me at bleroy at microsoft.

# August 19, 2009 1:28 PM

MR said:

When I try to set the Path, I get this error:

Line 1562:                    }

Line 1563:

Line 1564:                    if (path != _requestDir && !path.StartsWith(_requestPathPrefix)) {

Line 1565:                        ReportError("invalid path - not in the handler scope");

Line 1566:                    }

# August 21, 2009 5:54 PM

Bertrand Le Roy said:

@MR: the picture directories have to be "under" the directory where the album handler sits.

# August 21, 2009 6:22 PM

Russell Kimball said:

Got the ablum working on my home system but but once I upload it to my hosting server it reads "Click to Display" any ideas?

Russ

# August 22, 2009 10:36 PM

Bertrand Le Roy said:

@Russ, I can't access your server for some reason, but you probably need to configure the handler to use memory caching instead of disk caching. See some of the previous comments.

# August 22, 2009 11:42 PM

shaolin77 said:

Will this work with ASP.net 3.5?

# September 15, 2009 5:19 PM

Bertrand Le Roy said:

@shaolin77: yes.

# September 16, 2009 12:43 PM

Justin said:

Hi, I have build a website with asp.net and would like to implement this album in it... I tried to add the ablum files (templated.aspx etcc files) by using the add existing item in the visual studio but when i build the solution it give me an error something about metadata... "com" missing. can someone please help me solve this problem? as i'm not a pro in asp.net

# October 13, 2009 2:38 PM

Bertrand Le Roy said:

@Justin: you need to copy the dll that comes with the release into the bin folder of the application.

# October 13, 2009 4:53 PM

noonway said:

@Bertrand: You were telling Russ...

@Russ: why don't you put a handler.ashx in each of the image directories?

I am attempting to do this - using as a user control - with the following Directory Structure:

Main Photos (album.ashx here, main.aspx with the @register src of ~/Main Photos/album.ashx, secondary.aspx with the @register src of ~/Main Photos/Secondary Photos/album.ashx, and tertiary.aspx with the @register src of ~/Main Photos/album.ashx)

|

|__ Secondary Photos (album.ashx - HandlerUrl changed to ~/Main Photos/Secondary Photos/album.ashx)

|

|__ Tertiary Photos (album.ashx - HandlerUrl changed to ~/Main Photos/Tertiary Photos/album.ashx)

But when I drop the handler in the subdirectories, modify the HandlerUrl and compile the code I get the following errors in each of my .aspx pages as well as the compiled DLLs.  

Error 38 The type 'Bleroy.Photo.Album' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\photos\d81285ef\ee16f919\App_Web_lsjmicgf.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\photos\d81285ef\ee16f919\App_Web_plpl094z.dll' c:\Projects\company\main.aspx 10

I've never used .ashx files before so I feel like I may be missing something easy here... I tried renaming the namespaces to no avail.  Any other suggestions?

# October 29, 2009 10:04 AM

Bertrand Le Roy said:

@noonway: right, Web Application Projects are not something I've considered. On the other hand, if you're using it as a control, I'm not sure you need two copies. Pointing both controls to the same url should in principle work.

# October 29, 2009 1:42 PM

noonway said:

@Bertrand: But if I point both controls at the same URL I get the full Gallery list instead of just a particular gallery.

What I'm trying to do is build a menu called Gallery that shows all the sub-galleries on one .aspx page but then if the user selects a particular Gallery from the menu it would only show that secondary gallery and not the main or tertiary galleries.  I could probably recode the handler to take an argument with the directory I want to show, but I don't really have the time to delve that deeply into the code.

Oh well, I guess I'll just use the single gallery and let the users select which sub-gallery they want to use directly from the main.aspx.

Great work here, by the way.  I never would have thought to use caching the way you did and appreciate the tutorial.  :)

Thanks!

# October 29, 2009 1:56 PM

Bertrand Le Roy said:

@noonway: well, that's not a scenario I had in mind. There is a new version on the way though and I can try to see what I can do, but I can make no promises about when that's going to be out.

# October 29, 2009 1:58 PM

sayed_mohamed_Darwish said:

"CS0246: The type or namespace name 'com' could not be found"

I'm sure that the MetaDataExtractor.dll is loaded to the Bin directory .

What is the problem ?

# November 7, 2009 1:04 AM

Bertrand Le Roy said:

@Sayed Mohamed: I really think that is the problem. Are you sure the bin directory is directly under a directory that is configured in IIS to be an application?

# November 7, 2009 1:25 AM

someguy said:

Not sure if this has been answered, but a find/replace to replace ".jpg" with ".png" enabled support for png's. So yeah, that can be done.

# November 16, 2009 9:42 AM

Paco said:

I am having the same problem as Martin Dolphin (September 9, 2005) and Greg (on March 5, 2009) previously reported.  That is, the default page background is not black and the photo stacks are in a single vertical line down the page.  Since I just downloaded the package today, I would have thought that the CSS would be the correct version.

Please help.

# November 25, 2009 8:26 PM

Bertrand Le Roy said:

@Paco: it's not just CSS. I know the update is long overdue but it will come. In the meantime, I'm afraid your only option is to go into the code and fix it yourself.

# November 25, 2009 8:49 PM

Paco said:

@Bertrand:  thanks for the quick reply.  

I'm surprised that it is not yet fixed.  Given the long delay and few reports of problems, I thought that it was my problem.  I'll see what I can do to help.

Happy Thanksgiving.

# November 26, 2009 8:35 AM

Derek said:

Hello, I am trying to set this up on my home server. I have created the Root Web App, copied all of the files and folders to my photos directory and hav a link pointed to the virtual directory.

I am receiving the following error: Server Application Unavailable

The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

Any help would be greatly appreciated.

PS - I am trying to get this running on Windows Home Server the directory for the photos is a UNC path to the WHS shared Photos folder.

Thanks again

# December 5, 2009 6:36 PM

Bertrand Le Roy said:

@Derek: never seen that happen with this app. Usually that happens when an app gets killed by the server because it went over some memory or stack limit. I suppose it could happen if you had some insanely big pictures in there. Try again with few small pictures, just to see.

# December 5, 2009 8:19 PM

RED said:

Awesome little script!

I need just one more thing and that is the file name (with or without extension) to be able to place it under the image..can someone show me the variable to use to pull that info?

Thanks!

# April 12, 2010 1:05 PM

Jake said:

Thanks for your share.

Would you like to tell me

How can I permit user to upload image to current folder?

# July 25, 2010 4:09 AM

Bertrand Le Roy said:

@Jake: use FTP, file copy, or whatever way you have to access the site's file system. The application won't allow you to upload.

# July 25, 2010 11:21 PM

Bertrand Le Roy said:

@Krish: it's in the settings. Look for "ThumbnailSize" near the beginning of the file.

# September 13, 2010 12:38 AM

Bertrand Le Roy said:

@kris. Well, then you're on your own. Feel free to modify the code any way you want.

# September 13, 2010 3:17 AM

duminda said:

Dear sir,

I put this in a asp.net solution and when the thumbnails of the folders are shown, the other folders like "obj"  and "properties" are also shown as thumbnails. can u please tell me a way to remove those.. I guess i should change the path of folders. but i dont know how to?

please help me Im a begginer. ..

thanks in advance!!

# December 9, 2010 9:08 AM

Bertrand Le Roy said:

@duminda: the simplest is probably to create a folder where you put nothing but the images and the handler.

# December 9, 2010 1:16 PM

Jos Kampes said:

I love this application!  I do however also have the same question as RED, to find out how to get the name of the image under (or above)  the picture.

# January 5, 2011 9:38 AM

RJ said:

How would i be able to let someone upload pic's and see it loaded in the album?

i know i could use a uplaod commponent, but getting it to save?

Thanks

# April 4, 2011 11:44 AM

Bertrand Le Roy said:

@RJ: you can't, except if you give them ftp access or build it yourself.

# April 4, 2011 1:54 PM

Sumon said:

Dear Sir

I am a beginner in asp.net.

I want to use this Photo gallery in my project.

How can i do it?

thanks in advance!!

# July 7, 2011 2:12 PM