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
<h2>Create</h2> | |
@using(Html.BeginForm()){ | |
@Html.Partial("form"); | |
} |
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
Connect-MsolService |
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
$addresses = $principal.Addresses | |
$addresses.Add((New-MsolServicePrincipalAddresses -Address http://localhost:81)) | |
$addresses.Add((New-MsolServicePrincipalAddresses -Address http://my-deployment-endpoint.cloudapp.net)) | |
Set-MsolServicePrincipal -AppPrincipalId 3dc125e6-d518-40d2-9392-87a03dac8f68 -Addresses $addresses |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using Microsoft.WindowsAzure.ActiveDirectory.Authentication; | |
using WAADDemo.ActiveDirectoryGraph.Microsoft.WindowsAzure.ActiveDirectory; | |
namespace WAADDemo | |
{ | |
/// <summary> |
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
using System.Linq; | |
using System.Security.Claims; | |
using System.Web.Mvc; | |
namespace WAADDemo { | |
/// <summary> | |
/// This class uses <see cref="GraphClient"/> to read the AD security groups in which a given | |
/// <see cref="ClaimsPrincipal"/> is a direct member and then converts the memberships to group | |
/// claims. The group claims are then used to authorize user actions with <see cref="AuthorizeAttribute"/>. | |
/// </summary> |
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
$adPrincipal = Get-MsolServicePrincipal -AppPrincipalId 00000002-0000-0000-c000-000000000000 | |
$adPrincipal.ServicePrincipalNames.Add("00000002-0000-0000-c000-000000000000/Directoryapi.microsoftonline.com") | |
$adPrincipal.ServicePrincipalNames.Add("00000002-0000-0000-c000-000000000000/directory.windows.net") | |
$adPrincipal.ServicePrincipalNames.Add("00000002-0000-0000-c000-000000000000/directory_s1.windows.net") | |
$adPrincipal.ServicePrincipalNames.Add("00000002-0000-0000-c000-000000000000/directory_s2.windows.net") | |
$adPrincipal.ServicePrincipalNames.Add("00000002-0000-0000-c000-000000000000/directory_s3.windows.net") | |
$adPrincipal.ServicePrincipalNames.Add("00000002-0000-0000-c000-000000000000/directory_s4.windows.net") | |
$adPrincipal.ServicePrincipalNames.Add("00000002-0000-0000-c000-000000000000/directory_s5.windows.net") | |
$adPrincipal.ServicePrincipalNames.Add("00000002-0000-0000-c000-000000000000/graph.windows.net") |
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
var system = require('system'), | |
env = system.env; | |
/** | |
* Wait until the test condition is true or a timeout occurs. Useful for waiting | |
* on a server response or for a ui change (fadeIn, etc.) to occur. | |
* | |
* @param testFx javascript condition that evaluates to a boolean, | |
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or | |
* as a callback function. |
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
///<reference path="~/Scripts/angular.js"/> | |
///<reference path="~/Scripts/angular-mocks.js"/> | |
///<reference path="~/Scripts/test-module.js"/> | |
describe("Foo", function () { | |
// Whichever browser I select, this won't fire | |
// be it IE 11, Chrome 33, Firefox 25 | |
debugger; | |
beforeEach(function () { |
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 class SqlAzureClientDriverWithParameterSizeWorkaround : SqlAzureClientDriver { | |
protected override void InitializeParameter(IDbDataParameter dbParam, string name, SqlType sqlType) { | |
base.InitializeParameter(dbParam, name, sqlType); | |
if (sqlType.DbType == DbType.StringFixedLength && sqlType.LengthDefined && sqlType.Length == 1) { | |
dbParam.Size = 1; | |
} | |
} | |
} |
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 class DictionaryParameterSource : IParameterSource { | |
public DictionaryParameterSource(IDictionary<string, string> parameters) { | |
this.parameters = new Dictionary<string, string>(parameters); | |
} | |
public IDictionary<string, string> GetParameters() { | |
return this.parameters; | |
} | |
} |
OlderNewer