 |

|
it is not working in VS 2008
|
|
|
|

|
Thank you n_1_c_k, your article drawn me out of a nightmare of implementing photo album
by the way, I have a question:
Is there a possibility to view an image in a larger size? for example, when user clicks on it a larger size of the same image is shown
|
|
|
|

|
Nick, I've used this for a long time on my personal website. Since I host my own webserver, this makes it infinitely easier for me to bulk upload photos for my family and friends to see - w/o them having to register a flickr, kodak.com, etc.
I'm in the process of porting the concept to a silverlight front end. The source will be up on codeplex soon: PhotoBrowserAg. Thanks for the helpful app and the inspiration.
Best,
Mark
|
|
|
|

|
i get error like this:
PhotoBrowser\PhotoBrowser.ascx.cs(174,27): error CS0104: 'TreeNode' is an ambiguous reference between 'System.Web.UI.WebControls.TreeNode' and 'squishyWARE.WebComponents.squishyTREE.TreeNode'
|
|
|
|

|
Use the 'modified' file attribute to the thumbnail image file name.
Washdi
|
|
|
|
|

|
Error 1 'TreeNode' is an ambiguous reference between 'System.Web.UI.WebControls.TreeNode' and 'squishyWARE.WebComponents.squishyTREE.TreeNode' C:\tmp\PhotoBrowser\PhotoBrowser.ascx.cs 174
Error 2 'TreeNode' is an ambiguous reference between 'System.Web.UI.WebControls.TreeNode' and 'squishyWARE.WebComponents.squishyTREE.TreeNode' C:\tmp\PhotoBrowser\PhotoBrowser.ascx.cs 191
Can you help me?
|
|
|
|

|
This works for me in Firefox but in IE I get an error
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 252: // unique ID
Line 253: Hashtable directoryLookup = (Hashtable) Context.Session["DirectoryLookup"];
Line 254: PhotoDirectory dir = (PhotoDirectory) directoryLookup[Int32.Parse(node.Key)];
Line 255:
Line 256: GeneratePhotosTable(dir, 1);
Source File: c:\inetpub\wwwroot\PhotoBrowser\PhotoBrowser.ascx.cs Line: 254
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Codefresh.PhotosBrowser.PhotoBrowser.tvwMain_SelectedNodeChanged(Object sender, EventArgs e) in c:\inetpub\wwwroot\PhotoBrowser\PhotoBrowser.ascx.cs:254
squishyWARE.WebComponents.squishyTREE.TreeView.RaisePostBackEvent(String eventArgument) in C:\Inetpub\wwwroot\PhotoBrowser\squishyTREE\TreeView.cs:455
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
Chris
|
|
|
|

|
I'm not familiar with adding references. In Visual STudio, i see where to add the references, but where do i get the squishyTree & photovrowser dlls to refer to? i don't see them in the code download.
|
|
|
|

|
Here is the error message:
[OleDbException (0x80004005): Could not use ''; file already in use.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvider() +57
System.Data.OleDb.OleDbConnection.Open() +203
Codefresh.PhotoBrowserLibrary.DirectoryBrowser.OpenDatabaseConnection(String photosPhysicalPath) +87
Codefresh.PhotoBrowserLibrary.DirectoryBrowser..ctor(String photosPhysicalPath) +28
Codefresh.PhotosBrowser.PhotoBrowser.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\PhotoBrowser.ascx.cs:89
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Page.ProcessRequestMain() +750
this happens when you view the page once, then close the browser and go to the page again.
how do i go about resolving this? is anyone else have this issue?
also to note, the photobrowser application is pointing to the C:\ drive. However, I have moved the website to my G:\ drive. Is this causing the problem?
-- modified at 10:34 Thursday 7th December, 2006
|
|
|
|

|
You've probably got the database open in Access whilst running the code.
Nick
|
|
|
|

|
that's the thing. i am not opening it with Access.
it seems that when one person opens the DB, another attempt to open the db fails and retuns the error message "file already in use"
|
|
|
|

|
i did some research on this and found out that it was a permissions issue.
thanks for the response and thanks for the wonderful asp control.
|
|
|
|

|
When I tried to run the project, there's no display on my screen and I couldn't add to the database. What should I do to make it appear in my screen? Thanks!
|
|
|
|

|
When ever I try to access the Photo Album, I got the following problem:
Error Message:
Server Error in '/PhotoBrowser' Application.
Could not use ''; file already in use ( By '' means PhotoServer.mdb file).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Could not use ''; file already in use.
Source Error:
Line 87: string mappedPhotosPath = request.MapPath(photosPath) + "photos";
Line 88:
Line 89: dirBrowser = new DirectoryBrowser(mappedPhotosPath);
Line 90:
Line 91: }
Source File: c:\inetpub\wwwroot\photobrowser\photobrowser.ascx.cs Line: 89
Stack Trace:
[OleDbException (0x80004005): Could not use ''; file already in use.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
System.Data.OleDb.OleDbConnection.InitializeProvider()
System.Data.OleDb.OleDbConnection.Open()
Codefresh.PhotoBrowserLibrary.DirectoryBrowser.OpenDatabaseConnection(String photosPhysicalPath)
Codefresh.PhotoBrowserLibrary.DirectoryBrowser..ctor(String photosPhysicalPath)
Codefresh.PhotosBrowser.PhotoBrowser.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\photobrowser\photobrowser.ascx.cs:89
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
Error Message End:
I think it is due to fact that Connection is open only once and not closed and when other user try to access it, Photoalbum throws error that data is already in use.
Please help me out of this problem
Thanks.
Ejaz
-- modified at 20:27 Tuesday 2nd May, 2006
|
|
|
|

|
I get a error: Operation must be performed on a query which can be updated.
Exception Details: System.Data.OleDb.OleDbException: Source Error:
Line 81: cmd.Parameters.Add(CreateStringParam("VirtualPath", photoDirectory.VirtualPath));
Line 82:
Line 83: cmd.ExecuteNonQuery();
Source File: F:\Download\fotoalbum\PhotoBrowser\PhotoBrowserLibrary\PhotoDirectoryDB.cs Line: 83
What does it mean?
(PhotosServer.mdb is empty???)
F. Douven
|
|
|
|

|
This usually means the PhotoServer.mdb file is read only. Clear this flag and it should work fine.
Edit: You might like to see this post as well
Nick
-- modified at 8:33 Friday 24th March, 2006
|
|
|
|

|
Sorry, but the mdb file is read/write!
|
|
|
|

|
Sorry I haven't a clue on this one. What is the object type that like 148 is returning?
|
|
|
|

|
I have VS 2005. Could you please give a step-by-step as to how to use this with that?
|
|
|
|

|
I too am interested in a VS 2005 release. Or at least a version that can be converted. Any idea when this might happen?
epf
-- modified at 13:26 Wednesday 25th January, 2006
|
|
|
|

|
Sorry but I don't have the time to convert it. I have actually done the conversion for my private site and it wasn't that difficult.
Nick
|
|
|
|

|
Do you think you could share your converted code with a very dumb novice programmer?
|
|
|
|

|
Sorry I don't have it in a fit state at the moment. I will try to in the futute but no promises.
Nick
|
|
|
|

|
I am a Chinese, I'm so glad to see your source.
Thank you!
|
|
|
|

|
Hi,
After making some corrections for ambiguous names of the tree node control and adding (decimal) in the math.floor statement, I got the project compiled without any errors.
Now, every time I click a thumbnail to view the picture I get the error:
Exception Details: System.Data.OleDb.OleDbException: Operation must use an updateable query.
Line 520: Photo photo = (Photo) photos[id];
Line 522: photo.IncrementViewed();
Line 524: imgPhoto.ImageUrl = "photos" + photo.FullVirtualPath.Replace(@"\", "/");
This same kind of error I get when I add a new directory.
Has this anything to do with the new dotnet version?
Thanks,
Martijn
|
|
|
|

|
Sorry,
Had nothing to do with .net 2.0
chrisbal already wrote:
'I had to give the ASPNET account full access to the ./photos directory.'
That worked for me.
Martijn
|
|
|
|

|
Glad you sorted this out. I've only experienced this problem if the Access database is readonly.
|
|
|
|

|
I also got rid of the abmiguous error. Now I get error in int totalNoOfPages = (int) Math.Floor(photos.Count / photosPerPage);. Since I am not a C# guy, I don't know how to solve this. Can you help?
|
|
|
|

|
I changed it to int totalNoOfPages = Convert.ToInt32(Math.Floor((decimal)((photos.Count) / photosPerPage)));
Now it works.
|
|
|
|

|
Nice app! I experienced the same problems as some of the other persons that has posted replies. Fortunately one of their replies helped me. Kind of strange that U have to set r/w to Network Service for the root-catalog. But anyway, thanxs again for a sofisticated app.
Rille
|
|
|
|

|
I'm lost, I can't follow your instructions on how to set this up with Visual Web Developer. What goes where?
|
|
|
|

|
I've never used Visual Web Developer, just the full version of Visual Studio. Sorry I can't be of more help
Nick
|
|
|
|
|

|
I have been thinking of doing a photo browser app for some time but never got around to it. Then I saw your app and it was exactly what I was looking for. Thank you.
I have a Win2K3 server and I keep on getting the following exception.
"System.Data.OleDb.OleDbException: Operation must use an updateable query"
I got around this by adding "Network Service" account with RW permission to PhotoBrowser directory and things worked like a charm.
|
|
|
|

|
Hi Nick,
Will I be able to use the control on more than 1 page on my website with different pictures?
thanks,
metalguy
|
|
|
|
|

|
how would you reference the database?
and where would the photo directory go?
|
|
|
|

|
Hello,
I cant seem to get the overlib script to work.
The photo album browsing control seems to work, but the overlib does not.
I added the code to the top of the page like instructed, but it does not seem work.
<script type="text/javascript" src="PhotoBrowserRes/overlib/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>
Also,
I was wondering what the purpose of tooltip was?
What does it do on the page?
Is it needed in order for the photo album browsing control to work?
please help.
metalguy.
|
|
|
|

|
When you say it doesn't work, how do you mean? Do you get a JavaScript error? Also, what browser are you using? I know it works in IE and Firefox but have not tried any others.
The purpose of the tooltip is display any comments for an individual photograph.
Nick
|
|
|
|

|
I dont get any error. no comments popup. :S
I am using IE. is there anything else that i need to add for overlib to work (besides that one line before </head>)
so 'tooltip' from dyn-web is used to display any comments for an individual photograph (or is it 'overlib' that does that?)
are you still using dyn-web's tooltip?
or did you replace it with overlib by erik?
thanks,
metalguy
|
|
|
|

|
Hmm, sorry to ask a stupid question but have you added comments to any photos? The tooltip won't appear otherwise. Other than that I'm not too sure. Try emailing me your source and I'll have a look, or send me the link if the photo album is online (so I can check the HTML).
I got into 'issues' with the developer of dyn-web so I binned it. overlib was another tooltip library which didn't have such a restrictive license.
Nick
|
|
|
|

|
hey nick.... did you get my email?
|
|
|
|

|
Looking at the HTML source your <img> tags look like this:
<img class="image" src="photos/Table Photos/Accordian/Thumbnails/JustForFun-1.jpg"
They should look like this
Nick (15/08/05) - Some comment ')" onmouseout="return nd()" src="photos/Table Photos/Accordian/Thumbnails/JustForFun-1.jpg"
For some reason the overlib JavaScript is not being outputted. I don't have the source code on me at the moment but might I suggest having a look at the source at the point when these methods are output. I expect that some switch is set to false or something. I'll try to have a look tonight to see if I can spot what exactly it is.
Sorry I can't be of more help but its 5.30pm on a Friday afternoon and I'm off down the pub.
Nick
|
|
|
|

|
thanks for help....
i'll keep on working at this...
have fun at the pub!!
|
|
|
|

|
I've had a look at the code and I can't find any reason why the JavaScript would not be output. The only thing I can now suggest is to send me you source files.
Nick
|
|
|
|

|
thanks nick!
here is the link for my project:
http://www.yorkcas.on.ca/Turtle1.zip
thanks again!
|
|
|
|
|

|
Hi - great utility! Having one issue though. Opening the code in the IDE recreates the 2003 and 2004 dirs regardless of deleting them from the photos dir and deleting any record of them in PhotosServer.mdb. Whats causing this to happen?
Cheers,
Mark
|
|
|
|

|
I guessing I must have left them in the Solution or something. Sorry!
Nick
|
|
|
|
 |