public static void MyClassInitialize(TestContext testContext)
        {
            Aspx451TestWebApplication = new IISTestWebApplication
            {
                AppName = "Aspx451",
                Port    = DeploymentAndValidationTools.Aspx451Port,
            };

            Aspx451TestWebApplicationWin32 = new IISTestWebApplication
            {
                AppName         = "Aspx451Win32",
                Port            = DeploymentAndValidationTools.Aspx451PortWin32,
                EnableWin32Mode = true,
            };

            DeploymentAndValidationTools.Initialize();

            AzureStorageHelper.Initialize();

            Aspx451TestWebApplication.Deploy();
            Aspx451TestWebApplicationWin32.Deploy();

            Trace.TraceInformation("IIS Restart begin.");
            Iis.Reset();
            Trace.TraceInformation("IIS Restart end.");


            Trace.TraceInformation("HttpTests class initialized");
        }
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);


            //AzureStorageHelper.Helpers.AzureStorageHelper.CreateOrGetContainer("filestorage");
            AzureStorageHelper.Initialize(
                ConfigurationManager.AppSettings["BlobStorageAccountPath"],
                ConfigurationManager.AppSettings["BlobStorageAccountName"],
                ConfigurationManager.AppSettings["BlobStorageAccountAuthKey"],
                ConfigurationManager.AppSettings["BlobStorageContainer"]);
        }
        public static void MyClassInitialize(TestContext testContext)
        {
            // this makes all traces have a timestamp so it's easier to troubleshoot timing issues
            // looking for the better approach...
            foreach (TraceListener listener in Trace.Listeners)
            {
                listener.TraceOutputOptions |= TraceOptions.DateTime;
            }
            sdkEventListener = new HttpListenerObservable(Aspx451FakeDataPlatformEndpoint);

            aspx451TestWebApplication.Deploy();
            aspx451TestWebApplicationWin32.Deploy(true);

            AzureStorageHelper.Initialize();

            LocalDb.CreateLocalDb("RDDTestDatabase", aspx451TestWebApplication.AppFolder + "\\TestDatabase.sql");

            if (DotNetVersionCheck.IsNet46Installed)
            {
                // .NET 4.6 onwards, there is no need of installing agent
                sourceExpected = DependencySourceType.Aic;
            }
            else
            {
                sourceExpected = DependencySourceType.Apmc;
                Installer.SetInternalUI(InstallUIOptions.Silent);
                string installerPath = ExecutionEnvironment.InstallerPath;
                try
                {
                    Installer.InstallProduct(installerPath, "ACTION=INSTALL ALLUSERS=1 MSIINSTALLPERUSER=1");
                }
                catch (Exception ex)
                {
                    Trace.TraceError("Agent installer not found. Agent is required for running tests for framework version below 4.6" + ex);
                    throw;
                }
            }

            Iis.Reset();
        }
        public static void MyClassInitialize(TestContext testContext)
        {
            DeploymentAndValidationTools.Initialize();

            AzureStorageHelper.Initialize();
        }