Click here to Skip to main content
15,897,334 members
Articles / Web Development / HTML

Gallery Server Pro - An ASP.NET Gallery for Sharing Photos, Video, Audio and Other Media

Rate me:
Please Sign up or sign in to vote.
4.86/5 (131 votes)
18 Oct 2013GPL331 min read 830.2K   539  
Gallery Server Pro is a complete, stable ASP.NET gallery for sharing photos, video, audio and other media. This article presents the overall architecture and major features.
using GalleryServerPro.Business;

namespace GalleryServerPro.Web.Entity
{
	/// <summary>
	/// A simple object that contains several configuration settings in web.config.
	/// This entity is designed to be an updateable object whose properties can be changed and passed to the 
	/// <see cref="GalleryServerPro.Web.Controller.WebConfigController"/> for persisting back to the configuration file on disk.
	/// Therefore, this entity is typically used only in scenarios where we must persist changes to the config file, such as 
	/// in the Install Wizard.
	/// </summary>
	public class WebConfigEntity
	{
		private string _galleryServerProConfigSection = string.Empty;
		private bool _galleryServerProConfigSectionHasChanges;

		/// <summary>
		/// The name of SQL Server connection string in web.config.
		/// </summary>
		public const string SqlServerConnectionStringName = Constants.SQL_SERVER_CN_STRING_NAME;

		/// <summary>
		/// The name of SQLite connection string in web.config.
		/// </summary>
		public const string SQLiteConnectionStringName = Constants.SQLITE_CN_STRING_NAME;

		/// <summary>
		/// Gets the connection string named "SqlServerDbConnection" in the connectionStrings section of web.config.
		/// </summary>
		/// <value>The SQL Server database connection string.</value>
		public string SqlServerConnectionStringValue;

		/// <summary>
		/// Gets the connection string named "SQLiteDbConnection" in the connectionStrings section of web.config.
		/// </summary>
		/// <value>The SQLite database connection string.</value>
		public string SQLiteConnectionStringValue;

		/// <summary>
		/// Gets the data provider.
		/// </summary>
		public ProviderDataStore DataProvider = ProviderDataStore.Unknown;

		/// <summary>
		/// Gets the membership provider.
		/// </summary>
		public MembershipDataProvider MembershipDefaultProvider = MembershipDataProvider.Unknown;

		/// <summary>
		/// Gets the role provider.
		/// </summary>
		public RoleDataProvider RoleDefaultProvider = RoleDataProvider.Unknown;

		/// <summary>
		/// Gets the gallery data provider.
		/// </summary>
		public GalleryDataProvider GalleryDataDefaultProvider = GalleryDataProvider.Unknown;

		/// <summary>
		/// Gets a value indicating whether web.config is updateable.
		/// </summary>
		public bool IsWriteable;

		/// <summary>
		/// Gets or sets the galleryserverpro section in web.config.
		/// </summary>
		public string GalleryServerProConfigSection
		{
			get { return _galleryServerProConfigSection; }
			set
			{
				if (!_galleryServerProConfigSection.Equals(value))
				{
					_galleryServerProConfigSection = value;
					_galleryServerProConfigSectionHasChanges = true;
				}
			}
		}

		/// <summary>
		/// Gets a value indicating whether <see cref="GalleryServerProConfigSection" /> has a different value than what is
		/// in the web.config file.
		/// </summary>
		public bool GalleryServerProConfigSectionHasChanges
		{
			get { return _galleryServerProConfigSectionHasChanges; }
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer (Senior) Tech Info Systems
United States United States
I have nearly 20 years of industry experience in software development, architecture, and Microsoft Office products. My company Tech Info Systems provides custom software development services for corporations, governments, and other organizations. Tech Info Systems is a registered member of the Microsoft Partner Program and I am a Microsoft Certified Professional Developer (MCPD).

I am the creator and lead developer of Gallery Server Pro, a free, open source ASP.NET gallery for sharing photos, video, audio, documents, and other files over the web. It has been developed over several years and has involved thousands of hours. The end result is a robust, configurable, and professional grade gallery that can be integrated into your web site, whether you are a large corporation, small business, professional photographer, or a local church.

Comments and Discussions