Add Custom Claim Types

As I’ve checked your Code there are no problem in it. Here’s what I want you to do: Check if the cache was clear. If your cache was not cleared you can clear it like this: CTRL+SHIFT+DELETE It’s because during your login, it will save in cookies and it was not clear, and it happens … Read more

In self-hosted OWIN Web API, how to run code at shutdown?

I think there is a better way to get the CancellationToken: var properties = new AppProperties(app.Properties); CancellationToken token = properties.OnAppDisposing; AppProperties is under namespace Microsoft.Owin.BuilderProperties, which comes from this nuget package: http://www.nuget.org/packages/Microsoft.Owin/ The description of property OnAppDisposing says: Gets or sets the cancellation token for “host.OnAppDisposing”. Please refer to: http://msdn.microsoft.com/en-us/library/microsoft.owin.builderproperties.appproperties%28v=vs.113%29.aspx

Translate ninject ISecureDataFormat binding to Autofac

The migration from Ninject to Autofac seems to be correct, but the binding for the ISecureDataFormat<AuthenticationTicket> interface may not be working as expected, leading to an activation error in some dependencies. Based on the debugging messages, the BearerTokenCookieStore class is failing to resolve this dependency. In the Ninject version, ISecureDataFormat<AuthenticationTicket> is bound to a method … Read more

Disable *all* exception handling in ASP.NET Web API 2 (to make room for my own)?

Update: I blogged about this. When researching the blog post, I found some potential for improvement; I’ve updated the relevant parts of this answer. For more detail on why I think this is better than all other suggestions here, or the default behavior, read the entire post 🙂 I have now gone with the following … Read more

MVC 5 How to define Owin LoginPath with localized routes

I exactly had the same problem and figured out a way to overcome this limitation. In the CookieAuthenticationOptions options, there is a “Provider” property which is initialized with the CookieAuthenticationProvider. This implements a method called ApplyRedirect and a delegate OnApplyRedirect. My first idea was to overwrite this ApplyRedirect and implement the required logic to handle … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)