using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Security; using System.Web.SessionState; using Windows.Azure.Storage.Blobs; using System.Configuration; namespace PhotoStore_WebRole { public class Global : System.Web.HttpApplication { protected void Application_Start(object sender, EventArgs e) { LoadConnectionDetails(); } private void LoadConnectionDetails() { ConnectionDetails connectionDetails; string connectionType; try { connectionType = ConfigurationManager.AppSettings["ConnectionType"]; connectionDetails = new ConnectionDetails ( (BlobConnectionModes)Enum.Parse ( typeof(BlobConnectionModes), connectionType ) ); connectionDetails.Account = ConfigurationManager.AppSettings[String.Format("{0}_{1}", connectionType, "account")].ToString(); connectionDetails.Endpoint = ConfigurationManager.AppSettings[String.Format("{0}_{1}", connectionType, "endPoint")].ToString(); connectionDetails.Key = ConfigurationManager.AppSettings[String.Format("{0}_{1}", connectionType, "key")].ToString(); Application.Add("ConnectionDetails", connectionDetails); } catch { } } protected void Session_Start(object sender, EventArgs e) { } protected void Application_BeginRequest(object sender, EventArgs e) { } protected void Application_AuthenticateRequest(object sender, EventArgs e) { } protected void Application_Error(object sender, EventArgs e) { } protected void Session_End(object sender, EventArgs e) { } protected void Application_End(object sender, EventArgs e) { } } }