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
-- ******** Sauvegarder une BD: ********** | |
-- syntaxe: | |
-- mysqldump -h {nom du serveur}.mysql.database.azure.com -u {nom d’utilisateur}@{nom du serveur} -p {nom de la BD} > {nom du fichier de sortie}.sql | |
-- exemple: | |
mysqldump -h demomysqlazureserver.mysql.database.azure.com -u tidjani@demomysqlazureserver -p employees > employees.sql | |
-- ******** Sauvegarder uniquement certaines BD du serveur MySQL ******** | |
-- syntaxe: | |
-- mysqldump -h {nom du serveur}.mysql.database.azure.com -u {nom d’utilisateur}@{nom du serveur} -p --databases {nom BD 1} {nom BD 2} > {nom du fichier de sortie}.sql |
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
-- ******** Connexion à ton serveur MySQL ******** | |
-- syntaxe: | |
-- mysql -h {nom du serveur MySQL}.mysql.database.azure.com -u {nom d’utilisateur}@{nom du serveur} -p | |
-- saisi ton mot de passe lorsque demandé | |
-- tu peux maintenant exécuter tes commandes (requêtes, restauration de BD, etc.) | |
-- exemple: | |
mysql -h demomysqlazureserver.mysql.database.azure.com -u tidjani@demomysqlazureserver -p | |
-- ******** Restaurer une BD depuis son backup ******** | |
-- syntaxe: |
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
app.UseOpenIdConnectAuthentication( | |
new OpenIdConnectAuthenticationOptions | |
{ | |
... | |
Notifications = new OpenIdConnectAuthenticationNotifications() | |
{ | |
// If there is a code in the OpenID Connect response, redeem it for an access token and refresh token, and store those away. | |
AuthorizationCodeReceived = (context) => | |
{ |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
... | |
<system.web> | |
<customErrors mode="Off"/> | |
... | |
</system.web> | |
... | |
</configuration> |
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 | |
{ | |
[Authorize] | |
public ActionResult Index() | |
{ | |
ViewBag.Message = "Vous êtes dans une zone sécurisée / You are in a restricted area"; | |
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
public class HomeController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
Trace.TraceInformation("AppServiceTracing :: inside of Home/Index"); | |
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
echo créer un groupe de ressources Azure | |
az group create --name shelldemo_RG --location canadaeast | |
echo créer un plan de service gratuit (requis pour créer une web app) | |
az appservice plan create --name shelldemo_SP --location canadaeast --sku F1 --resource-group shelldemo_RG | |
echo créer une web app via un Azure App Service avec le runtime Python 3.4 | |
az webapp create --name shelldemoweb --resource-group shelldemo_RG --plan shelldemo_SP --runtime "python|3.4" | |
echo ouvrir la web app dans le browser |
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]$NomVM, | |
[string]$NomGroupeRessources | |
) | |
# Authentification avec le compte de service Azure Run As | |
$Conn = Get-AutomationConnection -Name AzureRunAsConnection | |
Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID ` | |
-ApplicationID $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint | |
OlderNewer