I am working on implementing a custom FormsAuthenticationProvider and I'm getting a middleware conversion error.

No conversion available between System.Func`2[System.Collections.Generic.IDictionary`2
[System.String,System.Object],System.Threading.Tasks.Task] and Microsoft.Owin.OwinMiddleware
Parameter name: signature


My stack includes 


Owin
Katana
Nancy


My specific question would be any advice on where to look for an example on how to implement a custom FormsAuthenticationProvider? Unless someone can spot my problem.

My implementation looks like:

Startup.cs

app.UseFormsAuthentication(new FormsAuthenticationOptions
            {
                LoginPath = "/login",
                LogoutPath = "/logout",
                CookieHttpOnly = true,
                AuthenticationType = Constants.ChainLinkAuthType,
                CookieName = "chainlink.id",
                ExpireTimeSpan = TimeSpan.FromDays(30),
                Provider = kernel.Get&lt;IFormsAuthenticationProvider&gt;()
            });


If I remove the app.UseFormsAuthentication(...) the application runs without error.

Full Stack Trace

[ArgumentException: No conversion available between System.Func`2[System.Collections.Generic.IDictionary`2[System.String,System.Object],System.Threading.Tasks.Task] and Microsoft.Owin.OwinMiddleware
Parameter name: signature]
   Owin.Builder.AppBuilder.Convert(Type signature, Object app) +328
   Owin.Builder.AppBuilder.BuildInternal(Type signature) +336
   Owin.Builder.AppBuilder.Build(Type returnType) +42
   Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup) +650
   Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) +86
   Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build() +185
   System.Lazy`1.CreateValue() +416
   System.Lazy`1.LazyInitValue() +152
   System.Lazy`1.get_Value() +75
   Microsoft.Owin.Host.SystemWeb.OwinApplication.get_Instance() +35
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +106
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): No conversion available between     System.Func`2[System.Collections.Generic.IDictionary`2[System.String,System.Object],System.Threading.Tasks.Task] and Microsoft.Owin.OwinMiddleware
Parameter name: signature]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9874568
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr,  HttpContext context) +254


Executable Source Code (Just F5 it and you'll get the error immediately)

https://github.com/cnwilkin/ChainLink/tree/spike


Question: I don't have a dedicated GPU and I can't install DirectX to play NFS Most Wanted
Answer: Every computer built in the last 5 years or so has a 3D capable graphics card.  Need for Speed Most Wanted has modest system requirements, so it's likely that if you have a fairly recent computer, you'll be able to play it.

You can identify the model and type of your graphics card by going into the device manager.  You may also need to update your graphics drivers before you'll be able to play.  

As far as your DirectX error goes, I found one guide that gave a hint:


  DirectX Error when Installing: When installing the game if you get an error that DirectX9.0c is not installed, even if you've installed DX9.0c already, then find the game's Autorun.exe file (in the base directory of the game CD), right-click on it, select Properties, go to the Compatibility tab, tick the 'Run this program in compatibility mode for' and select 'Windows 2000'. Then double-click on Autorun.exe to begin installation. Make sure to turn off compatibility mode after installing the game.


If this doesn't fix your problem, you're going to have to provide more detail in your question.