Site settings can be accessed by choosing Site admin from the Actions menu. A new menu appears on the left. Notice that sections of this menu can be collapsed by clicking on the tiny arrows. We’ll review each section from top to bottom.
Gallery Server Pro 2.3 Administrator’s Guide Page 129 of 238
Site Settings – General
Gallery Server Pro 2.3 Administrator’s Guide Page 130 of 238
Product key
Product keys are free and easily obtained from the Product Key Wizard at www.galleryserverpro.com. Enter your product key in the text box and click the Enter product key button. A message will appear indicating whether or not the key is valid. If it is, all functionality is enabled and you will not be asked for a key again.
If Gallery Server Pro does not have permission to update the configuration file galleryserverpro.config, you must update it manually. Open the file, which can be found in the gs\config directory of the web application, in any text editor (such as Notepad) and edit the productKey attribute to contain the product key. Save the file. In some cases your changes won't take effect until you recycle the application pool or enter iisreset at a Start-Run dialog box.
System settings
Gallery Server Pro 2.3 Administrator’s Guide Page 131 of 238 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.
Allow anonymous browsing
Indicates whether users can browse the gallery without logging in. When unchecked, users must log in with a valid account to view media objects.
Allow anonymous browsing of high resolution images
Indicates whether users can view the original, high resolution images without logging in. When unchecked, users must log in with a valid account to view media objects, and that account must belong to a role that allows viewing the high resolution images.
This setting is ignored when anonymous browsing is disabled. Show login/logout
buttons
When checked, login and logout controls are displayed in the top right corner of every 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).
Web Developers: You can override this system setting at the user control level with the ShowLogin property of the Gallery user control in the .aspx page.
Show search link Indicates whether to display the search link in the top right corner of every page. Web Developers: You can override this system setting at the user control level with the ShowSearch property of the Gallery user control in the .aspx page.
Gallery ID The value that uniquely identifies the gallery for this website. Each web application is associated with a single gallery. Read the section Working with Galleries for more information.
Error management
The table below describes the error management properties. Email detailed
reports when web site error occurs
When checked, the designated administrator is sent a detailed report when a web site error occurs. The e-mail settings must be configured.
Enable error handling
Select this option to use Gallery Server Pro's own error handling routine to deal with all unexpected errors. Disable this option if you have an application-level error
Gallery Server Pro 2.3 Administrator’s Guide Page 132 of 238 handler defined in web.config or global.asax that you want to use for unhandled exceptions.
Show error details Indicates whether to display the full details of any unhandled exception that occurs within the gallery. This can reveal sensitive information to the user, so it should only be used for debugging purposes. When unchecked, a generic error message is displayed. This setting has no effect if Error Handling is disabled.
If an error is preventing you from opening this page to enable the option, you can enable it directly in galleryserverpro.config. Open this file, found in the gs\config directory, in any text editor. Change showErrorDetails to true.
Error handling and <customErrors> in web.config: Gallery Server Pro implements its own error handling mechanism that is independent of the <customErrors> section in web.config. This allows Gallery Server Pro to have the desired behavior without depending on a particular configuration of <customErrors>. However, you can override this behavior and revert control to <customErrors> if you wish. To do this, disable the error handling by unchecking the checkbox on this page.
Data providers
This section provides read-only information about how the ASP.NET data providers are configured in web.config and galleryserverpro.config. Click the information icon next to each provider to learn more about it and where it is configured.
Site Settings – Email
Gallery Server Pro 2.3 Administrator’s Guide Page 133 of 238 Name and address
to email error reports to :
Gallery Server Pro sends administrative emails, including error reports, to this person.
Name and address to show emails as coming from:
Emails sent from Gallery Server Pro (error reports and password change notifications) will appear to be sent from this person at this email address.
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).
This value is stored in the config file galleryserverpro.config. 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 Pro will automatically use the value specified in the system.net
Gallery Server Pro 2.3 Administrator’s Guide Page 134 of 238 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.
This value is stored in the config file galleryserverpro.config. 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 Pro 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.
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:
<!-- --> <system.net> <mailSettings> <smtp>
<network
host="localhost" port="25"
userName="Administrator" password="admin_password" /> </smtp>
</mailSettings> </system.net>
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.
Gallery Server Pro 2.3 Administrator’s Guide Page 135 of 238
Site Settings – Backup and Restore Data
Gallery Server Pro stores data in two locations: The media files are stored in a physical directory on the web server’s hard drive.
Information about media objects and albums are stored in a SQL Server or SQLite database. Backing up, moving, copying, or restoring Gallery Server Pro data requires moving or copying both sets of data. The backup function built in to Gallery Server Pro exports all gallery data to an XML file, and the restore function replaces existing data with the data in 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 section Backup strategy below for more information about performing regular backups.
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 that your strategy is inadequate.
Backing up your gallery data involves these sets of data: The media files
The data in the database.
web.config and galleryserverpro.config configuration files
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 Original file storage location on the Media Objects – General page in the Site admin section of Gallery Server Pro. In the example below, the media files are stored at C:\inetpub\wwwroot\gs\mediaobjects.
Gallery Server Pro 2.3 Administrator’s Guide Page 136 of 238
Backing up the data
SQL Server: For SQL Server databases, there are a number of ways to back up the data: 1. Use the backup functionality built in to SQL Server.
2. Use the backup function built in to Gallery Server Pro to export data to an XML file. See below for more information.
3. Use a third party backup program that knows how to back up SQL Server databases.
4. Copy the MDF database file to your backup location, either manually or through an automated script. SQLite: If you are using SQLite, backup your data with one of these techniques:
Use the backup function built in to Gallery Server Pro to export data to an XML file. Copy the data file App_Data\galleryserverpro_data.sqlite to your backup location, either
manually or through an automated script.
Backing up the configuration files
There are two configuration files that store information specific to your application you may want to back up:
web.config - This is in the root of your Gallery Server Pro web application.
galleryserverpro.config - This is in the gs\config directory of the Gallery Server Pro web application. If desired, back up these files 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 objects, such as title, extracted metadata, file names, etc. To export this data to an XML file, follow these steps.
Gallery Server Pro 2.3 Administrator’s Guide Page 137 of 238 1. Log on to Gallery Server Pro with an account that has Administer Site permission.
2. Click the Actions menu and go to Site admin.
3. In the left menu, navigate to the Backup / Restore page. The following screen appears:
4. 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 (the tables whose names start with "aspnet_"). When selected, ALL membership data is exported. If you 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.
5. To include the gallery data, make sure the Export media object and album data option is selected. 6. Click Create and download backup file. A file is created and downloaded to your browser.
Note: Remember that the backup file does not include the media files. It includes information about the media objects, such as titles, captions, and extracted metadata.
Gallery Server Pro 2.3 Administrator’s Guide Page 138 of 238
Using the built-in restore function
Use the restore function to replace all data in your Gallery Server Pro 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 objects directory. (You can do this either before or after the restore.)
Note: The backup file must be the same data schema version as the version expected by the web application. For example, a backup file created in 2.2 cannot be restored to 2.3. However, a backup file created in 2.3.3421 can be restored to 2.3.3440 because the data schema is the same. You can view the current data schema version by creating a backup file and inspecting the contents with a text editor. The version is in the SchemaVersion element, like this:
<SchemaVersion>2.3.3421</SchemaVersion>.
SQL Server 2000 users: A limitation in SQL Server 2000 prevents the Restore function from working correctly. The only known workaround is to upgrade to a newer version of SQL Server or use SQLite.
SQL Server 2005 / 2008 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 manually configure the SQL user using a tool such as SQL Management Studio to provide this permission. 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 Pro with an account that has Administer Site permission.
2. Click the Actions menu and go to Site admin.
3. In the left menu, navigate to the Backup / Restore page. Click the Restore tab. The following screen appears:
Gallery Server Pro 2.3 Administrator’s Guide Page 139 of 238 4. 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.
5. To import login accounts, make sure the Import user accounts option is selected.
Note: If you de-selected the option Export user accounts when you created the backup file, then you do not have any users to restore. In this case, make sure to de-select the option Import user accounts
Gallery Server Pro 2.3 Administrator’s Guide Page 140 of 238 when restoring your data so that the current accounts - including the one you are logged on as - are
not deleted.
6. To import the gallery data, make sure the Import media objects and album data option is selected. 7. 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. If this occurs, log out and log in using an account that was in the backup file.
Migrate Gallery Server Pro to a new gallery
Follow these directions for transferring an existing installation of Gallery Server Pro 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, ensure it is running under ASP.NET 2.0 or higher, and has default.aspx specified as the default document. (Click Start – Run and then type inetmgr to start IIS Manager.)
Note: If using IIS 7, you do not need to specify the default document.
Note: For more information on using IIS Manager, refer to Using Internet Information Services (IIS) Manager
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 your media files are not stored in the mediaobjects directory, then copy them to the new location, if required. After you copy them, you will need to update Gallery Server Pro so that it knows where your files are. This is on the Media Objects - General page in the Site administration console.
4. If you are using SQLite, then you already copied the gallery data, since it is in the file App_Data\galleryserverpro_data.sqlite. Skip the next step.
5. If you are using SQL Server and you need to migrate the data to another instance of SQL Server, you have two options:
Use the tool built in to SQL Server for detaching / backing up and re-attaching / restoring the Gallery Server Pro database. Refer to your SQL Server documentation for more information. Use the backup function in Gallery Server Pro 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.
Gallery Server Pro 2.3 Administrator’s Guide Page 141 of 238
General – Error Log
Gallery Server Pro stores a log of errors and unexpected events. These items can be access on the Error Log page:
View detailed information about each error by clicking the plus sign 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 Pro forum or a search engine like Google to search for your error message. Chances are pretty good that someone has already seen the same error.
Gallery Server Pro 2.3 Administrator’s Guide Page 142 of 238