Friday, April 29, 2011

Gallery Server Pro 2.4.8 Released

Version 2.4.8 was released today. It contains fixes for three bugs that won’t seriously affect most people, but I wanted to get it out the door so I can focus on the 2.5 drive. The release includes these fixes:

  • Logging in does not preserve the original requested album or media object
  • Cannot manage users or roles when they contain certain characters
  • (DotNetNuke) Gallery doesn't work when user-friendly URLs are disabled

Get more details about the bugs here. To upgrade from 2.4.7, download the 2.4.8 files to your hard drive. Then replace the GalleryServerPro.*.dll files in the bin directory with those from the download. Finally, replace the following files in your gallery with the matching file in the download:

  • App_GlobalResources/GalleryServerPro.resx
  • gs/pages/admin/usersettings.ascx

If you are upgrading from a version earlier than 2.4.7, follow the instructions in the Admin Guide.

Friday, April 22, 2011

Gallery Server Pro Roadmap

I’ve gotten a lot of good feedback in the poll about the future of Gallery Server Pro – keep on voting! I am particularly pleased that the two lowest vote-getters are “improve performance” and “improve reliability”. That tells me you think Gallery Server Pro is fast and robust. I spent a lot of time getting it there, so it is gratifying to see some objective confirmation.

Based on those results and my internal spidey sense, here is where I see the upcoming versions and features working out. This is rough and can and will change, but at this moment it is my best guess.

2.4.7 (Released April 21, 2011)

  • All known issues in the 2.4.X code base are fixed and the product is stable and performing well.

2.5 (June 2011)

  • Migrate the code base to .NET 4.0.
  • Replace the SQLite data provider with SQL Server CE 4.0. This will allow for simple xcopy deployment that works in medium trust – kind of the holy grail I’ve been wanting for several years.

3.0 (2012)

  • Easier skinning/customizing UI (the top vote-getter in the poll)
  • User comments/ratings (#2 in the poll)
  • New upload experience (#3 in the poll). Allow multiple file selection on client. Possibly include option to create optimized images on client and upload those rather than original images, greatly reducing upload time.
  • Tagging (heirarchical?)
  • Virtual albums: browse by tags, most recent, top rated, most commented, user
  • Editable metadata
  • New sorting options
  • Allow users to password protect individual albums/media objects
  • Namespaced javascript so multiple instances of control can be on same web page

Future (2012-2013)

  • Add viewmode 'Map' that displays map of GPS coordinates
  • Allow gallery-level settings to be overridden at the album level (MO title template, watermark, etc)
  • Allow separate media object title templates for thumbnail and optimized images
  • User quotas
  • Ability to regenerate captions from updated MO title template
  • Mobile app support
  • DeepZoom support
  • Fullscreen slideshow
  • Expand scope of error log to be an event log
  • E-mail notifications of gallery updates
  • Log history (viewing, edits, delete, etc)

Way, way Future (2040-2050)

  • Include teleport feature to take viewer to GPS location embedded in image

Keep your feedback coming. Does this roadmap gel with your needs?

And keep those donations coming! Your financial support allows me to continue working on Gallery Server Pro instead of taking some high-paying consulting work. The pay is poverty-level (average donation for Jan-Mar 2011 was $1300/month), but is highly satisfying, so I expect to keep at it as long as I can keep paying the bills.

Thursday, April 21, 2011

Gallery Server Pro 2.4.7 Released

Today I released version 2.4.7 of Gallery Server Pro. All versions have been updated, but the Web Application Gallery version takes a few days to get approved by Microsoft, so be patient for that one. There are no new features in this release; only bug fixes and one web.config change:

  • Various functions do not work when viewStateEncryptionMode="Always"
  • Case difference in username during logon causes duplicate user album
  • Username not HTML encoded
  • Exception data of inner exception not logged
  • Possible NullReferenceException when gallery contains images with GPS metadata
  • HTML embed code contains incorrect URL when the website is installed in a virtual directory
  • Role name that contains HTML cannot be assigned to user
  • Cannot add/remove roles for user when membership is read-only
  • embed.aspx moved from web root to \gs\ directory
  • web.config change: ViewStateEncryptionMode now set to “Always”

More details can be found in the Fixed Defect Report.

To upgrade from 2.4.6, download the 2.4.7 files to your hard drive. Then replace the GalleryServerPro.*.dll files in the bin directory with those from the download. Finally, replace the following files in your gallery with their matching file in the download:

  • App_GlobalResources/GalleryServerPro.resx
  • gs/embed.aspx (this is a new location; you may want to keep the original embed.aspx in the root directory if you have existing bits of embed code that point to this file)
  • gs/controls/myaccount.ascx
  • gs/controls/albumedittemplate.ascx
  • gs/controls/thumbnailview.ascx
  • gs/pages/admin/manageroles.ascx
  • gs/pages/admin/manageusers.ascx
  • gs/pages/myaccount.ascx
  • gs/script/mediaobjectview.js

If you are upgrading from a version earlier than 2.4.6, follow the instructions in the Admin Guide.

I’ll discuss a couple of the more interesting bugs.

Various functions do not work when viewStateEncryptionMode="Always"

I first learned about this issue from a user about a month ago. First, some background: One can specify that the view-state always be encrypted by setting a property in web.config:

<pages … viewStateEncryptionMode="Always">

When not specified, this setting is “Auto”, which means view-state is encrypted only when a control requests it. GSP works fine in “Auto” mode, but one of the third party controls it uses cannot handle the setting “Always”. This is the Callback control from ComponentArt, which is a nifty control I use for Ajax callbacks that is a nice balance between raw Ajax requests and the heavyweight UpdatePanel. When view-state is encrypted and the Callback control’s PostState property is set to “true”, this control fails with one of these messages:

“An error occurred while communicating with the server. Try again. Error: Invalid response from server.”

“The data could not be loaded.”

This issue affected the following functions in GSP:

  • Album thumbnail paging
  • Adding/editing a user on the Manage Users page
  • Adding/editing a role on the Manage Roles page

While this problem has always existed, it hasn’t appeared on my radar until a few weeks ago. This is because version 5.6.1 of DotNetNuke, released January 19, 2011, started using “Always” as its default setting. DotNetNuke didn’t announce the change ahead of time because they didn’t think it would be a breaking change for anyone. But this was a big problem for GSP.

I contacted ComponentArt and they were responsive in evaluating the issue, but in the end they couldn’t provide a fix, acceptable workaround, or estimated date for a fix. So I replaced the album thumbnail paging with a traditional hyperlink architecture, where navigating to the next and previous pages is done with hyperlinks. And I re-architected the user and role management pages to use Microsoft’s UpdatePanel. In the end the changes should be largely invisible to end users.

To keep the settings consistent between the various flavors of GSP, the web.config of all versions now set this setting to “Always”. There is a small performance impact of this change (about 1-2%), so if you don’t need this extra security and want the fastest possible gallery, feel free to change this back to “Auto”.

Cannot add/remove roles for user when membership is read-only

One of the great features of Gallery Server Pro is its ability to use Active Directory integration for membership. This can be easily achieved through a few simple edits to web.config (see the Admin Guide for step by step directions). However, there has always been a limitation where one can’t add or remove roles for a user when the web application doesn’t have permission to modify Active Directory data. The Admin Guide describes a few workarounds, but I finally got around to eliminating the limitation altogether.

When clicking the Save button for a user on the Manage Users page, the gallery does two things: (1) update the user properties in the membership provider (such as e-mail address, comment, or approval status), and (2) update the list of roles the member belongs to. Starting with 2.4.7, if there aren’t any changes to the user properties, then only the role membership is updated. That is, the gallery skips a call to the membership UpdateUser() method, thereby sidestepping the possibility of the membership provider throwing a permission error. Voila – you can now manage role membership for users even when using Active Directory in read-only mode.