View web-asp-app-in-ase.template.json
This file contains 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
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"webAppName": { | |
"type": "string" | |
}, | |
"appServicePlanName": { | |
"type": "string" | |
}, |
View TransformOctopusConfig.ps1
This file contains 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
function transform($xml, $xdt, $output) | |
{ | |
Add-Type -LiteralPath "Microsoft.Web.XmlTransform.dll" | |
$xmldoc = New-Object Microsoft.Web.XmlTransform.XmlTransformableDocument; | |
$xmldoc.PreserveWhitespace = $true | |
$xmldoc.Load($xml); | |
$transform = New-Object Microsoft.Web.XmlTransform.XmlTransformation($xdt); | |
if ($transform.Apply($xmldoc) -eq $false) |
View AppFabricTracingWorkaround.cs
This file contains 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 PowershellExtensions | |
{ | |
public static Collection<PSObject> InvokeCommandAndRestoreDefaultTraceListener(this Pipeline pipeline) | |
{ | |
bool hasDefaultTraceListener = PowershellExtensions.IsDefaultTraceListenerPresent(); | |
Collection<PSObject> results = pipeline.Invoke(); | |
if(hasDefaultTraceListener && !PowershellExtensions.IsDefaultTraceListenerPresent()) | |
{ |
View AppFabricHatesTracing.cs
This file contains 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
InitialSessionState state = InitialSessionState.CreateDefault(); | |
state.ImportPSModule(new string[] { "DistributedCacheAdministration", "DistributedCacheConfiguration" }); | |
state.ThrowOnRunspaceOpenError = true; | |
using(Runspace rs = RunspaceFactory.CreateRunspace(state)) | |
{ | |
rs.Open(); | |
using(Pipeline pipeline = rs.CreatePipeline()) | |
{ |
View HandleAuthenticationDialogForIE_v2.cs
This file contains 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
// Add references to the following assemblies: | |
// System.Windows.Forms | |
// UIAutomationClient | |
// UIAutomationTypes | |
using System.Windows.Automation; | |
using System.Windows.Forms; | |
// Portions of code adapted from http://www.mathpirate.net/log/2009/09/27/swa-straight-outta-redmond/ | |
public static void HandleAuthenticationDialogForIE(string userName, string password) |
View HandleAuthenticationDialogForIE.cs
This file contains 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
// Add references to the following assemblies: | |
// System.Windows.Forms | |
// UIAutomationClient | |
// UIAutomationTypes | |
using System.Windows.Automation; | |
using System.Windows.Forms; | |
// Portions of code adapted from http://www.mathpirate.net/log/2009/09/27/swa-straight-outta-redmond/ | |
public static void HandleAuthenticationDialogForIE(string userName, string password) |