Giter Site home page Giter Site logo

brockallen / cookietempdata Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 4.0 4.97 MB

Cookie-based TempData provider for ASP.NET MVC

Home Page: http://brockallen.com/2012/06/11/cookie-based-tempdata-provider/

C# 28.39% CSS 1.49% ASP 0.17% JavaScript 69.95%

cookietempdata's People

Contributors

brockallen avatar jonathantower avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cookietempdata's Issues

Error occurred during a cryptographic operation

System.Security.Cryptography.CryptographicException
Error occurred during a cryptographic operation.

Summary of scenario

IdPSrv v2 -> ADFS -> SharePoint.

IdPSrv exists on two servers with load traffic manager serving requests.
ADFS farm with primary, secondary and two proxies.
SharePoint has a single WFE.

When I log in I'm passed around and eventually hit SharePoint. I wait without clicking on anything for 50 minutes (49 minutes is fine) and then click to move to another page. I get passed back to IdPServ (via ADFS) and the cryptographic operation leaps out.

Suspect that its because the IdPServ exists on two servers - and the machine key's aren't set on them.

'Invalid length for a Base-64 char array or string.' when using cookie tempdata provider

Getting the following error when using the CookieTempDataProvider

c:\ballen\github\brockallen\CookieTempData\45\BrockAllen.CookieTempData\CookieTempDataProvider.cs (Line 145, Column 13)
c:\ballen\github\brockallen\CookieTempData\45\BrockAllen.CookieTempData\CookieTempDataProvider.cs (Line 42, Column 13)
   at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)
   at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
   at System.Convert.FromBase64String(String s)
   at BrockAllen.CookieTempData.CookieTempDataProvider.Unprotect(String value, HttpContextBase ctx) in c:\ballen\github\brockallen\CookieTempData\45\BrockAllen.CookieTempData\CookieTempDataProvider.cs:line 145
   at BrockAllen.CookieTempData.CookieTempDataProvider.LoadTempData(ControllerContext controllerContext) in c:\ballen\github\brockallen\CookieTempData\45\BrockAllen.CookieTempData\CookieTempDataProvider.cs:line 42
   at System.Web.Mvc.TempDataDictionary.Load(ControllerContext controllerContext, ITempDataProvider tempDataProvider)
   at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag)
   at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
   at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDele
    public class RecruiterController : Controller
    {
        public RecruiterController()
        {
            this.TempDataProvider = new CookieTempDataProvider();
        }
}

Problem with Model State

Hello,

I am having trouble storing the ModelState using the following provider. Is this supported?

I use it to export model state when performing a redirect, which seems to be a very popular pattern in the community.

thanks!

Cookie limits problematic for validation

Even modern browsers appear to have a mean size limit. Chrome and Firefox let you have 4K sharp, IE11 not much more.

Even though CookieTempData compresses the key-value-pairs, this can quickly get to be too little.

If the data get's above 4K, what happens is that the browser (Chrome anyway) will not store the cookie and the temp data is simply lost.

Arguably, an exception would be better here, especially during debugging. Conceivable is also to have the information truncated somehow and pass the problem through the temp data so that the page can display a nicer error message to the user.

Problem With CookieTempData

Hello,
CookieTempData not worked in my app(MVC 4 & DOT.NET 4.5),so i changed CookieTempDataControllerFactory class to public and removed 'PreApplicationStartMethod' attribute and call 'AppStart.Start' in my 'Global.asax.cs',Now that work!!!

what is couse of this problem?

Error occurred during a cryptographic operation.

After installing the package on NuGet we're regularly getting the following error:

System.Security.Cryptography.CryptographicException
Error occurred during a cryptographic operation.

Stack trace:

System.Security.Cryptography.CryptographicException: Error occurred during a cryptographic operation.
   at System.Web.Security.Cryptography.HomogenizingCryptoServiceWrapper.HomogenizeErrors(Func`2 func, Byte[] input)
   at BrockAllen.CookieTempData.CookieTempDataProvider.Unprotect(String value, HttpContextBase ctx)
   at BrockAllen.CookieTempData.CookieTempDataProvider.LoadTempData(ControllerContext controllerContext)
   at System.Web.Mvc.TempDataDictionary.Load(ControllerContext controllerContext, ITempDataProvider tempDataProvider)
   at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag)
   at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
   at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
   at System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag)
   at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

We have two servers in our web farm and are using the same machine key on both.

Is it likely that this would be caused by two different clients logging in as the same user account at the same time? It seems that's when we often have the problem but it could just be coincidental.

Handle the case when an app tries to store so many data tha a cookie size isn't enough for it

When an application tries to store quite a lot of objects in TempData the space required to store it can be greater than the available space in a cookie. In this case CookieTempData could have any of this three behaviors:

  • throw an Exception showing the problem
  • use extra cookies so that all the information can be stored - the cookie name could have a sequential number at the end. However there should be a hard or configurable setting for the maximum number of cookies to use (1)
  • use a fallback store with higher capacity to store the data. This fallback should also be configurable. Perhaps the fallback could simply be another ITempData, configurable or hardcoded.

(1) according to http://stackoverflow.com/questions/1131867/can-one-domain-have-multiple-cookies there are a limit in the number of cookies per site between of at least 50, depending on the browser, although I don't know if this is for session cookies or for permanent cookies. This should be taken into account. If the maximum number of cookies is configurable, the developer can keep some extra cookies for other uses in his domain.

Circular references..

It seems that there are circular references in the object hierarchy which is not supported by the JSON serializer.

In my case it was:
A circular reference was detected while serializing an object of type 'System.Globalization.CultureInfo'.

I am simply trying to serialize the ModelState from MVC (most common thing needed)

Seems most people use binary formatter...
var memStream = new MemoryStream();
memStream.Seek(0, SeekOrigin.Begin);
var binFormatter = new BinaryFormatter();
binFormatter.Serialize(memStream, values);
memStream.Seek(0, SeekOrigin.Begin);
var bytes = memStream.ToArray();
return Convert.ToBase64String(bytes);

http://afana.me/post/session-less-controllers-and-TempData-ASPNET-MVC.aspx
http://aspnetwebstack.codeplex.com/SourceControl/changeset/view/1d34d93f0665#src%2fMicrosoft.Web.Mvc%2fCookieTempDataProvider.cs

The SessionStateTempDataProvider class requires session state to be enabled : Error on production server

I'm using the library on Dev server and it works but when I upload it to the production server , It throws an exception as below :

The SessionStateTempDataProvider class requires session state to be enabled.

System.InvalidOperationException: The SessionStateTempDataProvider class requires session state to be enabled.

at System.Web.Mvc.SessionStateTempDataProvider.SaveTempData(ControllerContext controllerContext, IDictionary`2 values)

at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)

at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)

at System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState)

at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I'm using StructureMap by the way.

No way to change the serialization

JsonConvert.SerializeObject() works more often that what you have.
However, there is no way to configure your class to use a different serialization.

Using the binary serialization, found storing ModelState into tempdata (the main use) always results in a cookie over 4k. Json results in a 500 byte one...

Also, please do not hook up tempdata in your class. Leave that one line of code to the user of the package so we can take care of IoC and such.

TempData on SignOut

I just started using CookieTempData provider on a site I'm developing. I'm utilizing it to store success/error messages that need to be preserved on redirects.

It works well on most pages. However, if I use it when signing out of my site using FormsAuthentication.SignOut(), the TempData is not persisted on the Redirect.

I used Fiddler to verify that there are no intermediate redirects occurring.

I wasn't sure if FormsAuthentication.SignOut() was doing something extra behind the scenes so I tried manually expiring the authentication cookie. However, the odd behavior still occurred.

I'm wondering if it has something to do with expiring HttpOnly auth cookies.

This was in VS 2013 / Embedded IIS / .Net 4.5

Move dependencies to NuGet packages

I'm experiencing an error on my build server when building the views on my MVC project:

(MvcBuildViews target) -> [14:23:30][Step 1/1] error ASPRUNTIME : The pre-application start initialization method Start on type BrockAllen.CookieTempData.AppStart threw an exception with the following error message: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [C:\TeamCity\buildAgent\work\5e9fa80329d6276\src\RelocationMoverServices.Web.UI\RelocationMoverServices.Web.UI.csproj] [14:23:30][Step 1/1]

I noticed there are a couple of dependencies here that could be moved to NuGet packages:

  1. Microsoft.Web.Infrastructure
  2. System.Web.Mvc
  3. Possibly other stuff, which I might find if I dug deeper.

What's the minimum version of MVC that you need to support? Let me know and I'd be down to attempt a PR.

Transient CryptographicException in LoginExternal

Hello folks,

I get this exception from time to time & it disappears without changing anything.

Hosting Environment: Windows Server 2012 R2 (IIS 8.5) - No web farm (single web server)

Here is the related log

2016-03-16 14:44:29.6998|DEBUG|WebApi Diagnostics|Operation=ReflectedHttpActionDescriptor.ExecuteAsync, Exception=System.Security.Cryptography.CryptographicException: Error occurred during a cryptographic operation.
   at System.Web.Security.Cryptography.HomogenizingCryptoServiceWrapper.HomogenizeErrors(Func`2 func, Byte[] input)
   at IdentityServer3.Core.Extensions.IDataProtectorExtensions.Unprotect(IDataProtector protector, String data, String entropy)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.Unprotect(String data, IDataProtector protector)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.ReadByCookieName(String name)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.Read(String id)
   at IdentityServer3.Core.Endpoints.AuthenticationController.<LoginExternal>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.System.Web.Http875772.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()
2016-03-16 14:44:29.7208|DEBUG|WebApi Diagnostics|Operation=ApiControllerActionInvoker.InvokeActionAsync, Exception=System.Security.Cryptography.CryptographicException: Error occurred during a cryptographic operation.
   at System.Web.Security.Cryptography.HomogenizingCryptoServiceWrapper.HomogenizeErrors(Func`2 func, Byte[] input)
   at IdentityServer3.Core.Extensions.IDataProtectorExtensions.Unprotect(IDataProtector protector, String data, String entropy)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.Unprotect(String data, IDataProtector protector)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.ReadByCookieName(String name)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.Read(String id)
   at IdentityServer3.Core.Endpoints.AuthenticationController.<LoginExternal>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.System.Web.Http875772.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()
2016-03-16 14:44:29.7310|DEBUG|WebApi Diagnostics|Operation=NoCacheAttribute.OnActionExecutedAsync, Exception=System.Security.Cryptography.CryptographicException: Error occurred during a cryptographic operation.
   at System.Web.Security.Cryptography.HomogenizingCryptoServiceWrapper.HomogenizeErrors(Func`2 func, Byte[] input)
   at IdentityServer3.Core.Extensions.IDataProtectorExtensions.Unprotect(IDataProtector protector, String data, String entropy)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.Unprotect(String data, IDataProtector protector)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.ReadByCookieName(String name)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.Read(String id)
   at IdentityServer3.Core.Endpoints.AuthenticationController.<LoginExternal>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.System.Web.Http875772.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
2016-03-16 14:44:29.7467|DEBUG|WebApi Diagnostics|Operation=SecurityHeadersAttribute.OnActionExecutedAsync, Exception=System.Security.Cryptography.CryptographicException: Error occurred during a cryptographic operation.
   at System.Web.Security.Cryptography.HomogenizingCryptoServiceWrapper.HomogenizeErrors(Func`2 func, Byte[] input)
   at IdentityServer3.Core.Extensions.IDataProtectorExtensions.Unprotect(IDataProtector protector, String data, String entropy)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.Unprotect(String data, IDataProtector protector)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.ReadByCookieName(String name)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.Read(String id)
   at IdentityServer3.Core.Endpoints.AuthenticationController.<LoginExternal>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.System.Web.Http875772.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
2016-03-16 14:44:30.2467|DEBUG|WebApi Diagnostics|Operation=ErrorPageFilterAttribute.OnExceptionAsync, Status=200 (OK), Exception=System.Security.Cryptography.CryptographicException: Error occurred during a cryptographic operation.
   at System.Web.Security.Cryptography.HomogenizingCryptoServiceWrapper.HomogenizeErrors(Func`2 func, Byte[] input)
   at IdentityServer3.Core.Extensions.IDataProtectorExtensions.Unprotect(IDataProtector protector, String data, String entropy)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.Unprotect(String data, IDataProtector protector)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.ReadByCookieName(String name)
   at IdentityServer3.Core.Configuration.Hosting.MessageCookie`1.Read(String id)
   at IdentityServer3.Core.Endpoints.AuthenticationController.<LoginExternal>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.System.Web.Http875772.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__18`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.