Owinhost.exe has problem with web api

I try to host a Web Api application with OwinHost.exe but I get this error message:

Error: System.ArgumentException
No conversion available between System.Func2[System.Collections.Generic.IDictionary2[System.String,System.Object],System.Threading.Tasks.Task] and Microsoft.Owin.OwinMiddleware.
Parameter name: signature