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 AuthenticationController : Controller | |
{ | |
ILogger _Logger = NullLogger.Instance; | |
public AuthenticationController(ILoggerFactory loggerfactory) { | |
loggerfactory.Create(Loggers.Security); | |
} | |
[AllowAnonymous] | |
public ActionResult Index() |
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
private static void StartAzureDevelopmentStorage() { | |
const string processName = "DSServiceLDB.exe"; | |
bool isStorageRunning = Process.GetProcessesByName(processName).Any(); | |
string dir = typeof(BlobRepositoryTests).Assembly.CodeBase; | |
if (isStorageRunning) | |
{ | |
ProcessStartInfo start = new ProcessStartInfo | |
{ | |
Arguments = "/devstore:start", |
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 MyAuthenticationManager : ClaimsAuthenticationManager | |
{ | |
private readonly IWindsorContainer _container; | |
private readonly ILogger _logger; | |
public MyAuthenticationManager(IWindsorContainer container) | |
{ | |
_container = container; | |
_logger = _container.Resolve<ILoggerFactory>().Create(Loggers.Security); | |
} |
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
<system.webServer> | |
<staticContent> | |
<remove fileExtension=".woff"/> | |
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" /> | |
</staticContent> | |
</system.webServer> |
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
$.ajax({ | |
url: '@Url.Action("Tasks", "Inbox", new { area = string.Empty })', | |
data: { userId : '@MyPrincipal.Current.Id' }, | |
cache: false, | |
type: "GET", | |
success: function (data) { | |
$("#numberOfTaskListItems").html(data); | |
}, | |
dataType: "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
$.ajaxSetup({cache: false}}); |
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.Security.Claims; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace JelleBens.Common.Security | |
{ | |
public class MyPrincipal : ClaimsPrincipal |
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
@{ | |
Layout = "~/Views/Shared/_Layout.cshtml"; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>@ViewBag.Title - My ASP.NET Application</title> | |
@Styles.Render("~/Content/css") | |
@Scripts.Render("~/bundles/modernizr") | |
</head> | |
<body> |
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
body { | |
padding-top: 50px; | |
padding-bottom: 20px; | |
} | |
/* Set padding to keep content from hitting the edges */ | |
.body-content { | |
padding-left: 15px; | |
padding-right: 15px; | |
} |
OlderNewer