I'm doing my first major asp.net project. Its a photo sharing program. Its similar to this site http://www.photobob.net/viewphotos.aspx. Basically what my site does is check the photos directory for subdirectories when the page loads, then populate the dropdownlist box with the name of each subdirectory. I have the dropdownlistbox autopostback property set to true. So each time a name is selected in the dropdownlistbox, the site should check to see if there is a directory call thumbnails in that directory. If not found it should create it, then generate thumbnails images from the large pictures in the directory. The page then loads the thumbnails with a hyperlink to its corresponding large picture.
My problem is that when I make a new subdirectory in photos with the pictures, and reload the name of the directory is in dropdownlistbox. But when I select the new name, and the site is generating the thumbnails I get an error saying out of memory.
Now I can see the problem since its a lot of pictures and its generating thethumbnails when I change the selecteditem of the dropdownlistbox. I solved the problem by writing a windows service that monitors the directory and creates the thumbnails when a new directory is created. This is fine since it on my server at home. But what if I want to to host my site somewhere else? The dynamic thumbnail generation aspect would be gone
I would rather not use the windows service, since I want to keep everything together.
What would be the best way to do this?
Thanks for the help.




Reply With Quote