Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Upgrading from GSP 2.3 to 2.6 & Consolidating Multiple Galleries Into a Single Web Application
merrill
#1 Posted : Saturday, 24 December 2011 11:39:59 PM(UTC)
Rank: Member

Joined: 24/12/2011(UTC)
Posts: 10
Man
Location: Metuchen, NJ, USA

I currently have GSP 2.3 installed with 9 active galleries. In GSP 2.3, multiple galleries required installation in separate web applications. I plan to upgrade to GSP 2.6, which allows multiple galleries to be supported in a single web application. What do I need to do to consolidate my 9 galleries into a single web application?

I assume that I could upgrade each of the current web applications individually, but that will be cumbersome and will require repeating 9 upgrades every time an update to GSP comes along. I also assume that I've got to restructure the database to consolidate the information somehow and also to consolidate the XML formatting data for all of the galleries, but I can think of a number of ways to structure each of these, many of which likely would not work.

I am running GSP on Windows Server 2008 SP2 (32-bits), SQL Server 2008, IIS 7.0. I have located the Application Pool control to select .NET 4.0 for the Default Application Pool, in which the 9 instances of GSP are installed. I understand the need to convert the <web.config> file(s) to conform to .NET 4.0 in its (their) references.

(I have searched the forums for all instances of "upgrade," "update," "combine," "consolidate," and a few other keywords and have not found anything on this subject. I also have searched the new user manual to no avail. I hope that I'm not asking a question that already is answered somewhere.)

Thank you for your help with this and for your continued development and support of GSP.
Roger Martin
#2 Posted : Sunday, 25 December 2011 10:00:38 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Are your 9 galleries in 9 databases, or one?
Roger Martin
Creator and Lead Developer of Gallery Server Pro
merrill
#3 Posted : Sunday, 25 December 2011 10:08:36 PM(UTC)
Rank: Member

Joined: 24/12/2011(UTC)
Posts: 10
Man
Location: Metuchen, NJ, USA

Everything is in a single instance of MS SQL Server 2008 and in a single database, accessible at one time through SQL Server Management Studio.
Roger Martin
#4 Posted : Monday, 26 December 2011 7:58:45 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

The tricky part of the upgrade is that you have 9 galleryserverpro.config files, and the upgrade wizard is designed to only upgrade one. But if you don't mind manually re-applying some of your settings, I think you can do it without too much trouble.

I would pick the one gallery and follow the normal upgrade process. This will be the only gallery where settings in galleryserverpro.config will be auto imported. Then, for the remaining galleries, create new web pages for each one (gallery1.aspx, etc) by making a copy of the existing default.aspx in the root of the website. After making the copy, open the file in a text editor and look for this line:

<gsp:Gallery ID="g" runat="server" />

Modify it so that it specifies the gallery ID you used in the original version (look in config\galleryserverpro.config for that gallery):

<gsp:Gallery ID="g" runat="server" GalleryId="2" />

Now fire up the page in the web browser. At this point you should see a bunch of broken thumbnail images representing the media files and albums in that gallery. That is, the gallery is retrieving the database records correctly, but doesn't know where the actual media files are (because that value is stored in the galleryserverpro.config that wasn't imported).

All you have to do now is log in as an admin and go to the media objects page in the site admin area and update all the settings that you used to have in galleryserverpro.config (those settings are now stored in database tables). Most important is the path to the media files - find that on the Media Objects - General page. Update that and verify the thumbnails and albums are now browsable.

Repeat for the remaining galleries.

Hopefully I'm not missing anything that prevents these steps from working. Be sure to have a backup in case you need to revert. And let us know how it goes...
Roger Martin
Creator and Lead Developer of Gallery Server Pro
merrill
#5 Posted : Sunday, 15 January 2012 4:40:29 PM(UTC)
Rank: Member

Joined: 24/12/2011(UTC)
Posts: 10
Man
Location: Metuchen, NJ, USA

I have successfully updated one of the galleries from GSP 2.3 to GSP 2.6. I am able to access the gallery. I also created copies of the <default.aspx> file for each of the existing galleries and added the GalleryId for each. I found that, when I tried to log into any gallery except the first one, I received an error message from GSP. From the messages I received, it seemed that the original application still was trying to work but couldn't find the data that it needed in the SQL Server database. So, using IIS Manager, I removed each of the other applications but the first one from the application pool. That led to runtime error messages when I tried to access the other galleries by their original names.

I believe that removing the other galleries from the application pool was necessary, although I had been hoping to keep the others active so that I could copy all of the settings from them to the corresponding galleries in the new application. Perhaps there is some way to extract the settings from the <galleryserverpro.config> file so that I won't miss copying any of my earlier settings. It would be nice if I could transfer sections of the old config files into the new one, but my understanding is that doing so will not work because the settings now are contained in the database rather than the config file.

In any event, what seems to be missing at this point is the linkage between the URL that I'm using to get to the various galleries and the galleries themselves. Perhaps you can explain how the linkage works so that I can make the necessary edits to get things going again. The URLs that I've used are of the form <http://www.mycompany.com/gallery>, <http://www.mycompany.com/gallery_name1>, <http://www.mycompany.com/gallery_name2>, <http://www.mycompany.com/gallery_name3>, etc. I have inserted those names in the listing on the Gallery Manager page on the rows with the related GalleryId numbers. I tried editing the names of the copies of the <default.aspx> file to correspond to the names I was using for their respective galleries, but that didn't help.

Something that may help figure out what is going on: I also have tried to edit the paths on the Media Objects - General page, but that hasn't worked because I've been unable to change the Current Gallery on the Gallery Manager page. When I open the drop down list and select another gallery, then select the link to switch galleries, no change happens, and the Current Gallery remains on the GalleryId 1 gallery (just called "Gallery"). Since I'm logged in as the site administrator, I would have thought that I could navigate to any gallery, but it hasn't worked that way. Do I need to edit the database to enable access to the other galleries?

I hope that this gives you enough to point me in the direction of what my next steps need to be. As I mentioned, it would help to understand how the linkage is supposed to work to find the correct gallery, given any particular URL extension.
daveburke
#6 Posted : Sunday, 15 January 2012 6:16:35 PM(UTC)
daveburke

Rank: Advanced Member

Joined: 12/01/2009(UTC)
Posts: 62
Location: Vermont

Merrill,

Roger will provide you with the best advice on this, of course, but I documented how I'm employing multiple Gallery Server Pro galleries in Sueetie on my wiki at the following url if that helps you.

http://sueetie.com/wiki/HowToCreateGallery.ashx

Good luck,
Dave
merrill
#7 Posted : Sunday, 15 January 2012 10:39:05 PM(UTC)
Rank: Member

Joined: 24/12/2011(UTC)
Posts: 10
Man
Location: Metuchen, NJ, USA

Thanks, Dave, for your link and your documentation on your wiki. It helped me decide to go back and try something that had occurred to me previously but that I had not yet attempted.

It turns out that, following Roger's instructions, the URL for each gallery changes. Instead of what I originally used, of the form <www.mycompany.com/gallery_name1>, <www.mycompany.com/gallery_name2>, etc, I had to insert another </gallery/> in the URL and add a <.aspx> extension at the end. So, I needed <www.mycompany.com/gallery/gallery_name1.aspx>, <www.mycompany.com/gallery/gallery_name2.aspx>, etc to access the galleries. I have shortened the file names so that they now are <www.mycompany.com/gallery/name1.aspx> and the like.

I would like to find a way to get back to the original URLs, since quite a few people have them, and I really don't want to have to notify everyone. I hope that there's a simple way to do that, but, so far, I haven't found a way that avoids the need for a file extension at the end. I'll keep trying, but perhaps someone can suggest something. I'm not an HTML programmer, having spent most of my programming time doing machine and assembly coding.

Thanks for any suggestions.
Roger Martin
#8 Posted : Monday, 16 January 2012 7:51:56 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Do you require all the galleries to use the same database, or can they each have their own?
Roger Martin
Creator and Lead Developer of Gallery Server Pro
merrill
#9 Posted : Monday, 16 January 2012 1:37:33 PM(UTC)
Rank: Member

Joined: 24/12/2011(UTC)
Posts: 10
Man
Location: Metuchen, NJ, USA

There should be no problem with separate databases. I originally set up GSP using MS SQL Server because it already was installed on the web server and because it seemed that it would be convenient to have all of the galleries share a common set of users. The way it turned out that the various galleries are used. though, it now seems unnecessary. Is there any downside to separating the databases, other than shared records having to be entered multiple times?
Roger Martin
#10 Posted : Monday, 16 January 2012 2:24:24 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

There are two approaches you can take:

1. Separate web apps. Just follow the same general architecture as your original setup, but use a single database for each app. I think you could technically share a single DB if you wanted to, but I don't recommend it.

2. Install a single app at the root site www.mycompany.com, then create a folder for each gallery in Win Explorer. Inside each folder, create a copy of default.aspx from www.mycompany.com/default.aspx. Link each default.aspx to its own gallery (either through the admin UI (preferred) or by setting GalleryId="x" in default.aspx).

I like the second approach better because you have only one web app and one DB.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
merrill
#11 Posted : Wednesday, 18 January 2012 5:29:23 PM(UTC)
Rank: Member

Joined: 24/12/2011(UTC)
Posts: 10
Man
Location: Metuchen, NJ, USA

I already had created a <.aspx> file for each gallery, each with its own GalleryID="x" setting, by editing copies of the <default.aspx>. I can rename them all back to <default.aspx> when I put them into their respective folders. Where should the folders be placed in the folder hierarchy? Is there anything that I need to edit in the group of <default.aspx> files to link them to the application, which will be located in a different folder?

Also, do I need to convert the folders in which the individual <default.aspx> files are located back to applications under IIS? What I plan to do is put the various <default.aspx> files into the folders that are left over from the old setup of GSP 2.3, but with those folders moved to whatever hierarchy level is needed. Those folders had been set as IIS applications in GSP 2.3, when each gallery was its own application.
Roger Martin
#12 Posted : Wednesday, 18 January 2012 8:15:49 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Create the folders below the directory where the gallery is installed. For example, if you want URLs such as www.company.com/gallery1/ and www.company.com/gallery2/, then install the gallery to www.company.com. In Win Explorer, that might translate to C:\inetpub\wwwroot (but that is up to you). Then create the folders just below this. That is, at C:\inetpub\wwwroot\gallery1 and C:\inetpub\wwwroot\gallery2.

Do not turn those child folders into apps. You don't need any other changes. The gallery ID in the aspx files is all that is needed for separate galleries, although you should check your admin settings to ensure the media objects' file path is unique for each gallery.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
merrill
#13 Posted : Thursday, 19 January 2012 10:36:29 PM(UTC)
Rank: Member

Joined: 24/12/2011(UTC)
Posts: 10
Man
Location: Metuchen, NJ, USA

I have gotten to the point that I have all of the galleries accessible at URLs such as <www.company.com/gallery/gallery1> and <www.company.com/gallery/gallery2>. (I gave up on trying to match my original URLs. It was too much work with the new version.) They all work when accessed from the <admin> user account. When I try to access them from the old usernames and passwords, I get a "Welcome <user>" message in the login area, but I also get an "insufficient privileges" message in the thumbnail area.

I have tried re-entering the passwords for the users on the Manage Users page. The users all are set up with a Site Viewer role that gives them access to all of the folders in the gallery to which they are logging in (and to several other galleries that have users who also share the Site Viewer role). I have restarted the web server. I still get the same response for any user other than the <admin>. Is there something else I need to do to activate the users? Must the roles be configured differently than in the earlier versions?

On another matter, I have been using the "thumbnailHeightBuffer" parameter to make the frames around thumbnails taller to allow for longer thumbnail captions. I changed that value in the new <galleryserverpro.config> file. It seems to have no effect in some galleries, yet, in others, it works. Again, I restarted the web server, and I also forced the browser to refresh. How do I fix this one?

Thanks for your continued assistance in getting the upgrade to work.
Roger Martin
#14 Posted : Friday, 20 January 2012 8:38:12 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

If you can log in but get the insufficient privileges message, that means the user is not a member of any roles with access to albums. Go into the manage roles page and set up the roles, then go to manage users and assign each user to one or more roles.

The thumbnailHeightBuffer setting exists for each gallery. If you want all galleries to use the same value, update all of them in the gs_GallerySetting table. Use something like this:

Code:
UPDATE gs_GallerySetting
SET SettingValue='70'
WHERE SettingName='ThumbnailHeightBuffer'

Roger Martin
Creator and Lead Developer of Gallery Server Pro
merrill
#15 Posted : Saturday, 21 January 2012 11:01:09 PM(UTC)
Rank: Member

Joined: 24/12/2011(UTC)
Posts: 10
Man
Location: Metuchen, NJ, USA

Here's what I've learned from my efforts over the last day. The conversion process apparently converted part of the Users and Roles data but not all of it. When I looked at the Roles, I saw selections made of the various folders that were supposed to be accessible to the associated Roles, and, from that, I thought the Roles had been brought over intact. When I investigated further after your last message, I realized that the actual functions that were supposed to be applied to the specified folders had not come across, and I had to check the boxes for the relevant functions.

Through trying different arrangements, I also found that the security model has changed sufficiently that the organization of Roles that I had used previously no longer would work. This probably is because I now have all the galleries in a single application instead of each gallery having its own application. As a consequence, I no longer can use a single role (such as "Site Viewer," for example) to cover a number of sites, just by checking off the folders in all of the sites where it would be used. The fact that users previously logged into different applications created the separation that I needed between galleries. Now, I have to have separate Roles for viewing each gallery in order to get the user login to apply only to its respective gallery.

So, I set up multiple Roles such as "Site Viewer – Gallery1," "Site Viewer – Gallery2," etc. This led to a different set of problems. It may not be obvious, but I used dashes instead of hyphens in the Role names. It turns out that, despite their being displayed correctly in a number of places in GSP, they result in Role name errors when it comes time to apply them. It also turns out that, when you try to edit Roles with names including such characters, it causes the edit window to freeze. The only way out is to click the All Albums breadcrumb. Then you have to work your way back to the Roles management page and delete the Roles that used such characters. Once having avoided any special characters, everything seems to work properly with respect to logging in, security, roles, and the like.

As to the thumbnail Height Buffer, I have found the various instances of it in the database, but I haven't yet figured out how to make the needed changes. This was easy when everything was in the first 200 rows because I could just navigate to the particular intersection in the data array and change the value. With the larger database now in use, I have to learn more about how to modify the data in MS SQL Server. I expect no problem; it'll just take a little time to learn what I need to do.

As always, Roger, thanks for your continued development of Gallery Server Pro and for your generous assistance.
Roger Martin
#16 Posted : Sunday, 22 January 2012 10:41:36 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Glad you are getting through the issues. Sorry about the trouble with the special characters. I am not aware of any issues with the dash, and in fact the built-in user album feature uses dashes when naming the auto-generated role names.

But some characters do cause issues - I think < and > will cause the grid on the manage roles page to not work right. I have traced that to a limitation in the ComponentArt Grid control, which I have already replaced with a much improved interface in my internal 3.0 build.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
merrill
#17 Posted : Tuesday, 27 March 2012 8:15:50 PM(UTC)
Rank: Member

Joined: 24/12/2011(UTC)
Posts: 10
Man
Location: Metuchen, NJ, USA

A new problem has developed. I debated whether to post it as a continuation of our earlier discussion or give it a new title that would be more descriptive of the issue. After you read this, if you think others would find it more easily and thus benefit more from a new topic title, I'll start another thread in which we can continue. I decided to start here so that you'll remember the connection to my upgrade from GSP 2.3 to 2.6 and the consolidation of the multiple galleries.

I have been running for the last couple months with 8 galleries. They seemed to be working correctly. Yesterday, I tried to add one more. It seemed to work at first, but then things fell apart. At this point, the GSP installation will only let me get to the base gallery (that I have not populated with content) and not to the 7 others that I actually use.

The first thing that I noticed when I added the gallery on the Gallery Manager page was that it was given number 10 instead of 9, as I would have expected. Prior to that point, I still was able to access other galleries by their separate URLs. Thereafter, I could not.

The next thing that I noticed was that the Gallery Manager page would not let me select other galleries to make current. The other galleries appeared correctly in the drop down list, and, when I selected them in the list, they would be correctly highlighted at the top. But when I clicked the link to "Switch to selected gallery," the original gallery on which I accessed the site returned to the "Current gallery" window.

For a while, it seemed that I still could access at least some of the multiple galleries. Somewhere along the line that stopped working, too; I'm not quite sure at what point. Since then, I have tried restarting the server; I have deleted the 9th gallery (which was labeled 10); and I have looked around in the SQL database to see if anything seemed to be missing or corrupted. No luck (probably because I haven't figured out the functionality of a lot of it yet).

Is it possible that I hit some kind of upper limit on the number of galleries — one that most likely is not intended to be there? Are there others successfully running this many galleries and more? If so, then the problem must be with my installation, but I'm not sure what to try next.

BTW, before all of this began, I put a large (24 MB) PDF photograph file in one of the galleries, expecting that it would be converted to a thumbnail and to a web-optimized image when I re-synchronized the gallery. That did not occur, despite my previously having installed the GSP Binary Pack. That large PDF had been served correctly as a PDF previously; it just took a long time to download. Is there a limit on the size of such files that can be handled by the components of the Binary Pack?

Where to now?

As in the past, thank you for your efforts on Gallery Server Pro, Roger.
Roger Martin
#18 Posted : Wednesday, 28 March 2012 11:53:27 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

It is hard to say what might have gone wrong. Perhaps the best thing I can do is give you a little info to help you figure out what to do next.

The underlying page-to-gallery connection is stored in the GalleryControlSetting table. In a default installation, there is one record in there:

Code:
GalleryControlSettingId      ControlId       SettingName SettingValue
---------------------------------------------------------------------
1                         ~/default.aspx|g    GalleryId       1


The control ID is a pipe-delimited string containing the web page name and the ID of the gallery control on that page. You can look in this table to see if the data has the expected values; you can also edit it manually if it is so screwed up that the Gallery Manager doesn't work right.

Alternatively, you can override the page-to-gallery mapping in that table by hard-coding a gallery in the web page. When you open the web page (e.g. default.aspx) in a text editor, notice the gallery control is defined like this:

Code:
<gsp:Gallery ID="g" runat="server" />


If you add a GalleryId attribute, it will override the page-to-gallery mapping on the Gallery Manager page:

Code:
<gsp:Gallery ID="g" runat="server" GalleryId="1" />


Use this trick to hard code the gallery IDs for all your galleries. This might be useful if some bug is preventing the normal gallery management from working right.

Architecturally, the app should be able to handle thousands of galleries, although in practice I have no experience with anyone using 10 or more galleries in a real-world app. Not that they don't exist, but I am not aware of them.

I don't know much about the internal limitations of the 3rd party app in the Binary Pack, but if you want to troubleshoot I would try creating a thumbnail from the PDF with the command line. You'd use the ImageMagick executable (convert.exe). If that works, it should also work in the gallery. If not, then you might try finding an ImageMagick forum to figure out why.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
merrill
#19 Posted : Wednesday, 28 March 2012 6:58:01 PM(UTC)
Rank: Member

Joined: 24/12/2011(UTC)
Posts: 10
Man
Location: Metuchen, NJ, USA

I was able to look at the GalleryControlSetting table, but, from the information that you sent, I'm not sure how it should look with more than one gallery installed on the system. To help you expand on the information you supplied, I've captured two tables: GalleryControlSetting and GalleryId, given that one column in the first seems to reference entries in the second. I've tried to embed them here with no success. Rather than taking the time to figure out how to embed them, I will send them to you separately in an e-mail message. Perhaps you can put them up in your response for others to see.

In any event, in the GalleryId table, there are 9 entries. The top entry has a GalleryId value of -2147483648 and a Description of "Template Gallery." The others are numbered from 1 through 8 and have Descriptions that are the names that I gave to the various galleries.

In the GalleryControlSetting table, there are only 3 entries. They have GalleryControlSettingId values of 1, 2, and 4. They are associated with ControlId values of ~/default.aspx|g, ~/gallery.aspx|g, and ~/gallery/default.aspx|g, respectively. All have SettingName values of "GalleryId," and the associated SettingValue 4, 2, and 5, respectively.

Should there be a row for each gallery in the GalleryControlSettings table, or just the three shown, with values changing in the SettingValue column as I change the current gallery? If the latter, I see no changes in the Setting Value column, even though I have selected different galleries on the Gallery Manager page and even though the Gallery Manager page puts up a message "You have successfully switched galleries," which, of course, is incorrect.

Is there someplace that I should look for instructions on inserting images into this forum? I clicked the button and was asked for a URL, but I don't have anyplace to put images on line when GSP is not working. Is there some other way to insert them? Thanks, as always!



harrismike
#22 Posted : Tuesday, 3 April 2012 4:00:22 AM(UTC)
Rank: Newbie

Joined: 27/03/2012(UTC)
Posts: 1

Wow,aces~~












Everything here, you believe that?
Come on ... Believe it or not, read on to know.
Passion? Live hot? Is there?
Paul you read do not want to look and read just shout.
Psychologically prepared not to get started.
come on!come on! let's go
→●LOG IN●
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.