From 470f217374f5df6050ba2c7298dd3ea7efb95ff7 Mon Sep 17 00:00:00 2001 From: Praburaj Date: Thu, 24 Apr 2014 14:35:14 -0700 Subject: [PATCH] HttpContext.User is being populated with an anonymous identity with a recent change. So I dont have to check for null before. Fixing the app accordingly. --- src/MusicStore/Views/Shared/_LoginPartial.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MusicStore/Views/Shared/_LoginPartial.cshtml b/src/MusicStore/Views/Shared/_LoginPartial.cshtml index 9d5c3cf717..975f2f6774 100644 --- a/src/MusicStore/Views/Shared/_LoginPartial.cshtml +++ b/src/MusicStore/Views/Shared/_LoginPartial.cshtml @@ -1,6 +1,6 @@ @using System.Security.Principal -@if (Context.HttpContext.User != null && Context.HttpContext.User.Identity.IsAuthenticated) +@if (Context.HttpContext.User.Identity.IsAuthenticated) { using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) {