Trying to create custom AuthenticationHandler
is throwing an exception in Orleans.CodeGenerator
.
I've created this sample so it will be easily testable.
- Git Clone
- Build Solution
- Launch Project (F5)
- I've created
AuthHandler
which inherits from: AuthenticationHandler<JwtBearerOptions>
which is not being used. - This is throwing a
Orleans.CodeGenerator.CodeGenerationException
during runtime inOrleansConfig.cs
atLine 41
.
Exc level 0: Orleans.CodeGenerator.CodeGenerationException: (1,3052): error CS0266: Cannot implicitly convert type 'object' to 'Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerEvents'. An explicit conversion exists (are you missing a cast?)
(1,8967): error CS0266: Cannot implicitly convert type 'object' to 'Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerEvents'. An explicit conversion exists (are you missing a cast?)
at Orleans.CodeGenerator.CodeGeneratorCommon.CompileAssembly(GeneratedSyntax generatedSyntax, String assemblyName, Boolean emitDebugSymbols)
at Orleans.CodeGenerator.RoslynCodeGenerator.CompileAndLoad(GeneratedSyntax generatedSyntax, Boolean emitDebugSymbols)
at Orleans.CodeGenerator.RoslynCodeGenerator.GenerateAndLoadForAssemblies(Assembly[] inputs)
If it will throw an exception at Line 43
that Orleans.Runtime.SiloUnavailableException: The target silo became unavailable for message:
it means that the applications is working fine.