This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<rewrite> | |
<rules> | |
<rule name="Home Page-Expanded" stopProcessing="true"> | |
<match url="default.aspx" /> | |
<conditions> | |
<add input="{APP_WARMING_UP}" pattern="1" /> | |
</conditions> | |
<action type="Rewrite" url="Startup.htm" /> | |
</rule> | |
<rule name="Home Page-Short" stopProcessing="true"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /d/Repositories/BitBucket/SampleAzureWebSite | |
git init | |
git remote add origin https://[email protected]/sandrinodimattia/sampleazurewebsite.git | |
git add . | |
git commit -m "Initial commit" | |
git push origin master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomeController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
ViewBag.Message = "I'm going to commit this to my BitBucket repo."; | |
return View(); | |
} | |
public ActionResult About() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param([string]$ConnectionString = $(throw "The ConnectionString parameter is required."), | |
[string]$DatabaseName = $(throw "The DatabaseName parameter is required."), | |
[string]$InputFile = $(throw "The InputFile parameter is required."), | |
[string]$SqlInstallationFolder = "C:\Program Files (x86)\Microsoft SQL Server") | |
# Load DAC assembly. | |
$DacAssembly = "$SqlInstallationFolder\110\DAC\bin\Microsoft.SqlServer.Dac.dll" | |
Write-Host "Loading Dac Assembly: $DacAssembly" | |
Add-Type -Path $DacAssembly | |
Write-Host "Dac Assembly loaded." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param([string]$ConnectionString = $(throw "The ConnectionString parameter is required."), | |
[string]$DatabaseName = $(throw "The DatabaseName parameter is required."), | |
[string]$OutputFile = $(throw "The OutputFile parameter is required."), | |
[string]$SqlInstallationFolder = "C:\Program Files (x86)\Microsoft SQL Server") | |
# Load DAC assembly. | |
$DacAssembly = "$SqlInstallationFolder\110\DAC\bin\Microsoft.SqlServer.Dac.dll" | |
Write-Host "Loading Dac Assembly: $DacAssembly" | |
Add-Type -Path $DacAssembly | |
Write-Host "Dac Assembly loaded." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<profile defaultProvider="AzureProfileProvider"> | |
<providers> | |
<add name="AzureProfileProvider" type="UniversalProvidersWebRole.Security.AzureProfileProvider" | |
connectionStringName="UserDbConnectionString" applicationName="/" /> | |
</providers> | |
</profile> | |
<membership defaultProvider="AzureMembershipProvider"> | |
<providers> | |
<add name="AzureMembershipProvider" type="UniversalProvidersWebRole.Security.AzureMembershipProvider" | |
connectionStringName="UserDbConnectionString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AzureMembershipProvider : System.Web.Providers.DefaultMembershipProvider | |
{ | |
public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config) | |
{ | |
string connectionStringName = config["connectionStringName"]; | |
AzureProvidersHelper.UpdateConnectionString(connectionStringName, AzureProvidersHelper.GetRoleEnvironmentSetting(connectionStringName), | |
AzureProvidersHelper.GetRoleEnvironmentSetting(connectionStringName + "ProviderName")); | |
base.Initialize(name, config); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class AzureProvidersHelper | |
{ | |
internal static string GetRoleEnvironmentSetting(string settingName) | |
{ | |
try | |
{ | |
return RoleEnvironment.GetConfigurationSettingValue(settingName); | |
} | |
catch | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<membership defaultProvider="AzureMembershipProvider"> | |
<providers> | |
<add name="AzureMembershipProvider" type="UniversalProvidersWebRole.Security.AzureMembershipProvider" | |
connectionStringName="UserDbConnectionString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /> | |
</providers> | |
</membership> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AzureMembershipProvider : System.Web.Providers.DefaultMembershipProvider | |
{ | |
public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config) | |
{ | |
string connectionStringName = config["connectionStringName"]; | |
// Do something here... | |
base.Initialize(name, config); | |
} |