mirror of https://github.com/SixLabors/ImageSharp
Browse Source
Test memory stream disposal Former-commit-id: e6e3f207cd0b50972fd35e1ba197f5bb7cc36578af/merge-core
70 changed files with 90 additions and 9342 deletions
@ -1,409 +0,0 @@ |
|||
// --------------------------------------------------------------------------------------------------------------------
|
|||
// <copyright file="GifEncoder - Copy.cs" company="James South">
|
|||
// Copyright (c) James South.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
// --------------------------------------------------------------------------------------------------------------------
|
|||
|
|||
namespace ImageProcessor.Imaging |
|||
{ |
|||
#region
|
|||
|
|||
using System; |
|||
using System.Drawing; |
|||
using System.Drawing.Imaging; |
|||
using System.IO; |
|||
using System.Linq; |
|||
|
|||
#endregion
|
|||
|
|||
/// <summary>
|
|||
/// Encodes multiple images as an animated gif to a stream.
|
|||
/// <remarks>
|
|||
/// Always wire this up in a using block.
|
|||
/// Disposing the encoder will complete the file.
|
|||
/// Uses default .NET GIF encoding and adds animation headers.
|
|||
/// </remarks>
|
|||
/// </summary>
|
|||
/// <summary>
|
|||
/// Encodes multiple images as an animated gif to a stream. <br />
|
|||
/// ALWAYS ALWAYS ALWAYS wire this up in a using block <br />
|
|||
/// Disposing the encoder will complete the file. <br />
|
|||
/// Uses default .net GIF encoding and adds animation headers.
|
|||
/// </summary>
|
|||
public class GifEncoder2 : IDisposable |
|||
{ |
|||
#region Constants
|
|||
|
|||
/// <summary>
|
|||
/// The application block size.
|
|||
/// </summary>
|
|||
private const byte ApplicationBlockSize = 0x0b; |
|||
|
|||
/// <summary>
|
|||
/// The application extension block identifier.
|
|||
/// </summary>
|
|||
private const int ApplicationExtensionBlockIdentifier = 0xff21; |
|||
|
|||
/// <summary>
|
|||
/// The application identification.
|
|||
/// </summary>
|
|||
private const string ApplicationIdentification = "NETSCAPE2.0"; |
|||
|
|||
/// <summary>
|
|||
/// The file trailer.
|
|||
/// </summary>
|
|||
private const byte FileTrailer = 0x3b; |
|||
|
|||
/// <summary>
|
|||
/// The file type.
|
|||
/// </summary>
|
|||
private const string FileType = "GIF"; |
|||
|
|||
/// <summary>
|
|||
/// The file version.
|
|||
/// </summary>
|
|||
private const string FileVersion = "89a"; |
|||
|
|||
/// <summary>
|
|||
/// The graphic control extension block identifier.
|
|||
/// </summary>
|
|||
private const int GraphicControlExtensionBlockIdentifier = 0xf921; |
|||
|
|||
/// <summary>
|
|||
/// The graphic control extension block size.
|
|||
/// </summary>
|
|||
private const byte GraphicControlExtensionBlockSize = 0x04; |
|||
|
|||
/// <summary>
|
|||
/// The source color block length.
|
|||
/// </summary>
|
|||
private const long SourceColorBlockLength = 768; |
|||
|
|||
/// <summary>
|
|||
/// The source color block position.
|
|||
/// </summary>
|
|||
private const long SourceColorBlockPosition = 13; |
|||
|
|||
/// <summary>
|
|||
/// The source global color info position.
|
|||
/// </summary>
|
|||
private const long SourceGlobalColorInfoPosition = 10; |
|||
|
|||
/// <summary>
|
|||
/// The source graphic control extension length.
|
|||
/// </summary>
|
|||
private const long SourceGraphicControlExtensionLength = 8; |
|||
|
|||
/// <summary>
|
|||
/// The source graphic control extension position.
|
|||
/// </summary>
|
|||
private const long SourceGraphicControlExtensionPosition = 781; |
|||
|
|||
/// <summary>
|
|||
/// The source image block header length.
|
|||
/// </summary>
|
|||
private const long SourceImageBlockHeaderLength = 11; |
|||
|
|||
/// <summary>
|
|||
/// The source image block position.
|
|||
/// </summary>
|
|||
private const long SourceImageBlockPosition = 789; |
|||
|
|||
#endregion
|
|||
|
|||
#region Fields
|
|||
|
|||
/// <summary>
|
|||
/// The _stream.
|
|||
/// </summary>
|
|||
private readonly Stream _stream; |
|||
|
|||
/// <summary>
|
|||
/// The _height.
|
|||
/// </summary>
|
|||
private int? _height; |
|||
|
|||
/// <summary>
|
|||
/// The _is first image.
|
|||
/// </summary>
|
|||
private bool _isFirstImage = true; |
|||
|
|||
/// <summary>
|
|||
/// The _repeat count.
|
|||
/// </summary>
|
|||
private int? _repeatCount; |
|||
|
|||
/// <summary>
|
|||
/// The _width.
|
|||
/// </summary>
|
|||
private int? _width; |
|||
|
|||
#endregion
|
|||
|
|||
#region Constructors and Destructors
|
|||
|
|||
/// <summary>
|
|||
/// Initializes a new instance of the <see cref="GifEncoder2"/> class.
|
|||
/// Encodes multiple images as an animated gif to a stream. <br/>
|
|||
/// ALWAYS ALWAYS ALWAYS wire this in a using block <br/>
|
|||
/// Disposing the encoder will complete the file. <br/>
|
|||
/// Uses default .net GIF encoding and adds animation headers.
|
|||
/// </summary>
|
|||
/// <param name="stream">
|
|||
/// The stream that will be written to.
|
|||
/// </param>
|
|||
/// <param name="width">
|
|||
/// Sets the width for this gif or null to use the first frame's width.
|
|||
/// </param>
|
|||
/// <param name="height">
|
|||
/// Sets the height for this gif or null to use the first frame's height.
|
|||
/// </param>
|
|||
/// <param name="repeatCount">
|
|||
/// The repeat Count.
|
|||
/// </param>
|
|||
public GifEncoder2(Stream stream, int? width = null, int? height = null, int? repeatCount = null) |
|||
{ |
|||
this._stream = stream; |
|||
this._width = width; |
|||
this._height = height; |
|||
this._repeatCount = repeatCount; |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region Public Properties
|
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the frame delay.
|
|||
/// </summary>
|
|||
public TimeSpan FrameDelay { get; set; } |
|||
|
|||
#endregion
|
|||
|
|||
#region Public Methods and Operators
|
|||
|
|||
/// <summary>
|
|||
/// Adds a frame to this animation.
|
|||
/// </summary>
|
|||
/// <param name="img">
|
|||
/// The image to add
|
|||
/// </param>
|
|||
/// <param name="x">
|
|||
/// The positioning x offset this image should be displayed at.
|
|||
/// </param>
|
|||
/// <param name="y">
|
|||
/// The positioning y offset this image should be displayed at.
|
|||
/// </param>
|
|||
/// <param name="frameDelay">
|
|||
/// The frame Delay.
|
|||
/// </param>
|
|||
public void AddFrame(Image img, int x = 0, int y = 0, TimeSpan? frameDelay = null) |
|||
{ |
|||
using (var gifStream = new MemoryStream()) |
|||
{ |
|||
img.Save(gifStream, ImageFormat.Gif); |
|||
if (this._isFirstImage) |
|||
{ |
|||
// Steal the global color table info
|
|||
this.InitHeader(gifStream, img.Width, img.Height); |
|||
} |
|||
|
|||
this.WriteGraphicControlBlock(gifStream, frameDelay.GetValueOrDefault(this.FrameDelay)); |
|||
this.WriteImageBlock(gifStream, !this._isFirstImage, x, y, img.Width, img.Height); |
|||
} |
|||
|
|||
this._isFirstImage = false; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// The dispose.
|
|||
/// </summary>
|
|||
public void Dispose() |
|||
{ |
|||
// Complete Application Block
|
|||
this.WriteByte(0); |
|||
|
|||
// Complete File
|
|||
this.WriteByte(FileTrailer); |
|||
|
|||
// Pushing data
|
|||
this._stream.Flush(); |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region Methods
|
|||
|
|||
/// <summary>
|
|||
/// The init header.
|
|||
/// </summary>
|
|||
/// <param name="sourceGif">
|
|||
/// The source gif.
|
|||
/// </param>
|
|||
/// <param name="w">
|
|||
/// The w.
|
|||
/// </param>
|
|||
/// <param name="h">
|
|||
/// The h.
|
|||
/// </param>
|
|||
private void InitHeader(Stream sourceGif, int w, int h) |
|||
{ |
|||
// File Header
|
|||
this.WriteString(FileType); |
|||
this.WriteString(FileVersion); |
|||
this.WriteShort(this._width.GetValueOrDefault(w)); // Initial Logical Width
|
|||
this.WriteShort(this._height.GetValueOrDefault(h)); // Initial Logical Height
|
|||
sourceGif.Position = SourceGlobalColorInfoPosition; |
|||
this.WriteByte(sourceGif.ReadByte()); // Global Color Table Info
|
|||
this.WriteByte(0); // Background Color Index
|
|||
this.WriteByte(0); // Pixel aspect ratio
|
|||
this.WriteColorTable(sourceGif); |
|||
|
|||
// App Extension Header
|
|||
this.WriteShort(ApplicationExtensionBlockIdentifier); |
|||
this.WriteByte(ApplicationBlockSize); |
|||
this.WriteString(ApplicationIdentification); |
|||
this.WriteByte(3); // Application block length
|
|||
this.WriteByte(1); |
|||
this.WriteShort(this._repeatCount.GetValueOrDefault(0)); // Repeat count for images.
|
|||
this.WriteByte(0); // terminator
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// The write byte.
|
|||
/// </summary>
|
|||
/// <param name="value">
|
|||
/// The value.
|
|||
/// </param>
|
|||
private void WriteByte(int value) |
|||
{ |
|||
this._stream.WriteByte(Convert.ToByte(value)); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// The write color table.
|
|||
/// </summary>
|
|||
/// <param name="sourceGif">
|
|||
/// The source gif.
|
|||
/// </param>
|
|||
private void WriteColorTable(Stream sourceGif) |
|||
{ |
|||
sourceGif.Position = SourceColorBlockPosition; // Locating the image color table
|
|||
var colorTable = new byte[SourceColorBlockLength]; |
|||
sourceGif.Read(colorTable, 0, colorTable.Length); |
|||
this._stream.Write(colorTable, 0, colorTable.Length); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// The write graphic control block.
|
|||
/// </summary>
|
|||
/// <param name="sourceGif">
|
|||
/// The source gif.
|
|||
/// </param>
|
|||
/// <param name="frameDelay">
|
|||
/// The frame delay.
|
|||
/// </param>
|
|||
private void WriteGraphicControlBlock(Stream sourceGif, TimeSpan frameDelay) |
|||
{ |
|||
sourceGif.Position = SourceGraphicControlExtensionPosition; // Locating the source GCE
|
|||
var blockhead = new byte[SourceGraphicControlExtensionLength]; |
|||
sourceGif.Read(blockhead, 0, blockhead.Length); // Reading source GCE
|
|||
|
|||
this.WriteShort(GraphicControlExtensionBlockIdentifier); // Identifier
|
|||
this.WriteByte(GraphicControlExtensionBlockSize); // Block Size
|
|||
this.WriteByte(blockhead[3] & 0xf7 | 0x08); // Setting disposal flag
|
|||
this.WriteShort(Convert.ToInt32(frameDelay.TotalMilliseconds / 10)); // Setting frame delay
|
|||
this.WriteByte(blockhead[6]); // Transparent color index
|
|||
this.WriteByte(0); // Terminator
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// The write image block.
|
|||
/// </summary>
|
|||
/// <param name="sourceGif">
|
|||
/// The source gif.
|
|||
/// </param>
|
|||
/// <param name="includeColorTable">
|
|||
/// The include color table.
|
|||
/// </param>
|
|||
/// <param name="x">
|
|||
/// The x.
|
|||
/// </param>
|
|||
/// <param name="y">
|
|||
/// The y.
|
|||
/// </param>
|
|||
/// <param name="h">
|
|||
/// The h.
|
|||
/// </param>
|
|||
/// <param name="w">
|
|||
/// The w.
|
|||
/// </param>
|
|||
private void WriteImageBlock(Stream sourceGif, bool includeColorTable, int x, int y, int h, int w) |
|||
{ |
|||
sourceGif.Position = SourceImageBlockPosition; // Locating the image block
|
|||
var header = new byte[SourceImageBlockHeaderLength]; |
|||
sourceGif.Read(header, 0, header.Length); |
|||
this.WriteByte(header[0]); // Separator
|
|||
this.WriteShort(x); // Position X
|
|||
this.WriteShort(y); // Position Y
|
|||
this.WriteShort(h); // Height
|
|||
this.WriteShort(w); // Width
|
|||
|
|||
if (includeColorTable) |
|||
{ |
|||
// If first frame, use global color table - else use local
|
|||
sourceGif.Position = SourceGlobalColorInfoPosition; |
|||
this.WriteByte(sourceGif.ReadByte() & 0x3f | 0x80); // Enabling local color table
|
|||
this.WriteColorTable(sourceGif); |
|||
} |
|||
else |
|||
{ |
|||
this.WriteByte(header[9] & 0x07 | 0x07); // Disabling local color table
|
|||
} |
|||
|
|||
this.WriteByte(header[10]); // LZW Min Code Size
|
|||
|
|||
// Read/Write image data
|
|||
sourceGif.Position = SourceImageBlockPosition + SourceImageBlockHeaderLength; |
|||
|
|||
int dataLength = sourceGif.ReadByte(); |
|||
while (dataLength > 0) |
|||
{ |
|||
var imgData = new byte[dataLength]; |
|||
sourceGif.Read(imgData, 0, dataLength); |
|||
|
|||
this._stream.WriteByte(Convert.ToByte(dataLength)); |
|||
this._stream.Write(imgData, 0, dataLength); |
|||
dataLength = sourceGif.ReadByte(); |
|||
} |
|||
|
|||
this._stream.WriteByte(0); // Terminator
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// The write short.
|
|||
/// </summary>
|
|||
/// <param name="value">
|
|||
/// The value.
|
|||
/// </param>
|
|||
private void WriteShort(int value) |
|||
{ |
|||
this._stream.WriteByte(Convert.ToByte(value & 0xff)); |
|||
this._stream.WriteByte(Convert.ToByte((value >> 8) & 0xff)); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// The write string.
|
|||
/// </summary>
|
|||
/// <param name="value">
|
|||
/// The value.
|
|||
/// </param>
|
|||
private void WriteString(string value) |
|||
{ |
|||
this._stream.Write(value.ToArray().Select(c => (byte)c).ToArray(), 0, value.Length); |
|||
} |
|||
|
|||
#endregion
|
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
version https://git-lfs.github.com/spec/v1 |
|||
oid sha256:6212724b3e94908939823d0753b4307923b65d7a27f51823dd3ba7656543349c |
|||
size 22525 |
|||
@ -1,31 +0,0 @@ |
|||
using System.Web; |
|||
using System.Web.Optimization; |
|||
|
|||
namespace Test_Website_MVC5_NET45 |
|||
{ |
|||
public class BundleConfig |
|||
{ |
|||
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
|
|||
public static void RegisterBundles(BundleCollection bundles) |
|||
{ |
|||
bundles.Add(new ScriptBundle("~/bundles/jquery").Include( |
|||
"~/Scripts/jquery-{version}.js")); |
|||
|
|||
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( |
|||
"~/Scripts/jquery.validate*")); |
|||
|
|||
// Use the development version of Modernizr to develop with and learn from. Then, when you're
|
|||
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
|
|||
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( |
|||
"~/Scripts/modernizr-*")); |
|||
|
|||
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( |
|||
"~/Scripts/bootstrap.js", |
|||
"~/Scripts/respond.js")); |
|||
|
|||
bundles.Add(new StyleBundle("~/Content/css").Include( |
|||
"~/Content/bootstrap.css", |
|||
"~/Content/site.css")); |
|||
} |
|||
} |
|||
} |
|||
@ -1,13 +0,0 @@ |
|||
using System.Web; |
|||
using System.Web.Mvc; |
|||
|
|||
namespace Test_Website_MVC5_NET45 |
|||
{ |
|||
public class FilterConfig |
|||
{ |
|||
public static void RegisterGlobalFilters(GlobalFilterCollection filters) |
|||
{ |
|||
filters.Add(new HandleErrorAttribute()); |
|||
} |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.Mvc; |
|||
using System.Web.Routing; |
|||
|
|||
namespace Test_Website_MVC5_NET45 |
|||
{ |
|||
public class RouteConfig |
|||
{ |
|||
public static void RegisterRoutes(RouteCollection routes) |
|||
{ |
|||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); |
|||
|
|||
routes.MapRoute( |
|||
name: "Default", |
|||
url: "{controller}/{action}/{id}", |
|||
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } |
|||
); |
|||
} |
|||
} |
|||
} |
|||
@ -1,38 +0,0 @@ |
|||
using Microsoft.AspNet.Identity; |
|||
using Microsoft.Owin; |
|||
using Microsoft.Owin.Security.Cookies; |
|||
using Owin; |
|||
|
|||
namespace Test_Website_MVC5_NET45 |
|||
{ |
|||
public partial class Startup |
|||
{ |
|||
// For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
|
|||
public void ConfigureAuth(IAppBuilder app) |
|||
{ |
|||
// Enable the application to use a cookie to store information for the signed in user
|
|||
app.UseCookieAuthentication(new CookieAuthenticationOptions |
|||
{ |
|||
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, |
|||
LoginPath = new PathString("/Account/Login") |
|||
}); |
|||
// Use a cookie to temporarily store information about a user logging in with a third party login provider
|
|||
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); |
|||
|
|||
// Uncomment the following lines to enable logging in with third party login providers
|
|||
//app.UseMicrosoftAccountAuthentication(
|
|||
// clientId: "",
|
|||
// clientSecret: "");
|
|||
|
|||
//app.UseTwitterAuthentication(
|
|||
// consumerKey: "",
|
|||
// consumerSecret: "");
|
|||
|
|||
//app.UseFacebookAuthentication(
|
|||
// appId: "",
|
|||
// appSecret: "");
|
|||
|
|||
//app.UseGoogleAuthentication();
|
|||
} |
|||
} |
|||
} |
|||
@ -1,42 +0,0 @@ |
|||
body { |
|||
padding-top: 50px; |
|||
padding-bottom: 20px; |
|||
} |
|||
|
|||
/* Set padding to keep content from hitting the edges */ |
|||
.body-content { |
|||
padding-left: 15px; |
|||
padding-right: 15px; |
|||
} |
|||
|
|||
/* Set width on the form input elements since they're 100% wide by default */ |
|||
input, |
|||
select, |
|||
textarea { |
|||
max-width: 280px; |
|||
} |
|||
|
|||
/* styles for validation helpers */ |
|||
.field-validation-error { |
|||
color: #b94a48; |
|||
} |
|||
|
|||
.field-validation-valid { |
|||
display: none; |
|||
} |
|||
|
|||
input.input-validation-error { |
|||
border: 1px solid #b94a48; |
|||
} |
|||
|
|||
input[type="checkbox"].input-validation-error { |
|||
border: 0 none; |
|||
} |
|||
|
|||
.validation-summary-errors { |
|||
color: #b94a48; |
|||
} |
|||
|
|||
.validation-summary-valid { |
|||
display: none; |
|||
} |
|||
@ -1 +0,0 @@ |
|||
6d6e68281ddecfe6611fbb2c9f79306e69359cab |
|||
@ -1 +0,0 @@ |
|||
df89a5030f2192f2efc2eef1e625b588903b735e |
|||
@ -1,408 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Security.Claims; |
|||
using System.Threading.Tasks; |
|||
using System.Web; |
|||
using System.Web.Mvc; |
|||
using Microsoft.AspNet.Identity; |
|||
using Microsoft.AspNet.Identity.EntityFramework; |
|||
using Microsoft.Owin.Security; |
|||
using Test_Website_MVC5_NET45.Models; |
|||
|
|||
namespace Test_Website_MVC5_NET45.Controllers |
|||
{ |
|||
[Authorize] |
|||
public class AccountController : Controller |
|||
{ |
|||
public AccountController() |
|||
: this(new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext()))) |
|||
{ |
|||
} |
|||
|
|||
public AccountController(UserManager<ApplicationUser> userManager) |
|||
{ |
|||
UserManager = userManager; |
|||
} |
|||
|
|||
public UserManager<ApplicationUser> UserManager { get; private set; } |
|||
|
|||
//
|
|||
// GET: /Account/Login
|
|||
[AllowAnonymous] |
|||
public ActionResult Login(string returnUrl) |
|||
{ |
|||
ViewBag.ReturnUrl = returnUrl; |
|||
return View(); |
|||
} |
|||
|
|||
//
|
|||
// POST: /Account/Login
|
|||
[HttpPost] |
|||
[AllowAnonymous] |
|||
[ValidateAntiForgeryToken] |
|||
public async Task<ActionResult> Login(LoginViewModel model, string returnUrl) |
|||
{ |
|||
if (ModelState.IsValid) |
|||
{ |
|||
var user = await UserManager.FindAsync(model.UserName, model.Password); |
|||
if (user != null) |
|||
{ |
|||
await SignInAsync(user, model.RememberMe); |
|||
return RedirectToLocal(returnUrl); |
|||
} |
|||
else |
|||
{ |
|||
ModelState.AddModelError("", "Invalid username or password."); |
|||
} |
|||
} |
|||
|
|||
// If we got this far, something failed, redisplay form
|
|||
return View(model); |
|||
} |
|||
|
|||
//
|
|||
// GET: /Account/Register
|
|||
[AllowAnonymous] |
|||
public ActionResult Register() |
|||
{ |
|||
return View(); |
|||
} |
|||
|
|||
//
|
|||
// POST: /Account/Register
|
|||
[HttpPost] |
|||
[AllowAnonymous] |
|||
[ValidateAntiForgeryToken] |
|||
public async Task<ActionResult> Register(RegisterViewModel model) |
|||
{ |
|||
if (ModelState.IsValid) |
|||
{ |
|||
var user = new ApplicationUser() { UserName = model.UserName }; |
|||
var result = await UserManager.CreateAsync(user, model.Password); |
|||
if (result.Succeeded) |
|||
{ |
|||
await SignInAsync(user, isPersistent: false); |
|||
return RedirectToAction("Index", "Home"); |
|||
} |
|||
else |
|||
{ |
|||
AddErrors(result); |
|||
} |
|||
} |
|||
|
|||
// If we got this far, something failed, redisplay form
|
|||
return View(model); |
|||
} |
|||
|
|||
//
|
|||
// POST: /Account/Disassociate
|
|||
[HttpPost] |
|||
[ValidateAntiForgeryToken] |
|||
public async Task<ActionResult> Disassociate(string loginProvider, string providerKey) |
|||
{ |
|||
ManageMessageId? message = null; |
|||
IdentityResult result = await UserManager.RemoveLoginAsync(User.Identity.GetUserId(), new UserLoginInfo(loginProvider, providerKey)); |
|||
if (result.Succeeded) |
|||
{ |
|||
message = ManageMessageId.RemoveLoginSuccess; |
|||
} |
|||
else |
|||
{ |
|||
message = ManageMessageId.Error; |
|||
} |
|||
return RedirectToAction("Manage", new { Message = message }); |
|||
} |
|||
|
|||
//
|
|||
// GET: /Account/Manage
|
|||
public ActionResult Manage(ManageMessageId? message) |
|||
{ |
|||
ViewBag.StatusMessage = |
|||
message == ManageMessageId.ChangePasswordSuccess ? "Your password has been changed." |
|||
: message == ManageMessageId.SetPasswordSuccess ? "Your password has been set." |
|||
: message == ManageMessageId.RemoveLoginSuccess ? "The external login was removed." |
|||
: message == ManageMessageId.Error ? "An error has occurred." |
|||
: ""; |
|||
ViewBag.HasLocalPassword = HasPassword(); |
|||
ViewBag.ReturnUrl = Url.Action("Manage"); |
|||
return View(); |
|||
} |
|||
|
|||
//
|
|||
// POST: /Account/Manage
|
|||
[HttpPost] |
|||
[ValidateAntiForgeryToken] |
|||
public async Task<ActionResult> Manage(ManageUserViewModel model) |
|||
{ |
|||
bool hasPassword = HasPassword(); |
|||
ViewBag.HasLocalPassword = hasPassword; |
|||
ViewBag.ReturnUrl = Url.Action("Manage"); |
|||
if (hasPassword) |
|||
{ |
|||
if (ModelState.IsValid) |
|||
{ |
|||
IdentityResult result = await UserManager.ChangePasswordAsync(User.Identity.GetUserId(), model.OldPassword, model.NewPassword); |
|||
if (result.Succeeded) |
|||
{ |
|||
return RedirectToAction("Manage", new { Message = ManageMessageId.ChangePasswordSuccess }); |
|||
} |
|||
else |
|||
{ |
|||
AddErrors(result); |
|||
} |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
// User does not have a password so remove any validation errors caused by a missing OldPassword field
|
|||
ModelState state = ModelState["OldPassword"]; |
|||
if (state != null) |
|||
{ |
|||
state.Errors.Clear(); |
|||
} |
|||
|
|||
if (ModelState.IsValid) |
|||
{ |
|||
IdentityResult result = await UserManager.AddPasswordAsync(User.Identity.GetUserId(), model.NewPassword); |
|||
if (result.Succeeded) |
|||
{ |
|||
return RedirectToAction("Manage", new { Message = ManageMessageId.SetPasswordSuccess }); |
|||
} |
|||
else |
|||
{ |
|||
AddErrors(result); |
|||
} |
|||
} |
|||
} |
|||
|
|||
// If we got this far, something failed, redisplay form
|
|||
return View(model); |
|||
} |
|||
|
|||
//
|
|||
// POST: /Account/ExternalLogin
|
|||
[HttpPost] |
|||
[AllowAnonymous] |
|||
[ValidateAntiForgeryToken] |
|||
public ActionResult ExternalLogin(string provider, string returnUrl) |
|||
{ |
|||
// Request a redirect to the external login provider
|
|||
return new ChallengeResult(provider, Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = returnUrl })); |
|||
} |
|||
|
|||
//
|
|||
// GET: /Account/ExternalLoginCallback
|
|||
[AllowAnonymous] |
|||
public async Task<ActionResult> ExternalLoginCallback(string returnUrl) |
|||
{ |
|||
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync(); |
|||
if (loginInfo == null) |
|||
{ |
|||
return RedirectToAction("Login"); |
|||
} |
|||
|
|||
// Sign in the user with this external login provider if the user already has a login
|
|||
var user = await UserManager.FindAsync(loginInfo.Login); |
|||
if (user != null) |
|||
{ |
|||
await SignInAsync(user, isPersistent: false); |
|||
return RedirectToLocal(returnUrl); |
|||
} |
|||
else |
|||
{ |
|||
// If the user does not have an account, then prompt the user to create an account
|
|||
ViewBag.ReturnUrl = returnUrl; |
|||
ViewBag.LoginProvider = loginInfo.Login.LoginProvider; |
|||
return View("ExternalLoginConfirmation", new ExternalLoginConfirmationViewModel { UserName = loginInfo.DefaultUserName }); |
|||
} |
|||
} |
|||
|
|||
//
|
|||
// POST: /Account/LinkLogin
|
|||
[HttpPost] |
|||
[ValidateAntiForgeryToken] |
|||
public ActionResult LinkLogin(string provider) |
|||
{ |
|||
// Request a redirect to the external login provider to link a login for the current user
|
|||
return new ChallengeResult(provider, Url.Action("LinkLoginCallback", "Account"), User.Identity.GetUserId()); |
|||
} |
|||
|
|||
//
|
|||
// GET: /Account/LinkLoginCallback
|
|||
public async Task<ActionResult> LinkLoginCallback() |
|||
{ |
|||
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync(XsrfKey, User.Identity.GetUserId()); |
|||
if (loginInfo == null) |
|||
{ |
|||
return RedirectToAction("Manage", new { Message = ManageMessageId.Error }); |
|||
} |
|||
var result = await UserManager.AddLoginAsync(User.Identity.GetUserId(), loginInfo.Login); |
|||
if (result.Succeeded) |
|||
{ |
|||
return RedirectToAction("Manage"); |
|||
} |
|||
return RedirectToAction("Manage", new { Message = ManageMessageId.Error }); |
|||
} |
|||
|
|||
//
|
|||
// POST: /Account/ExternalLoginConfirmation
|
|||
[HttpPost] |
|||
[AllowAnonymous] |
|||
[ValidateAntiForgeryToken] |
|||
public async Task<ActionResult> ExternalLoginConfirmation(ExternalLoginConfirmationViewModel model, string returnUrl) |
|||
{ |
|||
if (User.Identity.IsAuthenticated) |
|||
{ |
|||
return RedirectToAction("Manage"); |
|||
} |
|||
|
|||
if (ModelState.IsValid) |
|||
{ |
|||
// Get the information about the user from the external login provider
|
|||
var info = await AuthenticationManager.GetExternalLoginInfoAsync(); |
|||
if (info == null) |
|||
{ |
|||
return View("ExternalLoginFailure"); |
|||
} |
|||
var user = new ApplicationUser() { UserName = model.UserName }; |
|||
var result = await UserManager.CreateAsync(user); |
|||
if (result.Succeeded) |
|||
{ |
|||
result = await UserManager.AddLoginAsync(user.Id, info.Login); |
|||
if (result.Succeeded) |
|||
{ |
|||
await SignInAsync(user, isPersistent: false); |
|||
return RedirectToLocal(returnUrl); |
|||
} |
|||
} |
|||
AddErrors(result); |
|||
} |
|||
|
|||
ViewBag.ReturnUrl = returnUrl; |
|||
return View(model); |
|||
} |
|||
|
|||
//
|
|||
// POST: /Account/LogOff
|
|||
[HttpPost] |
|||
[ValidateAntiForgeryToken] |
|||
public ActionResult LogOff() |
|||
{ |
|||
AuthenticationManager.SignOut(); |
|||
return RedirectToAction("Index", "Home"); |
|||
} |
|||
|
|||
//
|
|||
// GET: /Account/ExternalLoginFailure
|
|||
[AllowAnonymous] |
|||
public ActionResult ExternalLoginFailure() |
|||
{ |
|||
return View(); |
|||
} |
|||
|
|||
[ChildActionOnly] |
|||
public ActionResult RemoveAccountList() |
|||
{ |
|||
var linkedAccounts = UserManager.GetLogins(User.Identity.GetUserId()); |
|||
ViewBag.ShowRemoveButton = HasPassword() || linkedAccounts.Count > 1; |
|||
return (ActionResult)PartialView("_RemoveAccountPartial", linkedAccounts); |
|||
} |
|||
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && UserManager != null) |
|||
{ |
|||
UserManager.Dispose(); |
|||
UserManager = null; |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Helpers
|
|||
// Used for XSRF protection when adding external logins
|
|||
private const string XsrfKey = "XsrfId"; |
|||
|
|||
private IAuthenticationManager AuthenticationManager |
|||
{ |
|||
get |
|||
{ |
|||
return HttpContext.GetOwinContext().Authentication; |
|||
} |
|||
} |
|||
|
|||
private async Task SignInAsync(ApplicationUser user, bool isPersistent) |
|||
{ |
|||
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie); |
|||
var identity = await UserManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie); |
|||
AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity); |
|||
} |
|||
|
|||
private void AddErrors(IdentityResult result) |
|||
{ |
|||
foreach (var error in result.Errors) |
|||
{ |
|||
ModelState.AddModelError("", error); |
|||
} |
|||
} |
|||
|
|||
private bool HasPassword() |
|||
{ |
|||
var user = UserManager.FindById(User.Identity.GetUserId()); |
|||
if (user != null) |
|||
{ |
|||
return user.PasswordHash != null; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
public enum ManageMessageId |
|||
{ |
|||
ChangePasswordSuccess, |
|||
SetPasswordSuccess, |
|||
RemoveLoginSuccess, |
|||
Error |
|||
} |
|||
|
|||
private ActionResult RedirectToLocal(string returnUrl) |
|||
{ |
|||
if (Url.IsLocalUrl(returnUrl)) |
|||
{ |
|||
return Redirect(returnUrl); |
|||
} |
|||
else |
|||
{ |
|||
return RedirectToAction("Index", "Home"); |
|||
} |
|||
} |
|||
|
|||
private class ChallengeResult : HttpUnauthorizedResult |
|||
{ |
|||
public ChallengeResult(string provider, string redirectUri) : this(provider, redirectUri, null) |
|||
{ |
|||
} |
|||
|
|||
public ChallengeResult(string provider, string redirectUri, string userId) |
|||
{ |
|||
LoginProvider = provider; |
|||
RedirectUri = redirectUri; |
|||
UserId = userId; |
|||
} |
|||
|
|||
public string LoginProvider { get; set; } |
|||
public string RedirectUri { get; set; } |
|||
public string UserId { get; set; } |
|||
|
|||
public override void ExecuteResult(ControllerContext context) |
|||
{ |
|||
var properties = new AuthenticationProperties() { RedirectUri = RedirectUri }; |
|||
if (UserId != null) |
|||
{ |
|||
properties.Dictionary[XsrfKey] = UserId; |
|||
} |
|||
context.HttpContext.GetOwinContext().Authentication.Challenge(properties, LoginProvider); |
|||
} |
|||
} |
|||
#endregion
|
|||
} |
|||
} |
|||
@ -1,30 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.Mvc; |
|||
|
|||
namespace Test_Website_MVC5_NET45.Controllers |
|||
{ |
|||
public class HomeController : Controller |
|||
{ |
|||
public ActionResult Index() |
|||
{ |
|||
return View(); |
|||
} |
|||
|
|||
public ActionResult About() |
|||
{ |
|||
ViewBag.Message = "Your application description page."; |
|||
|
|||
return View(); |
|||
} |
|||
|
|||
public ActionResult Contact() |
|||
{ |
|||
ViewBag.Message = "Your contact page."; |
|||
|
|||
return View(); |
|||
} |
|||
} |
|||
} |
|||
@ -1 +0,0 @@ |
|||
<%@ Application Codebehind="Global.asax.cs" Inherits="Test_Website_MVC5_NET45.MvcApplication" Language="C#" %> |
|||
@ -1,21 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.Mvc; |
|||
using System.Web.Optimization; |
|||
using System.Web.Routing; |
|||
|
|||
namespace Test_Website_MVC5_NET45 |
|||
{ |
|||
public class MvcApplication : System.Web.HttpApplication |
|||
{ |
|||
protected void Application_Start() |
|||
{ |
|||
AreaRegistration.RegisterAllAreas(); |
|||
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); |
|||
RouteConfig.RegisterRoutes(RouteTable.Routes); |
|||
BundleConfig.RegisterBundles(BundleTable.Bundles); |
|||
} |
|||
} |
|||
} |
|||
@ -1,63 +0,0 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Test_Website_MVC5_NET45.Models |
|||
{ |
|||
public class ExternalLoginConfirmationViewModel |
|||
{ |
|||
[Required] |
|||
[Display(Name = "User name")] |
|||
public string UserName { get; set; } |
|||
} |
|||
|
|||
public class ManageUserViewModel |
|||
{ |
|||
[Required] |
|||
[DataType(DataType.Password)] |
|||
[Display(Name = "Current password")] |
|||
public string OldPassword { get; set; } |
|||
|
|||
[Required] |
|||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] |
|||
[DataType(DataType.Password)] |
|||
[Display(Name = "New password")] |
|||
public string NewPassword { get; set; } |
|||
|
|||
[DataType(DataType.Password)] |
|||
[Display(Name = "Confirm new password")] |
|||
[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] |
|||
public string ConfirmPassword { get; set; } |
|||
} |
|||
|
|||
public class LoginViewModel |
|||
{ |
|||
[Required] |
|||
[Display(Name = "User name")] |
|||
public string UserName { get; set; } |
|||
|
|||
[Required] |
|||
[DataType(DataType.Password)] |
|||
[Display(Name = "Password")] |
|||
public string Password { get; set; } |
|||
|
|||
[Display(Name = "Remember me?")] |
|||
public bool RememberMe { get; set; } |
|||
} |
|||
|
|||
public class RegisterViewModel |
|||
{ |
|||
[Required] |
|||
[Display(Name = "User name")] |
|||
public string UserName { get; set; } |
|||
|
|||
[Required] |
|||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] |
|||
[DataType(DataType.Password)] |
|||
[Display(Name = "Password")] |
|||
public string Password { get; set; } |
|||
|
|||
[DataType(DataType.Password)] |
|||
[Display(Name = "Confirm password")] |
|||
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] |
|||
public string ConfirmPassword { get; set; } |
|||
} |
|||
} |
|||
@ -1,17 +0,0 @@ |
|||
using Microsoft.AspNet.Identity.EntityFramework; |
|||
|
|||
namespace Test_Website_MVC5_NET45.Models |
|||
{ |
|||
// You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
|
|||
public class ApplicationUser : IdentityUser |
|||
{ |
|||
} |
|||
|
|||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser> |
|||
{ |
|||
public ApplicationDbContext() |
|||
: base("DefaultConnection") |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
@ -1,151 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset="utf-8" /> |
|||
<title>Your ASP.NET application</title> |
|||
<style> |
|||
body { |
|||
background: #fff; |
|||
color: #505050; |
|||
font: 14px 'Segoe UI', tahoma, arial, helvetica, sans-serif; |
|||
margin: 20px; |
|||
padding: 0; |
|||
} |
|||
|
|||
#header { |
|||
background: #efefef; |
|||
padding: 0; |
|||
} |
|||
|
|||
h1 { |
|||
font-size: 48px; |
|||
font-weight: normal; |
|||
margin: 0; |
|||
padding: 0 30px; |
|||
line-height: 150px; |
|||
} |
|||
|
|||
p { |
|||
font-size: 20px; |
|||
color: #fff; |
|||
background: #969696; |
|||
padding: 0 30px; |
|||
line-height: 50px; |
|||
} |
|||
|
|||
#main { |
|||
padding: 5px 30px; |
|||
} |
|||
|
|||
.section { |
|||
width: 21.7%; |
|||
float: left; |
|||
margin: 0 0 0 4%; |
|||
} |
|||
|
|||
.section h2 { |
|||
font-size: 13px; |
|||
text-transform: uppercase; |
|||
margin: 0; |
|||
border-bottom: 1px solid silver; |
|||
padding-bottom: 12px; |
|||
margin-bottom: 8px; |
|||
} |
|||
|
|||
.section.first { |
|||
margin-left: 0; |
|||
} |
|||
|
|||
.section.first h2 { |
|||
font-size: 24px; |
|||
text-transform: none; |
|||
margin-bottom: 25px; |
|||
border: none; |
|||
} |
|||
|
|||
.section.first li { |
|||
border-top: 1px solid silver; |
|||
padding: 8px 0; |
|||
} |
|||
|
|||
.section.last { |
|||
margin-right: 0; |
|||
} |
|||
|
|||
ul { |
|||
list-style: none; |
|||
padding: 0; |
|||
margin: 0; |
|||
line-height: 20px; |
|||
} |
|||
|
|||
li { |
|||
padding: 4px 0; |
|||
} |
|||
|
|||
a { |
|||
color: #267cb2; |
|||
text-decoration: none; |
|||
} |
|||
|
|||
a:hover { |
|||
text-decoration: underline; |
|||
} |
|||
</style> |
|||
</head> |
|||
<body> |
|||
|
|||
<div id="header"> |
|||
<h1>Your ASP.NET application</h1> |
|||
<p>Congratulations! You've created a project</p> |
|||
</div> |
|||
|
|||
<div id="main"> |
|||
<div class="section first"> |
|||
<h2>This application consists of:</h2> |
|||
<ul> |
|||
<li>Sample pages showing basic nav between Home, About, and Contact</li> |
|||
<li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=320754">Bootstrap</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320755">Authentication</a>, if selected, shows how to register and sign in</li> |
|||
<li>ASP.NET features managed using <a href="http://go.microsoft.com/fwlink/?LinkID=320756">NuGet</a></li> |
|||
</ul> |
|||
</div> |
|||
|
|||
<div class="section"> |
|||
<h2>Customize app</h2> |
|||
<ul> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320757">Get started with ASP.NET MVC</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320758">Change the site's theme</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320759">Add more libraries using NuGet</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320760">Configure authentication</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320761">Customize information about the website users</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320762">Get information from social providers</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320763">Add HTTP services using ASP.NET Web API</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320764">Secure your web API</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320765">Add real-time web with ASP.NET SignalR</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320766">Add components using Scaffolding</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320767">Test your app with Browser Link</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320768">Share your project</a></li> |
|||
</ul> |
|||
</div> |
|||
|
|||
<div class="section"> |
|||
<h2>Deploy</h2> |
|||
<ul> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320769">Ensure your app is ready for production</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320770">Windows Azure</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320771">Hosting providers</a></li> |
|||
</ul> |
|||
</div> |
|||
|
|||
<div class="section last"> |
|||
<h2>Get help</h2> |
|||
<ul> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320772">Get help</a></li> |
|||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=320773">Get more templates</a></li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -1,35 +0,0 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// General Information about an assembly is controlled through the following
|
|||
// set of attributes. Change these attribute values to modify the information
|
|||
// associated with an assembly.
|
|||
[assembly: AssemblyTitle("Test_Website_MVC5_NET45")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("Test_Website_MVC5_NET45")] |
|||
[assembly: AssemblyCopyright("Copyright © 2014")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// Setting ComVisible to false makes the types in this assembly not visible
|
|||
// to COM components. If you need to access a type in this assembly from
|
|||
// COM, set the ComVisible attribute to true on that type.
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|||
[assembly: Guid("b611b339-de6d-4308-a532-79f2749956d3")] |
|||
|
|||
// Version information for an assembly consists of the following four values:
|
|||
//
|
|||
// Major Version
|
|||
// Minor Version
|
|||
// Build Number
|
|||
// Revision
|
|||
//
|
|||
// You can specify all the values or you can default the Revision and Build Numbers
|
|||
// by using the '*' as shown below:
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
Binary file not shown.
File diff suppressed because it is too large
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@ |
|||
f1d83254a61cd188d6e8a08ad2156cb36174f22a |
|||
@ -1 +0,0 @@ |
|||
d3e121b8602e2bfbed5d2b1fa960d09b8e7bf153 |
|||
@ -1 +0,0 @@ |
|||
51aa758be2e7711b065030a454c2685cca2b1ccf |
|||
@ -1 +0,0 @@ |
|||
4dc4920bb828e8bfb5f7efc8f4c074af9e2784ab |
|||
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because one or more lines are too long
@ -1,344 +0,0 @@ |
|||
/* NUGET: BEGIN LICENSE TEXT |
|||
* |
|||
* Microsoft grants you the right to use these script files for the sole |
|||
* purpose of either: (i) interacting through your browser with the Microsoft |
|||
* website or online service, subject to the applicable licensing or use |
|||
* terms; or (ii) using the files as included with a Microsoft product subject |
|||
* to that product's license terms. Microsoft reserves all other rights to the |
|||
* files not expressly granted by Microsoft, whether by implication, estoppel |
|||
* or otherwise. Insofar as a script file is dual licensed under GPL, |
|||
* Microsoft neither took the code under GPL nor distributes it thereunder but |
|||
* under the terms set out in this paragraph. All notices and licenses |
|||
* below are for informational purposes only. |
|||
* |
|||
* NUGET: END LICENSE TEXT */ |
|||
/*! |
|||
** Unobtrusive validation support library for jQuery and jQuery Validate |
|||
** Copyright (C) Microsoft Corporation. All rights reserved. |
|||
*/ |
|||
/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */ |
|||
/*global document: false, jQuery: false */ |
|||
(function ($) { |
|||
var $jQval = $.validator, |
|||
adapters, |
|||
data_validation = "unobtrusiveValidation"; |
|||
function setValidationValues(options, ruleName, value) { |
|||
options.rules[ruleName] = value; |
|||
if (options.message) { |
|||
options.messages[ruleName] = options.message; |
|||
} |
|||
} |
|||
function splitAndTrim(value) { |
|||
return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g); |
|||
} |
|||
function escapeAttributeValue(value) { |
|||
// As mentioned on http://api.jquery.com/category/selectors/
|
|||
return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1"); |
|||
} |
|||
function getModelPrefix(fieldName) { |
|||
return fieldName.substr(0, fieldName.lastIndexOf(".") + 1); |
|||
} |
|||
function appendModelPrefix(value, prefix) { |
|||
if (value.indexOf("*.") === 0) { |
|||
value = value.replace("*.", prefix); |
|||
} |
|||
return value; |
|||
} |
|||
function onError(error, inputElement) { // 'this' is the form element
|
|||
var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"), |
|||
replaceAttrValue = container.attr("data-valmsg-replace"), |
|||
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null; |
|||
container.removeClass("field-validation-valid").addClass("field-validation-error"); |
|||
error.data("unobtrusiveContainer", container); |
|||
if (replace) { |
|||
container.empty(); |
|||
error.removeClass("input-validation-error").appendTo(container); |
|||
} |
|||
else { |
|||
error.hide(); |
|||
} |
|||
} |
|||
function onErrors(event, validator) { // 'this' is the form element
|
|||
var container = $(this).find("[data-valmsg-summary=true]"), |
|||
list = container.find("ul"); |
|||
if (list && list.length && validator.errorList.length) { |
|||
list.empty(); |
|||
container.addClass("validation-summary-errors").removeClass("validation-summary-valid"); |
|||
$.each(validator.errorList, function () { |
|||
$("<li />").html(this.message).appendTo(list); |
|||
}); |
|||
} |
|||
} |
|||
function onSuccess(error) { // 'this' is the form element
|
|||
var container = error.data("unobtrusiveContainer"), |
|||
replaceAttrValue = container.attr("data-valmsg-replace"), |
|||
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null; |
|||
if (container) { |
|||
container.addClass("field-validation-valid").removeClass("field-validation-error"); |
|||
error.removeData("unobtrusiveContainer"); |
|||
if (replace) { |
|||
container.empty(); |
|||
} |
|||
} |
|||
} |
|||
function onReset(event) { // 'this' is the form element
|
|||
var $form = $(this); |
|||
$form.data("validator").resetForm(); |
|||
$form.find(".validation-summary-errors") |
|||
.addClass("validation-summary-valid") |
|||
.removeClass("validation-summary-errors"); |
|||
$form.find(".field-validation-error") |
|||
.addClass("field-validation-valid") |
|||
.removeClass("field-validation-error") |
|||
.removeData("unobtrusiveContainer") |
|||
.find(">*") // If we were using valmsg-replace, get the underlying error
|
|||
.removeData("unobtrusiveContainer"); |
|||
} |
|||
function validationInfo(form) { |
|||
var $form = $(form), |
|||
result = $form.data(data_validation), |
|||
onResetProxy = $.proxy(onReset, form); |
|||
if (!result) { |
|||
result = { |
|||
options: { // options structure passed to jQuery Validate's validate() method
|
|||
errorClass: "input-validation-error", |
|||
errorElement: "span", |
|||
errorPlacement: $.proxy(onError, form), |
|||
invalidHandler: $.proxy(onErrors, form), |
|||
messages: {}, |
|||
rules: {}, |
|||
success: $.proxy(onSuccess, form) |
|||
}, |
|||
attachValidation: function () { |
|||
$form |
|||
.unbind("reset." + data_validation, onResetProxy) |
|||
.bind("reset." + data_validation, onResetProxy) |
|||
.validate(this.options); |
|||
}, |
|||
validate: function () { // a validation function that is called by unobtrusive Ajax
|
|||
$form.validate(); |
|||
return $form.valid(); |
|||
} |
|||
}; |
|||
$form.data(data_validation, result); |
|||
} |
|||
return result; |
|||
} |
|||
$jQval.unobtrusive = { |
|||
adapters: [], |
|||
parseElement: function (element, skipAttach) { |
|||
/// <summary>
|
|||
/// Parses a single HTML element for unobtrusive validation attributes.
|
|||
/// </summary>
|
|||
/// <param name="element" domElement="true">The HTML element to be parsed.</param>
|
|||
/// <param name="skipAttach" type="Boolean">[Optional] true to skip attaching the
|
|||
/// validation to the form. If parsing just this single element, you should specify true.
|
|||
/// If parsing several elements, you should specify false, and manually attach the validation
|
|||
/// to the form when you are finished. The default is false.</param>
|
|||
var $element = $(element), |
|||
form = $element.parents("form")[0], |
|||
valInfo, rules, messages; |
|||
if (!form) { // Cannot do client-side validation without a form
|
|||
return; |
|||
} |
|||
valInfo = validationInfo(form); |
|||
valInfo.options.rules[element.name] = rules = {}; |
|||
valInfo.options.messages[element.name] = messages = {}; |
|||
$.each(this.adapters, function () { |
|||
var prefix = "data-val-" + this.name, |
|||
message = $element.attr(prefix), |
|||
paramValues = {}; |
|||
if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy)
|
|||
prefix += "-"; |
|||
$.each(this.params, function () { |
|||
paramValues[this] = $element.attr(prefix + this); |
|||
}); |
|||
this.adapt({ |
|||
element: element, |
|||
form: form, |
|||
message: message, |
|||
params: paramValues, |
|||
rules: rules, |
|||
messages: messages |
|||
}); |
|||
} |
|||
}); |
|||
$.extend(rules, { "__dummy__": true }); |
|||
if (!skipAttach) { |
|||
valInfo.attachValidation(); |
|||
} |
|||
}, |
|||
parse: function (selector) { |
|||
/// <summary>
|
|||
/// Parses all the HTML elements in the specified selector. It looks for input elements decorated
|
|||
/// with the [data-val=true] attribute value and enables validation according to the data-val-*
|
|||
/// attribute values.
|
|||
/// </summary>
|
|||
/// <param name="selector" type="String">Any valid jQuery selector.</param>
|
|||
var $forms = $(selector) |
|||
.parents("form") |
|||
.andSelf() |
|||
.add($(selector).find("form")) |
|||
.filter("form"); |
|||
// :input is a psuedoselector provided by jQuery which selects input and input-like elements
|
|||
// combining :input with other selectors significantly decreases performance.
|
|||
$(selector).find(":input").filter("[data-val=true]").each(function () { |
|||
$jQval.unobtrusive.parseElement(this, true); |
|||
}); |
|||
$forms.each(function () { |
|||
var info = validationInfo(this); |
|||
if (info) { |
|||
info.attachValidation(); |
|||
} |
|||
}); |
|||
} |
|||
}; |
|||
adapters = $jQval.unobtrusive.adapters; |
|||
adapters.add = function (adapterName, params, fn) { |
|||
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.</summary>
|
|||
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
|
|||
/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>
|
|||
/// <param name="params" type="Array" optional="true">[Optional] An array of parameter names (strings) that will
|
|||
/// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and
|
|||
/// mmmm is the parameter name).</param>
|
|||
/// <param name="fn" type="Function">The function to call, which adapts the values from the HTML
|
|||
/// attributes into jQuery Validate rules and/or messages.</param>
|
|||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
|||
if (!fn) { // Called with no params, just a function
|
|||
fn = params; |
|||
params = []; |
|||
} |
|||
this.push({ name: adapterName, params: params, adapt: fn }); |
|||
return this; |
|||
}; |
|||
adapters.addBool = function (adapterName, ruleName) { |
|||
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
|
|||
/// the jQuery Validate validation rule has no parameter values.</summary>
|
|||
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
|
|||
/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>
|
|||
/// <param name="ruleName" type="String" optional="true">[Optional] The name of the jQuery Validate rule. If not provided, the value
|
|||
/// of adapterName will be used instead.</param>
|
|||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
|||
return this.add(adapterName, function (options) { |
|||
setValidationValues(options, ruleName || adapterName, true); |
|||
}); |
|||
}; |
|||
adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) { |
|||
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
|
|||
/// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and
|
|||
/// one for min-and-max). The HTML parameters are expected to be named -min and -max.</summary>
|
|||
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
|
|||
/// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).</param>
|
|||
/// <param name="minRuleName" type="String">The name of the jQuery Validate rule to be used when you only
|
|||
/// have a minimum value.</param>
|
|||
/// <param name="maxRuleName" type="String">The name of the jQuery Validate rule to be used when you only
|
|||
/// have a maximum value.</param>
|
|||
/// <param name="minMaxRuleName" type="String">The name of the jQuery Validate rule to be used when you
|
|||
/// have both a minimum and maximum value.</param>
|
|||
/// <param name="minAttribute" type="String" optional="true">[Optional] The name of the HTML attribute that
|
|||
/// contains the minimum value. The default is "min".</param>
|
|||
/// <param name="maxAttribute" type="String" optional="true">[Optional] The name of the HTML attribute that
|
|||
/// contains the maximum value. The default is "max".</param>
|
|||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
|||
return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) { |
|||
var min = options.params.min, |
|||
max = options.params.max; |
|||
if (min && max) { |
|||
setValidationValues(options, minMaxRuleName, [min, max]); |
|||
} |
|||
else if (min) { |
|||
setValidationValues(options, minRuleName, min); |
|||
} |
|||
else if (max) { |
|||
setValidationValues(options, maxRuleName, max); |
|||
} |
|||
}); |
|||
}; |
|||
adapters.addSingleVal = function (adapterName, attribute, ruleName) { |
|||
/// <summary>Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
|
|||
/// the jQuery Validate validation rule has a single value.</summary>
|
|||
/// <param name="adapterName" type="String">The name of the adapter to be added. This matches the name used
|
|||
/// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).</param>
|
|||
/// <param name="attribute" type="String">[Optional] The name of the HTML attribute that contains the value.
|
|||
/// The default is "val".</param>
|
|||
/// <param name="ruleName" type="String" optional="true">[Optional] The name of the jQuery Validate rule. If not provided, the value
|
|||
/// of adapterName will be used instead.</param>
|
|||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
|||
return this.add(adapterName, [attribute || "val"], function (options) { |
|||
setValidationValues(options, ruleName || adapterName, options.params[attribute]); |
|||
}); |
|||
}; |
|||
$jQval.addMethod("__dummy__", function (value, element, params) { |
|||
return true; |
|||
}); |
|||
$jQval.addMethod("regex", function (value, element, params) { |
|||
var match; |
|||
if (this.optional(element)) { |
|||
return true; |
|||
} |
|||
match = new RegExp(params).exec(value); |
|||
return (match && (match.index === 0) && (match[0].length === value.length)); |
|||
}); |
|||
$jQval.addMethod("nonalphamin", function (value, element, nonalphamin) { |
|||
var match; |
|||
if (nonalphamin) { |
|||
match = value.match(/\W/g); |
|||
match = match && match.length >= nonalphamin; |
|||
} |
|||
return match; |
|||
}); |
|||
if ($jQval.methods.extension) { |
|||
adapters.addSingleVal("accept", "mimtype"); |
|||
adapters.addSingleVal("extension", "extension"); |
|||
} else { |
|||
// for backward compatibility, when the 'extension' validation method does not exist, such as with versions
|
|||
// of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for
|
|||
// validating the extension, and ignore mime-type validations as they are not supported.
|
|||
adapters.addSingleVal("extension", "extension", "accept"); |
|||
} |
|||
adapters.addSingleVal("regex", "pattern"); |
|||
adapters.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"); |
|||
adapters.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range"); |
|||
adapters.add("equalto", ["other"], function (options) { |
|||
var prefix = getModelPrefix(options.element.name), |
|||
other = options.params.other, |
|||
fullOtherName = appendModelPrefix(other, prefix), |
|||
element = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(fullOtherName) + "']")[0]; |
|||
setValidationValues(options, "equalTo", element); |
|||
}); |
|||
adapters.add("required", function (options) { |
|||
// jQuery Validate equates "required" with "mandatory" for checkbox elements
|
|||
if (options.element.tagName.toUpperCase() !== "INPUT" || options.element.type.toUpperCase() !== "CHECKBOX") { |
|||
setValidationValues(options, "required", true); |
|||
} |
|||
}); |
|||
adapters.add("remote", ["url", "type", "additionalfields"], function (options) { |
|||
var value = { |
|||
url: options.params.url, |
|||
type: options.params.type || "GET", |
|||
data: {} |
|||
}, |
|||
prefix = getModelPrefix(options.element.name); |
|||
$.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) { |
|||
var paramName = appendModelPrefix(fieldName, prefix); |
|||
value.data[paramName] = function () { |
|||
return $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']").val(); |
|||
}; |
|||
}); |
|||
setValidationValues(options, "remote", value); |
|||
}); |
|||
adapters.add("password", ["min", "nonalphamin", "regex"], function (options) { |
|||
if (options.params.min) { |
|||
setValidationValues(options, "minlength", options.params.min); |
|||
} |
|||
if (options.params.nonalphamin) { |
|||
setValidationValues(options, "nonalphamin", options.params.nonalphamin); |
|||
} |
|||
if (options.params.regex) { |
|||
setValidationValues(options, "regex", options.params.regex); |
|||
} |
|||
}); |
|||
$(function () { |
|||
$jQval.unobtrusive.parse(document); |
|||
}); |
|||
}(jQuery)); |
|||
@ -1,19 +0,0 @@ |
|||
/* NUGET: BEGIN LICENSE TEXT |
|||
* |
|||
* Microsoft grants you the right to use these script files for the sole |
|||
* purpose of either: (i) interacting through your browser with the Microsoft |
|||
* website or online service, subject to the applicable licensing or use |
|||
* terms; or (ii) using the files as included with a Microsoft product subject |
|||
* to that product's license terms. Microsoft reserves all other rights to the |
|||
* files not expressly granted by Microsoft, whether by implication, estoppel |
|||
* or otherwise. Insofar as a script file is dual licensed under GPL, |
|||
* Microsoft neither took the code under GPL nor distributes it thereunder but |
|||
* under the terms set out in this paragraph. All notices and licenses |
|||
* below are for informational purposes only. |
|||
* |
|||
* NUGET: END LICENSE TEXT */ |
|||
/* |
|||
** Unobtrusive validation support library for jQuery and jQuery Validate |
|||
** Copyright (C) Microsoft Corporation. All rights reserved. |
|||
*/ |
|||
(function(a){var d=a.validator,b,e="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function j(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function h(a){return a.substr(0,a.lastIndexOf(".")+1)}function g(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function m(c,e){var b=a(this).find("[data-valmsg-for='"+f(e[0].name)+"']"),d=b.attr("data-valmsg-replace"),g=d?a.parseJSON(d)!==false:null;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(g){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function l(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a("<li />").html(this.message).appendTo(b)})}}function k(d){var b=d.data("unobtrusiveContainer"),c=b.attr("data-valmsg-replace"),e=c?a.parseJSON(c):null;if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");d.removeData("unobtrusiveContainer");e&&b.empty()}}function n(){var b=a(this);b.data("validator").resetForm();b.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");b.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function i(c){var b=a(c),d=b.data(e),f=a.proxy(n,c);if(!d){d={options:{errorClass:"input-validation-error",errorElement:"span",errorPlacement:a.proxy(m,c),invalidHandler:a.proxy(l,c),messages:{},rules:{},success:a.proxy(k,c)},attachValidation:function(){b.unbind("reset."+e,f).bind("reset."+e,f).validate(this.options)},validate:function(){b.validate();return b.valid()}};b.data(e,d)}return d}d.unobtrusive={adapters:[],parseElement:function(b,h){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=i(f);c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});a.extend(e,{__dummy__:true});!h&&c.attachValidation()},parse:function(b){var c=a(b).parents("form").andSelf().add(a(b).find("form")).filter("form");a(b).find(":input").filter("[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});c.each(function(){var a=i(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("__dummy__",function(){return true});d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});d.addMethod("nonalphamin",function(c,d,b){var a;if(b){a=c.match(/\W/g);a=a&&a.length>=b}return a});if(d.methods.extension){b.addSingleVal("accept","mimtype");b.addSingleVal("extension","extension")}else b.addSingleVal("extension","extension","accept");b.addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.add("equalto",["other"],function(b){var i=h(b.element.name),j=b.params.other,d=g(j,i),e=a(b.form).find(":input").filter("[name='"+f(d)+"']")[0];c(b,"equalTo",e)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","additionalfields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},e=h(b.element.name);a.each(j(b.params.additionalfields||b.element.name),function(i,h){var c=g(h,e);d.data[c]=function(){return a(b.form).find(":input").filter("[name='"+f(c)+"']").val()}});c(b,"remote",d)});b.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&c(a,"minlength",a.params.min);a.params.nonalphamin&&c(a,"nonalphamin",a.params.nonalphamin);a.params.regex&&c(a,"regex",a.params.regex)});a(function(){d.unobtrusive.parse(document)})})(jQuery); |
|||
File diff suppressed because it is too large
@ -1,340 +0,0 @@ |
|||
/* NUGET: BEGIN LICENSE TEXT |
|||
* |
|||
* Microsoft grants you the right to use these script files for the sole |
|||
* purpose of either: (i) interacting through your browser with the Microsoft |
|||
* website or online service, subject to the applicable licensing or use |
|||
* terms; or (ii) using the files as included with a Microsoft product subject |
|||
* to that product's license terms. Microsoft reserves all other rights to the |
|||
* files not expressly granted by Microsoft, whether by implication, estoppel |
|||
* or otherwise. Insofar as a script file is dual licensed under GPL, |
|||
* Microsoft neither took the code under GPL nor distributes it thereunder but |
|||
* under the terms set out in this paragraph. All notices and licenses |
|||
* below are for informational purposes only. |
|||
* |
|||
* NUGET: END LICENSE TEXT */ |
|||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ |
|||
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ |
|||
window.matchMedia = window.matchMedia || (function(doc, undefined){ |
|||
|
|||
var bool, |
|||
docElem = doc.documentElement, |
|||
refNode = docElem.firstElementChild || docElem.firstChild, |
|||
// fakeBody required for <FF4 when executed in <head>
|
|||
fakeBody = doc.createElement('body'), |
|||
div = doc.createElement('div'); |
|||
|
|||
div.id = 'mq-test-1'; |
|||
div.style.cssText = "position:absolute;top:-100em"; |
|||
fakeBody.style.background = "none"; |
|||
fakeBody.appendChild(div); |
|||
|
|||
return function(q){ |
|||
|
|||
div.innerHTML = '­<style media="'+q+'"> #mq-test-1 { width: 42px; }</style>'; |
|||
|
|||
docElem.insertBefore(fakeBody, refNode); |
|||
bool = div.offsetWidth == 42; |
|||
docElem.removeChild(fakeBody); |
|||
|
|||
return { matches: bool, media: q }; |
|||
}; |
|||
|
|||
})(document); |
|||
|
|||
|
|||
|
|||
|
|||
/*! Respond.js v1.2.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ |
|||
(function( win ){ |
|||
//exposed namespace
|
|||
win.respond = {}; |
|||
|
|||
//define update even in native-mq-supporting browsers, to avoid errors
|
|||
respond.update = function(){}; |
|||
|
|||
//expose media query support flag for external use
|
|||
respond.mediaQueriesSupported = win.matchMedia && win.matchMedia( "only all" ).matches; |
|||
|
|||
//if media queries are supported, exit here
|
|||
if( respond.mediaQueriesSupported ){ return; } |
|||
|
|||
//define vars
|
|||
var doc = win.document, |
|||
docElem = doc.documentElement, |
|||
mediastyles = [], |
|||
rules = [], |
|||
appendedEls = [], |
|||
parsedSheets = {}, |
|||
resizeThrottle = 30, |
|||
head = doc.getElementsByTagName( "head" )[0] || docElem, |
|||
base = doc.getElementsByTagName( "base" )[0], |
|||
links = head.getElementsByTagName( "link" ), |
|||
requestQueue = [], |
|||
|
|||
//loop stylesheets, send text content to translate
|
|||
ripCSS = function(){ |
|||
var sheets = links, |
|||
sl = sheets.length, |
|||
i = 0, |
|||
//vars for loop:
|
|||
sheet, href, media, isCSS; |
|||
|
|||
for( ; i < sl; i++ ){ |
|||
sheet = sheets[ i ], |
|||
href = sheet.href, |
|||
media = sheet.media, |
|||
isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet"; |
|||
|
|||
//only links plz and prevent re-parsing
|
|||
if( !!href && isCSS && !parsedSheets[ href ] ){ |
|||
// selectivizr exposes css through the rawCssText expando
|
|||
if (sheet.styleSheet && sheet.styleSheet.rawCssText) { |
|||
translate( sheet.styleSheet.rawCssText, href, media ); |
|||
parsedSheets[ href ] = true; |
|||
} else { |
|||
if( (!/^([a-zA-Z:]*\/\/)/.test( href ) && !base) |
|||
|| href.replace( RegExp.$1, "" ).split( "/" )[0] === win.location.host ){ |
|||
requestQueue.push( { |
|||
href: href, |
|||
media: media |
|||
} ); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
makeRequests(); |
|||
}, |
|||
|
|||
//recurse through request queue, get css text
|
|||
makeRequests = function(){ |
|||
if( requestQueue.length ){ |
|||
var thisRequest = requestQueue.shift(); |
|||
|
|||
ajax( thisRequest.href, function( styles ){ |
|||
translate( styles, thisRequest.href, thisRequest.media ); |
|||
parsedSheets[ thisRequest.href ] = true; |
|||
makeRequests(); |
|||
} ); |
|||
} |
|||
}, |
|||
|
|||
//find media blocks in css text, convert to style blocks
|
|||
translate = function( styles, href, media ){ |
|||
var qs = styles.match( /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi ), |
|||
ql = qs && qs.length || 0, |
|||
//try to get CSS path
|
|||
href = href.substring( 0, href.lastIndexOf( "/" )), |
|||
repUrls = function( css ){ |
|||
return css.replace( /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + href + "$2$3" ); |
|||
}, |
|||
useMedia = !ql && media, |
|||
//vars used in loop
|
|||
i = 0, |
|||
j, fullq, thisq, eachq, eql; |
|||
|
|||
//if path exists, tack on trailing slash
|
|||
if( href.length ){ href += "/"; } |
|||
|
|||
//if no internal queries exist, but media attr does, use that
|
|||
//note: this currently lacks support for situations where a media attr is specified on a link AND
|
|||
//its associated stylesheet has internal CSS media queries.
|
|||
//In those cases, the media attribute will currently be ignored.
|
|||
if( useMedia ){ |
|||
ql = 1; |
|||
} |
|||
|
|||
|
|||
for( ; i < ql; i++ ){ |
|||
j = 0; |
|||
|
|||
//media attr
|
|||
if( useMedia ){ |
|||
fullq = media; |
|||
rules.push( repUrls( styles ) ); |
|||
} |
|||
//parse for styles
|
|||
else{ |
|||
fullq = qs[ i ].match( /@media *([^\{]+)\{([\S\s]+?)$/ ) && RegExp.$1; |
|||
rules.push( RegExp.$2 && repUrls( RegExp.$2 ) ); |
|||
} |
|||
|
|||
eachq = fullq.split( "," ); |
|||
eql = eachq.length; |
|||
|
|||
for( ; j < eql; j++ ){ |
|||
thisq = eachq[ j ]; |
|||
mediastyles.push( { |
|||
media : thisq.split( "(" )[ 0 ].match( /(only\s+)?([a-zA-Z]+)\s?/ ) && RegExp.$2 || "all", |
|||
rules : rules.length - 1, |
|||
hasquery: thisq.indexOf("(") > -1, |
|||
minw : thisq.match( /\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ), |
|||
maxw : thisq.match( /\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ) |
|||
} ); |
|||
} |
|||
} |
|||
|
|||
applyMedia(); |
|||
}, |
|||
|
|||
lastCall, |
|||
|
|||
resizeDefer, |
|||
|
|||
// returns the value of 1em in pixels
|
|||
getEmValue = function() { |
|||
var ret, |
|||
div = doc.createElement('div'), |
|||
body = doc.body, |
|||
fakeUsed = false; |
|||
|
|||
div.style.cssText = "position:absolute;font-size:1em;width:1em"; |
|||
|
|||
if( !body ){ |
|||
body = fakeUsed = doc.createElement( "body" ); |
|||
body.style.background = "none"; |
|||
} |
|||
|
|||
body.appendChild( div ); |
|||
|
|||
docElem.insertBefore( body, docElem.firstChild ); |
|||
|
|||
ret = div.offsetWidth; |
|||
|
|||
if( fakeUsed ){ |
|||
docElem.removeChild( body ); |
|||
} |
|||
else { |
|||
body.removeChild( div ); |
|||
} |
|||
|
|||
//also update eminpx before returning
|
|||
ret = eminpx = parseFloat(ret); |
|||
|
|||
return ret; |
|||
}, |
|||
|
|||
//cached container for 1em value, populated the first time it's needed
|
|||
eminpx, |
|||
|
|||
//enable/disable styles
|
|||
applyMedia = function( fromResize ){ |
|||
var name = "clientWidth", |
|||
docElemProp = docElem[ name ], |
|||
currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp, |
|||
styleBlocks = {}, |
|||
lastLink = links[ links.length-1 ], |
|||
now = (new Date()).getTime(); |
|||
|
|||
//throttle resize calls
|
|||
if( fromResize && lastCall && now - lastCall < resizeThrottle ){ |
|||
clearTimeout( resizeDefer ); |
|||
resizeDefer = setTimeout( applyMedia, resizeThrottle ); |
|||
return; |
|||
} |
|||
else { |
|||
lastCall = now; |
|||
} |
|||
|
|||
for( var i in mediastyles ){ |
|||
var thisstyle = mediastyles[ i ], |
|||
min = thisstyle.minw, |
|||
max = thisstyle.maxw, |
|||
minnull = min === null, |
|||
maxnull = max === null, |
|||
em = "em"; |
|||
|
|||
if( !!min ){ |
|||
min = parseFloat( min ) * ( min.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 ); |
|||
} |
|||
if( !!max ){ |
|||
max = parseFloat( max ) * ( max.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 ); |
|||
} |
|||
|
|||
// if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true
|
|||
if( !thisstyle.hasquery || ( !minnull || !maxnull ) && ( minnull || currWidth >= min ) && ( maxnull || currWidth <= max ) ){ |
|||
if( !styleBlocks[ thisstyle.media ] ){ |
|||
styleBlocks[ thisstyle.media ] = []; |
|||
} |
|||
styleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] ); |
|||
} |
|||
} |
|||
|
|||
//remove any existing respond style element(s)
|
|||
for( var i in appendedEls ){ |
|||
if( appendedEls[ i ] && appendedEls[ i ].parentNode === head ){ |
|||
head.removeChild( appendedEls[ i ] ); |
|||
} |
|||
} |
|||
|
|||
//inject active styles, grouped by media type
|
|||
for( var i in styleBlocks ){ |
|||
var ss = doc.createElement( "style" ), |
|||
css = styleBlocks[ i ].join( "\n" ); |
|||
|
|||
ss.type = "text/css"; |
|||
ss.media = i; |
|||
|
|||
//originally, ss was appended to a documentFragment and sheets were appended in bulk.
|
|||
//this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one!
|
|||
head.insertBefore( ss, lastLink.nextSibling ); |
|||
|
|||
if ( ss.styleSheet ){ |
|||
ss.styleSheet.cssText = css; |
|||
} |
|||
else { |
|||
ss.appendChild( doc.createTextNode( css ) ); |
|||
} |
|||
|
|||
//push to appendedEls to track for later removal
|
|||
appendedEls.push( ss ); |
|||
} |
|||
}, |
|||
//tweaked Ajax functions from Quirksmode
|
|||
ajax = function( url, callback ) { |
|||
var req = xmlHttp(); |
|||
if (!req){ |
|||
return; |
|||
} |
|||
req.open( "GET", url, true ); |
|||
req.onreadystatechange = function () { |
|||
if ( req.readyState != 4 || req.status != 200 && req.status != 304 ){ |
|||
return; |
|||
} |
|||
callback( req.responseText ); |
|||
} |
|||
if ( req.readyState == 4 ){ |
|||
return; |
|||
} |
|||
req.send( null ); |
|||
}, |
|||
//define ajax obj
|
|||
xmlHttp = (function() { |
|||
var xmlhttpmethod = false; |
|||
try { |
|||
xmlhttpmethod = new XMLHttpRequest(); |
|||
} |
|||
catch( e ){ |
|||
xmlhttpmethod = new ActiveXObject( "Microsoft.XMLHTTP" ); |
|||
} |
|||
return function(){ |
|||
return xmlhttpmethod; |
|||
}; |
|||
})(); |
|||
|
|||
//translate CSS
|
|||
ripCSS(); |
|||
|
|||
//expose update for re-running respond later on
|
|||
respond.update = ripCSS; |
|||
|
|||
//adjust on resize
|
|||
function callMedia(){ |
|||
applyMedia( true ); |
|||
} |
|||
if( win.addEventListener ){ |
|||
win.addEventListener( "resize", callMedia, false ); |
|||
} |
|||
else if( win.attachEvent ){ |
|||
win.attachEvent( "onresize", callMedia ); |
|||
} |
|||
})(this); |
|||
@ -1,20 +0,0 @@ |
|||
/* NUGET: BEGIN LICENSE TEXT |
|||
* |
|||
* Microsoft grants you the right to use these script files for the sole |
|||
* purpose of either: (i) interacting through your browser with the Microsoft |
|||
* website or online service, subject to the applicable licensing or use |
|||
* terms; or (ii) using the files as included with a Microsoft product subject |
|||
* to that product's license terms. Microsoft reserves all other rights to the |
|||
* files not expressly granted by Microsoft, whether by implication, estoppel |
|||
* or otherwise. Insofar as a script file is dual licensed under GPL, |
|||
* Microsoft neither took the code under GPL nor distributes it thereunder but |
|||
* under the terms set out in this paragraph. All notices and licenses |
|||
* below are for informational purposes only. |
|||
* |
|||
* NUGET: END LICENSE TEXT */ |
|||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ |
|||
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ |
|||
window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='­<style media="'+h+'"> #mq-test-1 { width: 42px; }</style>';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); |
|||
|
|||
/*! Respond.js v1.2.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ |
|||
(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B<y;B++){A=D[B],z=A.href,C=A.media,x=A.rel&&A.rel.toLowerCase()==="stylesheet";if(!!z&&x&&!o[z]){if(A.styleSheet&&A.styleSheet.rawCssText){m(A.styleSheet.rawCssText,z,C);o[z]=true}else{if((!/^([a-zA-Z:]*\/\/)/.test(z)&&!g)||z.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:z,media:C})}}}}u()},u=function(){if(d.length){var x=d.shift();n(x.href,function(y){m(y,x.href,x.media);o[x.href]=true;u()})}},m=function(I,x,z){var G=I.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),J=G&&G.length||0,x=x.substring(0,x.lastIndexOf("/")),y=function(K){return K.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+x+"$2$3")},A=!J&&z,D=0,C,E,F,B,H;if(x.length){x+="/"}if(A){J=1}for(;D<J;D++){C=0;if(A){E=z;k.push(y(I))}else{E=G[D].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&y(RegExp.$2))}B=E.split(",");H=B.length;for(;C<H;C++){F=B[C];i.push({media:F.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:k.length-1,hasquery:F.indexOf("(")>-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l<h){clearTimeout(r);r=setTimeout(j,h);return}else{l=z}for(var E in i){var K=i[E],C=K.minw,J=K.maxw,A=C===null,L=J===null,y="em";if(!!C){C=parseFloat(C)*(C.indexOf(y)>-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this); |
|||
@ -1,14 +0,0 @@ |
|||
using Microsoft.Owin; |
|||
using Owin; |
|||
|
|||
[assembly: OwinStartupAttribute(typeof(Test_Website_MVC5_NET45.Startup))] |
|||
namespace Test_Website_MVC5_NET45 |
|||
{ |
|||
public partial class Startup |
|||
{ |
|||
public void Configuration(IAppBuilder app) |
|||
{ |
|||
ConfigureAuth(app); |
|||
} |
|||
} |
|||
} |
|||
@ -1,278 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProductVersion> |
|||
</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{210AFC40-E24E-4B1D-BF3E-331C2138D5D9}</ProjectGuid> |
|||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> |
|||
<OutputType>Library</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>Test_Website_MVC5_NET45</RootNamespace> |
|||
<AssemblyName>Test_Website_MVC5_NET45</AssemblyName> |
|||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> |
|||
<MvcBuildViews>false</MvcBuildViews> |
|||
<UseIISExpress>true</UseIISExpress> |
|||
<IISExpressSSLPort /> |
|||
<IISExpressAnonymousAuthentication /> |
|||
<IISExpressWindowsAuthentication /> |
|||
<IISExpressUseClassicPipelineMode /> |
|||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\..\</SolutionDir> |
|||
<RestorePackages>true</RestorePackages> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="Antlr3.Runtime"> |
|||
<HintPath>..\..\..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.CSharp" /> |
|||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
|||
<Private>True</Private> |
|||
<HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
|||
<HintPath>..\..\..\packages\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Drawing" /> |
|||
<Reference Include="System.Web.DynamicData" /> |
|||
<Reference Include="System.Web.Entity" /> |
|||
<Reference Include="System.Web.ApplicationServices" /> |
|||
<Reference Include="System.ComponentModel.DataAnnotations" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Data.DataSetExtensions" /> |
|||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\packages\Microsoft.AspNet.WebPages.3.0.1\lib\net45\System.Web.Helpers.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\packages\Microsoft.AspNet.Mvc.5.0.0\lib\net45\System.Web.Mvc.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\packages\Microsoft.AspNet.Razor.3.0.0\lib\net45\System.Web.Razor.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\packages\Microsoft.AspNet.WebPages.3.0.1\lib\net45\System.Web.WebPages.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\packages\Microsoft.AspNet.WebPages.3.0.1\lib\net45\System.Web.WebPages.Deployment.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\packages\Microsoft.AspNet.WebPages.3.0.1\lib\net45\System.Web.WebPages.Razor.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System.Xml.Linq" /> |
|||
<Reference Include="System.Web" /> |
|||
<Reference Include="System.Web.Extensions" /> |
|||
<Reference Include="System.Web.Abstractions" /> |
|||
<Reference Include="System.Web.Routing" /> |
|||
<Reference Include="System.Xml" /> |
|||
<Reference Include="System.Configuration" /> |
|||
<Reference Include="System.Web.Services" /> |
|||
<Reference Include="System.EnterpriseServices" /> |
|||
<Reference Include="System.Net.Http"> |
|||
</Reference> |
|||
<Reference Include="System.Net.Http.WebRequest"> |
|||
</Reference> |
|||
<Reference Include="System.Web.Optimization"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.AspNet.Web.Optimization.1.1.1\lib\net40\System.Web.Optimization.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="WebGrease"> |
|||
<HintPath>..\..\..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath> |
|||
</Reference> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Reference Include="EntityFramework"> |
|||
<HintPath>..\..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="EntityFramework.SqlServer"> |
|||
<HintPath>..\..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.AspNet.Identity.Core"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.AspNet.Identity.Core.1.0.0\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.AspNet.Identity.Owin"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.AspNet.Identity.Owin.1.0.0\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.AspNet.Identity.EntityFramework"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.AspNet.Identity.EntityFramework.1.0.0\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Owin"> |
|||
<HintPath>..\..\..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.Owin"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.Owin.2.0.0\lib\net45\Microsoft.Owin.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.Owin.Host.SystemWeb"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.Owin.Host.SystemWeb.2.0.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.Owin.Security"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.Owin.Security.2.0.0\lib\net45\Microsoft.Owin.Security.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.Owin.Security.Facebook"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.Owin.Security.Facebook.2.0.0\lib\net45\Microsoft.Owin.Security.Facebook.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.Owin.Security.Cookies"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.Owin.Security.Cookies.2.0.0\lib\net45\Microsoft.Owin.Security.Cookies.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.Owin.Security.OAuth"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.Owin.Security.OAuth.2.0.0\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.Owin.Security.Google"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.Owin.Security.Google.2.0.0\lib\net45\Microsoft.Owin.Security.Google.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.Owin.Security.Twitter"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.Owin.Security.Twitter.2.0.0\lib\net45\Microsoft.Owin.Security.Twitter.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.Owin.Security.MicrosoftAccount"> |
|||
<HintPath>..\..\..\..\packages\Microsoft.Owin.Security.MicrosoftAccount.2.0.0\lib\net45\Microsoft.Owin.Security.MicrosoftAccount.dll</HintPath> |
|||
</Reference> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="App_Start\BundleConfig.cs" /> |
|||
<Compile Include="App_Start\FilterConfig.cs" /> |
|||
<Compile Include="App_Start\RouteConfig.cs" /> |
|||
<Compile Include="App_Start\Startup.Auth.cs" /> |
|||
<Compile Include="Controllers\AccountController.cs" /> |
|||
<Compile Include="Controllers\HomeController.cs" /> |
|||
<Compile Include="Global.asax.cs"> |
|||
<DependentUpon>Global.asax</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="Models\AccountViewModels.cs" /> |
|||
<Compile Include="Models\IdentityModels.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<Compile Include="Startup.cs" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Content Include="Content\bootstrap.css" /> |
|||
<Content Include="Content\bootstrap.min.css" /> |
|||
<Content Include="favicon.ico" /> |
|||
<Content Include="fonts\glyphicons-halflings-regular.svg" /> |
|||
<Content Include="Global.asax" /> |
|||
<Content Include="Content\Site.css" /> |
|||
<Content Include="Scripts\bootstrap.js" /> |
|||
<Content Include="Scripts\bootstrap.min.js" /> |
|||
<Content Include="config\imageprocessor\cache.config" /> |
|||
<Content Include="config\imageprocessor\processing.config" /> |
|||
<Content Include="config\imageprocessor\security.config" /> |
|||
<None Include="Scripts\jquery-1.10.2.intellisense.js" /> |
|||
<Content Include="Scripts\jquery-1.10.2.js" /> |
|||
<Content Include="Scripts\jquery-1.10.2.min.js" /> |
|||
<None Include="Scripts\jquery.validate-vsdoc.js" /> |
|||
<Content Include="Scripts\jquery.validate.js" /> |
|||
<Content Include="Scripts\jquery.validate.min.js" /> |
|||
<Content Include="Scripts\jquery.validate.unobtrusive.js" /> |
|||
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" /> |
|||
<Content Include="Scripts\modernizr-2.6.2.js" /> |
|||
<Content Include="Scripts\respond.js" /> |
|||
<Content Include="Scripts\respond.min.js" /> |
|||
<Content Include="Scripts\_references.js" /> |
|||
<Content Include="Web.config" /> |
|||
<Content Include="Web.Debug.config"> |
|||
<DependentUpon>Web.config</DependentUpon> |
|||
</Content> |
|||
<Content Include="Web.Release.config"> |
|||
<DependentUpon>Web.config</DependentUpon> |
|||
</Content> |
|||
<Content Include="Views\Web.config" /> |
|||
<Content Include="Views\_ViewStart.cshtml" /> |
|||
<Content Include="Views\Shared\Error.cshtml" /> |
|||
<Content Include="Views\Shared\_Layout.cshtml" /> |
|||
<Content Include="Views\Home\About.cshtml" /> |
|||
<Content Include="Views\Home\Contact.cshtml" /> |
|||
<Content Include="Views\Home\Index.cshtml" /> |
|||
<Content Include="Scripts\jquery-1.10.2.min.map" /> |
|||
<Content Include="Views\Account\_ChangePasswordPartial.cshtml" /> |
|||
<Content Include="Views\Account\_ExternalLoginsListPartial.cshtml" /> |
|||
<Content Include="Views\Account\_RemoveAccountPartial.cshtml" /> |
|||
<Content Include="Views\Account\_SetPasswordPartial.cshtml" /> |
|||
<Content Include="Views\Account\ExternalLoginConfirmation.cshtml" /> |
|||
<Content Include="Views\Account\ExternalLoginFailure.cshtml" /> |
|||
<Content Include="Views\Account\Login.cshtml" /> |
|||
<Content Include="Views\Account\Manage.cshtml" /> |
|||
<Content Include="Views\Account\Register.cshtml" /> |
|||
<Content Include="Views\Shared\_LoginPartial.cshtml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Folder Include="App_Data\" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Content Include="fonts\glyphicons-halflings-regular.woff" /> |
|||
<Content Include="fonts\glyphicons-halflings-regular.ttf" /> |
|||
<Content Include="fonts\glyphicons-halflings-regular.eot" /> |
|||
<Content Include="packages.config" /> |
|||
<None Include="Project_Readme.html" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\ImageProcessor.Web\NET45\ImageProcessor.Web_NET45.csproj"> |
|||
<Project>{d011a778-59c8-4bfa-a770-c350216bf161}</Project> |
|||
<Name>ImageProcessor.Web_NET45</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\..\..\ImageProcessor\ImageProcessor.csproj"> |
|||
<Project>{3b5dd734-fb7a-487d-8ce6-55e7af9aea7e}</Project> |
|||
<Name>ImageProcessor</Name> |
|||
</ProjectReference> |
|||
</ItemGroup> |
|||
<PropertyGroup> |
|||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> |
|||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> |
|||
</PropertyGroup> |
|||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /> |
|||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /> |
|||
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'"> |
|||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" /> |
|||
</Target> |
|||
<ProjectExtensions> |
|||
<VisualStudio> |
|||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> |
|||
<WebProjectProperties> |
|||
<UseIIS>True</UseIIS> |
|||
<AutoAssignPort>True</AutoAssignPort> |
|||
<DevelopmentServerPort>2690</DevelopmentServerPort> |
|||
<DevelopmentServerVPath>/</DevelopmentServerVPath> |
|||
<IISUrl>http://localhost:2690/</IISUrl> |
|||
<NTLMAuthentication>False</NTLMAuthentication> |
|||
<UseCustomServer>False</UseCustomServer> |
|||
<CustomServerUrl> |
|||
</CustomServerUrl> |
|||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> |
|||
</WebProjectProperties> |
|||
</FlavorProperties> |
|||
</VisualStudio> |
|||
</ProjectExtensions> |
|||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> --> |
|||
<Target Name="AfterBuild"> |
|||
<Exec Command="xcopy "$(SolutionDir)Images" "$(ProjectDir)Images" /S /Y /I" /> |
|||
</Target> |
|||
</Project> |
|||
@ -1,36 +0,0 @@ |
|||
@model Test_Website_MVC5_NET45.Models.ExternalLoginConfirmationViewModel |
|||
@{ |
|||
ViewBag.Title = "Register"; |
|||
} |
|||
<h2>@ViewBag.Title.</h2> |
|||
<h3>Associate your @ViewBag.LoginProvider account.</h3> |
|||
|
|||
@using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) |
|||
{ |
|||
@Html.AntiForgeryToken() |
|||
|
|||
<h4>Association Form</h4> |
|||
<hr /> |
|||
@Html.ValidationSummary(true) |
|||
<p class="text-info"> |
|||
You've successfully authenticated with <strong>@ViewBag.LoginProvider</strong>. |
|||
Please enter a user name for this site below and click the Register button to finish |
|||
logging in. |
|||
</p> |
|||
<div class="form-group"> |
|||
@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" }) |
|||
<div class="col-md-10"> |
|||
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control" }) |
|||
@Html.ValidationMessageFor(m => m.UserName) |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<div class="col-md-offset-2 col-md-10"> |
|||
<input type="submit" class="btn btn-default" value="Register" /> |
|||
</div> |
|||
</div> |
|||
} |
|||
|
|||
@section Scripts { |
|||
@Scripts.Render("~/bundles/jqueryval") |
|||
} |
|||
@ -1,6 +0,0 @@ |
|||
@{ |
|||
ViewBag.Title = "Login Failure"; |
|||
} |
|||
|
|||
<h2>@ViewBag.Title.</h2> |
|||
<h3 class="text-error">Unsuccessful login with service.</h3> |
|||
@ -1,58 +0,0 @@ |
|||
@model Test_Website_MVC5_NET45.Models.LoginViewModel |
|||
|
|||
@{ |
|||
ViewBag.Title = "Log in"; |
|||
} |
|||
|
|||
<h2>@ViewBag.Title.</h2> |
|||
<div class="row"> |
|||
<div class="col-md-8"> |
|||
<section id="loginForm"> |
|||
@using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) |
|||
{ |
|||
@Html.AntiForgeryToken() |
|||
<h4>Use a local account to log in.</h4> |
|||
<hr /> |
|||
@Html.ValidationSummary(true) |
|||
<div class="form-group"> |
|||
@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" }) |
|||
<div class="col-md-10"> |
|||
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control" }) |
|||
@Html.ValidationMessageFor(m => m.UserName) |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) |
|||
<div class="col-md-10"> |
|||
@Html.PasswordFor(m => m.Password, new { @class = "form-control" }) |
|||
@Html.ValidationMessageFor(m => m.Password) |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<div class="col-md-offset-2 col-md-10"> |
|||
<div class="checkbox"> |
|||
@Html.CheckBoxFor(m => m.RememberMe) |
|||
@Html.LabelFor(m => m.RememberMe) |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<div class="col-md-offset-2 col-md-10"> |
|||
<input type="submit" value="Log in" class="btn btn-default" /> |
|||
</div> |
|||
</div> |
|||
<p> |
|||
@Html.ActionLink("Register", "Register") if you don't have a local account. |
|||
</p> |
|||
} |
|||
</section> |
|||
</div> |
|||
<div class="col-md-4"> |
|||
<section id="socialLoginForm"> |
|||
@Html.Partial("_ExternalLoginsListPartial", new { Action = "ExternalLogin", ReturnUrl = ViewBag.ReturnUrl }) |
|||
</section> |
|||
</div> |
|||
</div> |
|||
@section Scripts { |
|||
@Scripts.Render("~/bundles/jqueryval") |
|||
} |
|||
@ -1,29 +0,0 @@ |
|||
@using Test_Website_MVC5_NET45.Models; |
|||
@using Microsoft.AspNet.Identity; |
|||
@{ |
|||
ViewBag.Title = "Manage Account"; |
|||
} |
|||
|
|||
<h2>@ViewBag.Title.</h2> |
|||
|
|||
<p class="text-success">@ViewBag.StatusMessage</p> |
|||
<div class="row"> |
|||
<div class="col-md-12"> |
|||
@if (ViewBag.HasLocalPassword) |
|||
{ |
|||
@Html.Partial("_ChangePasswordPartial") |
|||
} |
|||
else |
|||
{ |
|||
@Html.Partial("_SetPasswordPartial") |
|||
} |
|||
|
|||
<section id="externalLogins"> |
|||
@Html.Action("RemoveAccountList") |
|||
@Html.Partial("_ExternalLoginsListPartial", new { Action = "LinkLogin", ReturnUrl = ViewBag.ReturnUrl }) |
|||
</section> |
|||
</div> |
|||
</div> |
|||
@section Scripts { |
|||
@Scripts.Render("~/bundles/jqueryval") |
|||
} |
|||
@ -1,41 +0,0 @@ |
|||
@model Test_Website_MVC5_NET45.Models.RegisterViewModel |
|||
@{ |
|||
ViewBag.Title = "Register"; |
|||
} |
|||
|
|||
<h2>@ViewBag.Title.</h2> |
|||
|
|||
@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) |
|||
{ |
|||
@Html.AntiForgeryToken() |
|||
<h4>Create a new account.</h4> |
|||
<hr /> |
|||
@Html.ValidationSummary() |
|||
<div class="form-group"> |
|||
@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" }) |
|||
<div class="col-md-10"> |
|||
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control" }) |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
@Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) |
|||
<div class="col-md-10"> |
|||
@Html.PasswordFor(m => m.Password, new { @class = "form-control" }) |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) |
|||
<div class="col-md-10"> |
|||
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<div class="col-md-offset-2 col-md-10"> |
|||
<input type="submit" class="btn btn-default" value="Register" /> |
|||
</div> |
|||
</div> |
|||
} |
|||
|
|||
@section Scripts { |
|||
@Scripts.Render("~/bundles/jqueryval") |
|||
} |
|||
@ -1,36 +0,0 @@ |
|||
@using Microsoft.AspNet.Identity |
|||
@model Test_Website_MVC5_NET45.Models.ManageUserViewModel |
|||
|
|||
<p>You're logged in as <strong>@User.Identity.GetUserName()</strong>.</p> |
|||
|
|||
@using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) |
|||
{ |
|||
@Html.AntiForgeryToken() |
|||
<h4>Change Password Form</h4> |
|||
<hr /> |
|||
@Html.ValidationSummary() |
|||
<div class="form-group"> |
|||
@Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" }) |
|||
<div class="col-md-10"> |
|||
@Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" }) |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
@Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) |
|||
<div class="col-md-10"> |
|||
@Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) |
|||
<div class="col-md-10"> |
|||
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<div class="col-md-offset-2 col-md-10"> |
|||
<input type="submit" value="Change password" class="btn btn-default" /> |
|||
</div> |
|||
</div> |
|||
} |
|||
@ -1,31 +0,0 @@ |
|||
@using Microsoft.Owin.Security |
|||
|
|||
<h4>Use another service to log in.</h4> |
|||
<hr /> |
|||
@{ |
|||
var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes(); |
|||
if (loginProviders.Count() == 0) |
|||
{ |
|||
<div> |
|||
<p>There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=313242">this article</a> |
|||
for details on setting up this ASP.NET application to support logging in via external services.</p> |
|||
</div> |
|||
} |
|||
else |
|||
{ |
|||
string action = Model.Action; |
|||
string returnUrl = Model.ReturnUrl; |
|||
using (Html.BeginForm(action, "Account", new { ReturnUrl = returnUrl })) |
|||
{ |
|||
@Html.AntiForgeryToken() |
|||
<div id="socialLoginList"> |
|||
<p> |
|||
@foreach (AuthenticationDescription p in loginProviders) |
|||
{ |
|||
<button type="submit" class="btn btn-default" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account">@p.AuthenticationType</button> |
|||
} |
|||
</p> |
|||
</div> |
|||
} |
|||
} |
|||
} |
|||
@ -1,34 +0,0 @@ |
|||
@model ICollection<Microsoft.AspNet.Identity.UserLoginInfo> |
|||
|
|||
@if (Model.Count > 0) |
|||
{ |
|||
<h4>Registered Logins</h4> |
|||
<table class="table"> |
|||
<tbody> |
|||
@foreach (var account in Model) |
|||
{ |
|||
<tr> |
|||
<td>@account.LoginProvider</td> |
|||
<td> |
|||
@if (ViewBag.ShowRemoveButton) |
|||
{ |
|||
using (Html.BeginForm("Disassociate", "Account")) |
|||
{ |
|||
@Html.AntiForgeryToken() |
|||
<div> |
|||
@Html.Hidden("loginProvider", account.LoginProvider) |
|||
@Html.Hidden("providerKey", account.ProviderKey) |
|||
<input type="submit" class="btn btn-default" value="Remove" title="Remove this @account.LoginProvider login from your account" /> |
|||
</div> |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
@: |
|||
} |
|||
</td> |
|||
</tr> |
|||
} |
|||
</tbody> |
|||
</table> |
|||
} |
|||
@ -1,32 +0,0 @@ |
|||
@model Test_Website_MVC5_NET45.Models.ManageUserViewModel |
|||
|
|||
<p class="text-info"> |
|||
You do not have a local username/password for this site. Add a local |
|||
account so you can log in without an external login. |
|||
</p> |
|||
|
|||
@using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) |
|||
{ |
|||
@Html.AntiForgeryToken() |
|||
|
|||
<h4>Create Local Login</h4> |
|||
<hr /> |
|||
@Html.ValidationSummary() |
|||
<div class="form-group"> |
|||
@Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) |
|||
<div class="col-md-10"> |
|||
@Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) |
|||
<div class="col-md-10"> |
|||
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<div class="col-md-offset-2 col-md-10"> |
|||
<input type="submit" value="Set password" class="btn btn-default" /> |
|||
</div> |
|||
</div> |
|||
} |
|||
@ -1,7 +0,0 @@ |
|||
@{ |
|||
ViewBag.Title = "About"; |
|||
} |
|||
<h2>@ViewBag.Title.</h2> |
|||
<h3>@ViewBag.Message</h3> |
|||
|
|||
<p>Use this area to provide additional information.</p> |
|||
@ -1,17 +0,0 @@ |
|||
@{ |
|||
ViewBag.Title = "Contact"; |
|||
} |
|||
<h2>@ViewBag.Title.</h2> |
|||
<h3>@ViewBag.Message</h3> |
|||
|
|||
<address> |
|||
One Microsoft Way<br /> |
|||
Redmond, WA 98052-6399<br /> |
|||
<abbr title="Phone">P:</abbr> |
|||
425.555.0100 |
|||
</address> |
|||
|
|||
<address> |
|||
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br /> |
|||
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a> |
|||
</address> |
|||
@ -1,32 +0,0 @@ |
|||
@{ |
|||
ViewBag.Title = "Home Page"; |
|||
} |
|||
|
|||
<div class="jumbotron"> |
|||
<h1>ASP.NET</h1> |
|||
<p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.</p> |
|||
<p><a href="http://asp.net" class="btn btn-primary btn-large">Learn more »</a></p> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-4"> |
|||
<h2>Getting started</h2> |
|||
<p> |
|||
ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that |
|||
enables a clean separation of concerns and gives you full control over markup |
|||
for enjoyable, agile development. |
|||
</p> |
|||
<p><a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkId=301865">Learn more »</a></p> |
|||
</div> |
|||
<div class="col-md-4"> |
|||
<img src="/images/Penguins.jpg?width=300" /> |
|||
<h2>Get more libraries</h2> |
|||
<p>NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.</p> |
|||
<p><a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkId=301866">Learn more »</a></p> |
|||
</div> |
|||
<div class="col-md-4"> |
|||
<h2>Web Hosting</h2> |
|||
<p>You can easily find a web hosting company that offers the right mix of features and price for your applications.</p> |
|||
<p><a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkId=301867">Learn more »</a></p> |
|||
</div> |
|||
</div> |
|||
@ -1,9 +0,0 @@ |
|||
@model System.Web.Mvc.HandleErrorInfo |
|||
|
|||
@{ |
|||
ViewBag.Title = "Error"; |
|||
} |
|||
|
|||
<h1 class="text-danger">Error.</h1> |
|||
<h2 class="text-danger">An error occurred while processing your request.</h2> |
|||
|
|||
@ -1,44 +0,0 @@ |
|||
<!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> |
|||
<div class="navbar navbar-inverse navbar-fixed-top"> |
|||
<div class="container"> |
|||
<div class="navbar-header"> |
|||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
</button> |
|||
@Html.ActionLink("Application name", "Index", "Home", null, new { @class = "navbar-brand" }) |
|||
</div> |
|||
<div class="navbar-collapse collapse"> |
|||
<ul class="nav navbar-nav"> |
|||
<li>@Html.ActionLink("Home", "Index", "Home")</li> |
|||
<li>@Html.ActionLink("About", "About", "Home")</li> |
|||
<li>@Html.ActionLink("Contact", "Contact", "Home")</li> |
|||
</ul> |
|||
@Html.Partial("_LoginPartial") |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="container body-content"> |
|||
@RenderBody() |
|||
<hr /> |
|||
<footer> |
|||
<p>© @DateTime.Now.Year - My ASP.NET Application</p> |
|||
</footer> |
|||
</div> |
|||
|
|||
@Scripts.Render("~/bundles/jquery") |
|||
@Scripts.Render("~/bundles/bootstrap") |
|||
@RenderSection("scripts", required: false) |
|||
</body> |
|||
</html> |
|||
@ -1,22 +0,0 @@ |
|||
@using Microsoft.AspNet.Identity |
|||
@if (Request.IsAuthenticated) |
|||
{ |
|||
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) |
|||
{ |
|||
@Html.AntiForgeryToken() |
|||
|
|||
<ul class="nav navbar-nav navbar-right"> |
|||
<li> |
|||
@Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Manage", "Account", routeValues: null, htmlAttributes: new { title = "Manage" }) |
|||
</li> |
|||
<li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li> |
|||
</ul> |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
<ul class="nav navbar-nav navbar-right"> |
|||
<li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li> |
|||
<li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li> |
|||
</ul> |
|||
} |
|||
@ -1,35 +0,0 @@ |
|||
<?xml version="1.0"?> |
|||
|
|||
<configuration> |
|||
<configSections> |
|||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> |
|||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> |
|||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> |
|||
</sectionGroup> |
|||
</configSections> |
|||
|
|||
<system.web.webPages.razor> |
|||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> |
|||
<pages pageBaseType="System.Web.Mvc.WebViewPage"> |
|||
<namespaces> |
|||
<add namespace="System.Web.Mvc" /> |
|||
<add namespace="System.Web.Mvc.Ajax" /> |
|||
<add namespace="System.Web.Mvc.Html" /> |
|||
<add namespace="System.Web.Optimization"/> |
|||
<add namespace="System.Web.Routing" /> |
|||
<add namespace="Test_Website_MVC5_NET45" /> |
|||
</namespaces> |
|||
</pages> |
|||
</system.web.webPages.razor> |
|||
|
|||
<appSettings> |
|||
<add key="webpages:Enabled" value="false" /> |
|||
</appSettings> |
|||
|
|||
<system.webServer> |
|||
<handlers> |
|||
<remove name="BlockViewHandler"/> |
|||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" /> |
|||
</handlers> |
|||
</system.webServer> |
|||
</configuration> |
|||
@ -1,3 +0,0 @@ |
|||
@{ |
|||
Layout = "~/Views/Shared/_Layout.cshtml"; |
|||
} |
|||
@ -1,30 +0,0 @@ |
|||
<?xml version="1.0"?> |
|||
|
|||
<!-- For more information on using Web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=301874 --> |
|||
|
|||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
|||
<!-- |
|||
In the example below, the "SetAttributes" transform will change the value of |
|||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator |
|||
finds an atrribute "name" that has a value of "MyDB". |
|||
|
|||
<connectionStrings> |
|||
<add name="MyDB" |
|||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" |
|||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/> |
|||
</connectionStrings> |
|||
--> |
|||
<system.web> |
|||
<!-- |
|||
In the example below, the "Replace" transform will replace the entire |
|||
<customErrors> section of your Web.config file. |
|||
Note that because there is only one customErrors section under the |
|||
<system.web> node, there is no need to use the "xdt:Locator" attribute. |
|||
|
|||
<customErrors defaultRedirect="GenericError.htm" |
|||
mode="RemoteOnly" xdt:Transform="Replace"> |
|||
<error statusCode="500" redirect="InternalError.htm"/> |
|||
</customErrors> |
|||
--> |
|||
</system.web> |
|||
</configuration> |
|||
@ -1,31 +0,0 @@ |
|||
<?xml version="1.0"?> |
|||
|
|||
<!-- For more information on using Web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=301874 --> |
|||
|
|||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
|||
<!-- |
|||
In the example below, the "SetAttributes" transform will change the value of |
|||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator |
|||
finds an atrribute "name" that has a value of "MyDB". |
|||
|
|||
<connectionStrings> |
|||
<add name="MyDB" |
|||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" |
|||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/> |
|||
</connectionStrings> |
|||
--> |
|||
<system.web> |
|||
<compilation xdt:Transform="RemoveAttributes(debug)" /> |
|||
<!-- |
|||
In the example below, the "Replace" transform will replace the entire |
|||
<customErrors> section of your Web.config file. |
|||
Note that because there is only one customErrors section under the |
|||
<system.web> node, there is no need to use the "xdt:Locator" attribute. |
|||
|
|||
<customErrors defaultRedirect="GenericError.htm" |
|||
mode="RemoteOnly" xdt:Transform="Replace"> |
|||
<error statusCode="500" redirect="InternalError.htm"/> |
|||
</customErrors> |
|||
--> |
|||
</system.web> |
|||
</configuration> |
|||
@ -1,74 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- |
|||
For more information on how to configure your ASP.NET application, please visit |
|||
http://go.microsoft.com/fwlink/?LinkId=301880 |
|||
--> |
|||
<configuration> |
|||
<configSections> |
|||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> |
|||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> |
|||
<sectionGroup name="imageProcessor"> |
|||
<section name="security" requirePermission="false" type="ImageProcessor.Web.Config.ImageSecuritySection, ImageProcessor.Web" /> |
|||
<section name="processing" requirePermission="false" type="ImageProcessor.Web.Config.ImageProcessingSection, ImageProcessor.Web" /> |
|||
<section name="cache" requirePermission="false" type="ImageProcessor.Web.Config.ImageCacheSection, ImageProcessor.Web" /> |
|||
</sectionGroup> |
|||
</configSections> |
|||
<imageProcessor> |
|||
<security configSource="config\imageprocessor\security.config" /> |
|||
<cache configSource="config\imageprocessor\cache.config" /> |
|||
<processing configSource="config\imageprocessor\processing.config" /> |
|||
</imageProcessor> |
|||
<connectionStrings> |
|||
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\aspnet-Test_Website_MVC5_NET45-20140215112318.mdf;Initial Catalog=aspnet-Test_Website_MVC5_NET45-20140215112318;Integrated Security=True" providerName="System.Data.SqlClient" /> |
|||
</connectionStrings> |
|||
<appSettings> |
|||
<add key="webpages:Version" value="3.0.0.0" /> |
|||
<add key="webpages:Enabled" value="false" /> |
|||
<add key="ClientValidationEnabled" value="true" /> |
|||
<add key="UnobtrusiveJavaScriptEnabled" value="true" /> |
|||
</appSettings> |
|||
<system.web> |
|||
<authentication mode="None" /> |
|||
<compilation debug="true" targetFramework="4.5.1" /> |
|||
<httpRuntime targetFramework="4.5.1" /> |
|||
<!--<httpModules> |
|||
<add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web" /> |
|||
</httpModules>--> |
|||
</system.web> |
|||
<system.webServer> |
|||
<modules> |
|||
<remove name="FormsAuthenticationModule" /> |
|||
<add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web" /> |
|||
</modules> |
|||
</system.webServer> |
|||
<runtime> |
|||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
|||
<dependentAssembly> |
|||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> |
|||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> |
|||
</dependentAssembly> |
|||
<dependentAssembly> |
|||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> |
|||
<bindingRedirect oldVersion="1.0.0.0-5.0.0.0" newVersion="5.0.0.0" /> |
|||
</dependentAssembly> |
|||
<dependentAssembly> |
|||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> |
|||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> |
|||
</dependentAssembly> |
|||
<dependentAssembly> |
|||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /> |
|||
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" /> |
|||
</dependentAssembly> |
|||
</assemblyBinding> |
|||
</runtime> |
|||
<entityFramework> |
|||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> |
|||
<parameters> |
|||
<parameter value="v11.0" /> |
|||
</parameters> |
|||
</defaultConnectionFactory> |
|||
<providers> |
|||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> |
|||
</providers> |
|||
</entityFramework> |
|||
</configuration> |
|||
@ -1,3 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<cache virtualPath="~/app_data/cache" maxDays="56"/> |
|||
|
|||
@ -1,43 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<processing> |
|||
<presets> |
|||
<!--<preset name="demo" value="width=300&height=150&bgcolor=transparent"/>--> |
|||
</presets> |
|||
<plugins autoLoadPlugins="true"> |
|||
<plugin name="Alpha" type="ImageProcessor.Processors.Alpha, ImageProcessor"/> |
|||
<plugin name="Brightness" type="ImageProcessor.Processors.Brightness, ImageProcessor"/> |
|||
<plugin name="Contrast" type="ImageProcessor.Processors.Contrast, ImageProcessor"/> |
|||
<plugin name="Crop" type="ImageProcessor.Processors.Crop, ImageProcessor"/> |
|||
<plugin name="Filter" type="ImageProcessor.Processors.Filter, ImageProcessor"/> |
|||
<plugin name="Flip" type="ImageProcessor.Processors.Flip, ImageProcessor"/> |
|||
<plugin name="Format" type="ImageProcessor.Processors.Format, ImageProcessor"/> |
|||
<plugin name="GaussianBlur" type="ImageProcessor.Processors.GaussianBlur, ImageProcessor"> |
|||
<settings> |
|||
<setting key="MaxSize" value="22"/> |
|||
<setting key="MaxSigma" value="5.1"/> |
|||
<setting key="MaxThreshold" value="100"/> |
|||
</settings> |
|||
</plugin> |
|||
<plugin name="GaussianSharpen" type="ImageProcessor.Processors.GaussianSharpen, ImageProcessor"> |
|||
<settings> |
|||
<setting key="MaxSize" value="22"/> |
|||
<setting key="MaxSigma" value="5.1"/> |
|||
<setting key="MaxThreshold" value="100"/> |
|||
</settings> |
|||
</plugin> |
|||
<plugin name="Quality" type="ImageProcessor.Processors.Quality, ImageProcessor"/> |
|||
<plugin name="Resize" type="ImageProcessor.Processors.Resize, ImageProcessor"> |
|||
<settings> |
|||
<setting key="MaxWidth" value="3000"/> |
|||
<setting key="MaxHeight" value="3000"/> |
|||
<!--<setting key="RestrictTo" value="width=300height=300,width=300height=300"/>--> |
|||
</settings> |
|||
</plugin> |
|||
<plugin name="Rotate" type="ImageProcessor.Processors.Rotate, ImageProcessor"/> |
|||
<plugin name="RoundedCorners" type="ImageProcessor.Processors.RoundedCorners, ImageProcessor"/> |
|||
<plugin name="Saturation" type="ImageProcessor.Processors.Saturation, ImageProcessor"/> |
|||
<plugin name="Vignette" type="ImageProcessor.Processors.Vignette, ImageProcessor"/> |
|||
<plugin name="Watermark" type="ImageProcessor.Processors.Watermark, ImageProcessor"/> |
|||
</plugins> |
|||
</processing> |
|||
|
|||
@ -1,14 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<security allowRemoteDownloads="true" timeout="300000" maxBytes="524288" remotePrefix="/remote.axd"> |
|||
<whiteList> |
|||
<add url="http://images.mymovies.net"/> |
|||
<add url="http://maps.googleapis.com" extensionLess="true" imageFormat=".png"/> |
|||
<add url="https://fbcdn-profile-"/> |
|||
<add url="http://fbcdn-profile-"/> |
|||
<add url="https://profile."/> |
|||
<add url="http://profile."/> |
|||
<add url="https://pbs.twimg.com"/> |
|||
<add url="http://pbs.twimg.com"/> |
|||
<add url="http://placekitten.com"/> |
|||
</whiteList> |
|||
</security> |
|||
|
Before Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB |
Binary file not shown.
Binary file not shown.
@ -1,31 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<packages> |
|||
<package id="Antlr" version="3.4.1.9004" targetFramework="net451" /> |
|||
<package id="bootstrap" version="3.0.0" targetFramework="net451" /> |
|||
<package id="EntityFramework" version="6.0.0" targetFramework="net451" /> |
|||
<package id="jQuery" version="1.10.2" targetFramework="net451" /> |
|||
<package id="jQuery.Validation" version="1.11.1" targetFramework="net451" /> |
|||
<package id="Microsoft.AspNet.Identity.Core" version="1.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.AspNet.Identity.EntityFramework" version="1.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.AspNet.Identity.Owin" version="1.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.AspNet.Mvc" version="5.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.AspNet.Razor" version="3.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.1" targetFramework="net451" /> |
|||
<package id="Microsoft.AspNet.WebPages" version="3.0.1" targetFramework="net451" /> |
|||
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.Owin" version="2.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.Owin.Host.SystemWeb" version="2.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.Owin.Security" version="2.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.Owin.Security.Cookies" version="2.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.Owin.Security.Facebook" version="2.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.Owin.Security.Google" version="2.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.Owin.Security.MicrosoftAccount" version="2.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.Owin.Security.OAuth" version="2.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.Owin.Security.Twitter" version="2.0.0" targetFramework="net451" /> |
|||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net451" /> |
|||
<package id="Modernizr" version="2.6.2" targetFramework="net451" /> |
|||
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net451" /> |
|||
<package id="Owin" version="1.0" targetFramework="net451" /> |
|||
<package id="Respond" version="1.2.0" targetFramework="net451" /> |
|||
<package id="WebGrease" version="1.5.2" targetFramework="net451" /> |
|||
</packages> |
|||
Loading…
Reference in new issue