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
| REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| REM This script must be run as Administrator | |
| REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| REM Create a CA Certificate and place it into Trusted Root Certificate authorities storage on local machine. | |
| makecert -n "CN=Development Root CA" -r -pe -a sha512 -len 4096 -cy authority -sr localmachine -ss Root -sk "Development Root CA" | |
| REM Create a dev Certificate and place it into Personal certificates on local machine. | |
| makecert -pe -n "CN=*.dev.local" -a sha512 -len 2048 -sky exchange -eku 1.3.6.1.5.5.7.3.1 -ir localmachine -is Root -in "Development Root CA" -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -sr localmachine -ss My -sk "*.dev.local" |
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
| /* | |
| * This work (Modern Encryption of a String C#, by James Tuley), | |
| * identified by James Tuley, is free of known copyright restrictions. | |
| * https://gist.github.com/4336842 | |
| * http://creativecommons.org/publicdomain/mark/1.0/ | |
| */ | |
| using System; | |
| using System.IO; | |
| using System.Text; |
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
| /// <summary> | |
| /// The multi assert. | |
| /// </summary> | |
| /// <remarks> | |
| /// Sometimes in order to test one logical concern you need to use | |
| /// multiple asserts. This class helps with that. | |
| /// </remarks> | |
| public static class MultiAssert | |
| { | |
| /// <summary> |
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 AntiForgeryTokenFilterProvider : IFilterProvider | |
| { | |
| public IEnumerable<Filter> GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor) | |
| { | |
| IEnumerable<FilterAttribute> filters = actionDescriptor.GetFilterAttributes(true); | |
| bool disableAntiForgery = filters.Any(f => f is DisableAntiForgeryCheckAttribute); | |
| string method = controllerContext.HttpContext.Request.HttpMethod; |
NewerOlder