You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.
I'm using the console client credentials flow example and when I call the self host it works, but when i call my own id server it doesn't(i don't get a token response, and an exception is thrown in the logs). One possibly important difference between our id server and the self host example is that I save the client info to the db instead of it being in memory all the time . The client that is set up on my id server is:
new Client
{
ClientId = "ConsoleClient",
ClientName = "ConsoleClient",
Flow = Flows.ClientCredentials,
Enabled = true,
ClientSecrets = new List<Secret>
{
new Secret("F621F470-9731-4A25-80EF-888888888888".Sha256())
},
AllowedScopes = new List<string>
{
"ScopeAPI"
},
Claims = new List<Claim>
{
new Claim("location", "datacenter")
}
}
and I'm calling it by
var client = new TokenClient(
Constants.TokenEndpoint,
"ConsoleClient",
"F621F470-9731-4A25-80EF-888888888888");
return client.RequestClientCredentialsAsync("ScopeAPI").Result;
The exception I get from the logs is below(and attached, since its hard to read), but the TokenResponse that gets returned is just 'Internal Server Error'. Fwiw, I have had the same kind of exception when authenticating with my mvc app and re publishing the id server project typically fixes it(in that case). Any ideas would be appreciated.
System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task1<!!0> System.Data.Entity.QueryableExtensions.SingleOrDefaultAsync(System.Linq.IQueryable1<!!0>, System.Linq.Expressions.Expression1<System.Func2<!!0,Boolean>>)'. at
IdentityServer3.EntityFramework.ClientStore.d__2.MoveNext() at
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.Start[TStateMachine](TStateMachine& stateMachine) at IdentityServer3.EntityFramework.ClientStore.FindClientByIdAsync(String clientId) at IdentityServer3.Core.Services.Caching.CachingClientStore.<>c__DisplayClass1.<<FindClientByIdAsync>b__0>d__3.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Services\Caching\CachingClientStore.cs:line 0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at IdentityServer3.Core.Extensions.ICacheExtensions.<GetAsync>d__01.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Extensions\ICacheExtensions.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
IdentityServer3.Core.Services.Caching.CachingClientStore.d__6.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Services\Caching\CachingClientStore.cs:line 60
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
IdentityServer3.Core.Validation.ClientSecretValidator.d__2.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Validation\ClientSecretValidator.cs:line 63
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
IdentityServer3.Core.Endpoints.TokenEndpointController.d__7.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\TokenEndpointController.cs:line 98
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
IdentityServer3.Core.Endpoints.TokenEndpointController.d__0.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\TokenEndpointController.cs:line 74
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Threading.Tasks.System.Web.Http910911.TaskHelpersExtensions.d__3`1.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Web.Http.Filters.ActionFilterAttribute.d__0.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Web.Http.Filters.AuthorizationFilterAttribute.d__2.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
Thanks,
--Jason
The text was updated successfully, but these errors were encountered:
System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task1<!!0> System.Data.Entity.QueryableExtensions.SingleOrDefaultAsync(System.Linq.IQueryable1<!!0>, System.Linq.Expressions.Expression1<System.Func2<!!0,Boolean>>)'. at
Could be, but threading is in mscorlib I think, and all of these projects are .net 4.5.2(perhaps it should be a lower version?) It seems to work much better if i take the client project out of a larger solution(that's under source control, fwiw) and put it in its own solution. I'm not sure there's much more I can say about symptoms or causes. I'm using vs 2015?
Question / Issue
I'm using the console client credentials flow example and when I call the self host it works, but when i call my own id server it doesn't(i don't get a token response, and an exception is thrown in the logs). One possibly important difference between our id server and the self host example is that I save the client info to the db instead of it being in memory all the time . The client that is set up on my id server is:
and I'm calling it by
The exception I get from the logs is below(and attached, since its hard to read), but the TokenResponse that gets returned is just 'Internal Server Error'. Fwiw, I have had the same kind of exception when authenticating with my mvc app and re publishing the id server project typically fixes it(in that case). Any ideas would be appreciated.
stacktraceAndError.txt
Relevant parts of the log file
Start token request
Secret id found: "ConsoleClient"
Unhandled exception accessing: /auth/core/connect/token
And the exception is
System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task
1<!!0> System.Data.Entity.QueryableExtensions.SingleOrDefaultAsync(System.Linq.IQueryable
1<!!0>, System.Linq.Expressions.Expression1<System.Func
2<!!0,Boolean>>)'. atIdentityServer3.EntityFramework.ClientStore.d__2.MoveNext() at
System.Runtime.CompilerServices.AsyncTaskMethodBuilder
1.Start[TStateMachine](TStateMachine& stateMachine) at IdentityServer3.EntityFramework.ClientStore.FindClientByIdAsync(String clientId) at IdentityServer3.Core.Services.Caching.CachingClientStore.<>c__DisplayClass1.<<FindClientByIdAsync>b__0>d__3.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Services\Caching\CachingClientStore.cs:line 0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at IdentityServer3.Core.Extensions.ICacheExtensions.<GetAsync>d__0
1.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Extensions\ICacheExtensions.cs:line 0--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
IdentityServer3.Core.Services.Caching.CachingClientStore.d__6.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Services\Caching\CachingClientStore.cs:line 60
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
IdentityServer3.Core.Validation.ClientSecretValidator.d__2.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Validation\ClientSecretValidator.cs:line 63
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
IdentityServer3.Core.Endpoints.TokenEndpointController.d__7.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\TokenEndpointController.cs:line 98
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
IdentityServer3.Core.Endpoints.TokenEndpointController.d__0.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\TokenEndpointController.cs:line 74
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Threading.Tasks.System.Web.Http910911.TaskHelpersExtensions.d__3`1.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Web.Http.Filters.ActionFilterAttribute.d__0.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Web.Http.Filters.AuthorizationFilterAttribute.d__2.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at
System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext() in c:\local\identity\server3\IdentityServer3\source\Core\Endpoints\Connect\DiscoveryEndpointController.cs:line 0
Thanks,
--Jason
The text was updated successfully, but these errors were encountered: