Microsoft Graph API appCatalogs/teamsApps fails when using application credential - microsoft-graph-api

We found that the API appCatalogs/teamsApp (https://learn.microsoft.com/en-us/graph/api/appcatalogs-list-teamsapps) stopped working when use application credential. It was working fine a few days ago. We checked and ensured that we have assigned sufficient permissions according to the document. By comparison, when use password credential with delegate permissions, this API works.
Not sure if this a temporary issue, or there is some change.
Also noticed that the error messages are not consistent between tests. Sometimes it says
Failed to execute Aad backend request GetTenantSubscribedSkusRequest, and sometimes it returns Failed to execute Aad backend request GetUserLicensesRequest. Here is one example of the response in a Postman test including the error message:
{
"error": {
"code": "Forbidden",
"message": "Exception in GetUserAggregatedAppsAsync., UserId: '88fe7d3c-f489-xxxx-xxxx-xxxxxxxxxxxx' Exception: System.AggregateException: One or more errors occurred. ---> Microsoft.SkypeSpaces.MiddleTier.Common.ServiceException: Failed to execute Aad backend request GetUserLicensesRequest. Workload Unknown. Request Url: https://graph.windows.net/4ed49f23-73c9-xxxx-xxxx-xxxxxxxxxxxx/users/88fe7d3c-f489-xxxx-xxxx-xxxxxxxxxxxx/licenseDetails?api-version=1.6, Request Method: GET, Response Status Code: Unauthorized, Response Headers: ocp-aad-diagnostics-server-name: khPOVZXWnH8D7cYi/jPTse34lSXOYF4VeaGgIR3yMUA=\r\nrequest-id: b67895eb-6f86-4b16-8cc7-9ab890fbce6a\r\nclient-request-id: 6bf652e8-19af-446e-ba74-4cc2df669b47\r\nStrict-Transport-Security: max-age=31536000; includeSubDomains\r\nDate: Fri, 03 Jun 2022 14:24:00 GMT\r\n, Reason Phrase: Unauthorized\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.CommonServiceRequestBase`1.HandleErrorResponseAsync(HttpRequestMessage requestMessage, HttpResponseMessage responseMessage, String piiScrubbedRequestUrl, StringBuilder rawHeadersBuilder, IPerfTracker tracker) in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\CommonServiceRequestBase.cs:line 434\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.CommonServiceRequestBase`1.<ExecuteHttpRequestAsync>d__41.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\CommonServiceRequestBase.cs:line 373\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.CommonServiceRequestBase`1.<ExecuteAsync>d__38.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\CommonServiceRequestBase.cs:line 176\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.AAD.ServiceRequestBase`1.<ExecuteAsync>d__18.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\AAD\\Requests\\ServiceRequestBase.cs:line 0\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.AAD.AADService.<GetUserLicenseDetails>d__63.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\AAD\\AADService.cs:line 1430\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.AAD.AADService.<GetUserLicenseDetails>d__14.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\AAD\\AADService.cs:line 89\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.Provider.Utilities.UserLicenseAndTenantSettingsManager.<GetApplicableSkuCategoriesForUser>d__18.MoveNext() in D:\\a\\_work\\1\\s\\Source\\Provider\\Provider\\Utilities\\UserLicenseAndTenantSettingsManager.cs:line 451\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.Common.InstrumentedAsyncFunc`1.<ExecuteAsync>d__12.MoveNext() in D:\\a\\_work\\1\\s\\Source\\Common\\Common\\InstrumentedAsyncFunc.cs:line 118\r\n --- End of inner exception stack trace ---\r\n---> (Inner Exception #0) Microsoft.SkypeSpaces.MiddleTier.Common.ServiceException: Failed to execute Aad backend request GetUserLicensesRequest. Workload Unknown. Request Url: https://graph.windows.net/4ed49f23-73c9-xxxx-xxxx-xxxxxxxxxxxx/users/88fe7d3c-f489-xxxx-xxxx-xxxxxxxxxxxx/licenseDetails?api-version=1.6, Request Method: GET, Response Status Code: Unauthorized, Response Headers: ocp-aad-diagnostics-server-name: khPOVZXWnH8D7cYi/jPTse34lSXOYF4VeaGgIR3yMUA=\r\nrequest-id: b67895eb-6f86-4b16-8cc7-9ab890fbce6a\r\nclient-request-id: 6bf652e8-19af-446e-ba74-4cc2df669b47\r\nStrict-Transport-Security: max-age=31536000; includeSubDomains\r\nDate: Fri, 03 Jun 2022 14:24:00 GMT\r\n, Reason Phrase: Unauthorized\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.CommonServiceRequestBase`1.HandleErrorResponseAsync(HttpRequestMessage requestMessage, HttpResponseMessage responseMessage, String piiScrubbedRequestUrl, StringBuilder rawHeadersBuilder, IPerfTracker tracker) in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\CommonServiceRequestBase.cs:line 434\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.CommonServiceRequestBase`1.<ExecuteHttpRequestAsync>d__41.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\CommonServiceRequestBase.cs:line 373\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.CommonServiceRequestBase`1.<ExecuteAsync>d__38.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\CommonServiceRequestBase.cs:line 176\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.AAD.ServiceRequestBase`1.<ExecuteAsync>d__18.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\AAD\\Requests\\ServiceRequestBase.cs:line 0\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.AAD.AADService.<GetUserLicenseDetails>d__63.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\AAD\\AADService.cs:line 1430\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.AAD.AADService.<GetUserLicenseDetails>d__14.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\AAD\\AADService.cs:line 89\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.Provider.Utilities.UserLicenseAndTenantSettingsManager.<GetApplicableSkuCategoriesForUser>d__18.MoveNext() in D:\\a\\_work\\1\\s\\Source\\Provider\\Provider\\Utilities\\UserLicenseAndTenantSettingsManager.cs:line 451\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.Common.InstrumentedAsyncFunc`1.<ExecuteAsync>d__12.MoveNext() in D:\\a\\_work\\1\\s\\Source\\Common\\Common\\InstrumentedAsyncFunc.cs:line 118<---\r\nOne or more errors occurred.",
"innerError": {
"message": "Exception in GetUserAggregatedAppsAsync., UserId: '88fe7d3c-f489-xxxx-xxxx-xxxxxxxxxxxx' Exception: System.AggregateException: One or more errors occurred. ---> Microsoft.SkypeSpaces.MiddleTier.Common.ServiceException: Failed to execute Aad backend request GetUserLicensesRequest. Workload Unknown. Request Url: https://graph.windows.net/4ed49f23-73c9-xxxx-xxxx-xxxxxxxxxxxx/users/88fe7d3c-f489-xxxx-xxxx-xxxxxxxxxxxx/licenseDetails?api-version=1.6, Request Method: GET, Response Status Code: Unauthorized, Response Headers: ocp-aad-diagnostics-server-name: khPOVZXWnH8D7cYi/jPTse34lSXOYF4VeaGgIR3yMUA=\r\nrequest-id: b67895eb-6f86-4b16-8cc7-9ab890fbce6a\r\nclient-request-id: 6bf652e8-19af-446e-ba74-4cc2df669b47\r\nStrict-Transport-Security: max-age=31536000; includeSubDomains\r\nDate: Fri, 03 Jun 2022 14:24:00 GMT\r\n, Reason Phrase: Unauthorized\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.CommonServiceRequestBase`1.HandleErrorResponseAsync(HttpRequestMessage requestMessage, HttpResponseMessage responseMessage, String piiScrubbedRequestUrl, StringBuilder rawHeadersBuilder, IPerfTracker tracker) in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\CommonServiceRequestBase.cs:line 434\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.CommonServiceRequestBase`1.<ExecuteHttpRequestAsync>d__41.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\CommonServiceRequestBase.cs:line 373\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.CommonServiceRequestBase`1.<ExecuteAsync>d__38.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\CommonServiceRequestBase.cs:line 176\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.AAD.ServiceRequestBase`1.<ExecuteAsync>d__18.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\AAD\\Requests\\ServiceRequestBase.cs:line 0\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.AAD.AADService.<GetUserLicenseDetails>d__63.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\AAD\\AADService.cs:line 1430\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.AAD.AADService.<GetUserLicenseDetails>d__14.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\AAD\\AADService.cs:line 89\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.Provider.Utilities.UserLicenseAndTenantSettingsManager.<GetApplicableSkuCategoriesForUser>d__18.MoveNext() in D:\\a\\_work\\1\\s\\Source\\Provider\\Provider\\Utilities\\UserLicenseAndTenantSettingsManager.cs:line 451\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.Common.InstrumentedAsyncFunc`1.<ExecuteAsync>d__12.MoveNext() in D:\\a\\_work\\1\\s\\Source\\Common\\Common\\InstrumentedAsyncFunc.cs:line 118\r\n --- End of inner exception stack trace ---\r\n---> (Inner Exception #0) Microsoft.SkypeSpaces.MiddleTier.Common.ServiceException: Failed to execute Aad backend request GetUserLicensesRequest. Workload Unknown. Request Url: https://graph.windows.net/4ed49f23-73c9-xxxx-xxxx-xxxxxxxxxxxx/users/88fe7d3c-f489-xxxx-xxxx-xxxxxxxxxxxx/licenseDetails?api-version=1.6, Request Method: GET, Response Status Code: Unauthorized, Response Headers: ocp-aad-diagnostics-server-name: khPOVZXWnH8D7cYi/jPTse34lSXOYF4VeaGgIR3yMUA=\r\nrequest-id: b67895eb-6f86-4b16-8cc7-9ab890fbce6a\r\nclient-request-id: 6bf652e8-19af-446e-ba74-4cc2df669b47\r\nStrict-Transport-Security: max-age=31536000; includeSubDomains\r\nDate: Fri, 03 Jun 2022 14:24:00 GMT\r\n, Reason Phrase: Unauthorized\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.CommonServiceRequestBase`1.HandleErrorResponseAsync(HttpRequestMessage requestMessage, HttpResponseMessage responseMessage, String piiScrubbedRequestUrl, StringBuilder rawHeadersBuilder, IPerfTracker tracker) in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\CommonServiceRequestBase.cs:line 434\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.CommonServiceRequestBase`1.<ExecuteHttpRequestAsync>d__41.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\CommonServiceRequestBase.cs:line 373\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.CommonServiceRequestBase`1.<ExecuteAsync>d__38.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\CommonServiceRequestBase.cs:line 176\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.AAD.ServiceRequestBase`1.<ExecuteAsync>d__18.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\AAD\\Requests\\ServiceRequestBase.cs:line 0\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.AAD.AADService.<GetUserLicenseDetails>d__63.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\AAD\\AADService.cs:line 1430\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.BackendServices.AAD.AADService.<GetUserLicenseDetails>d__14.MoveNext() in D:\\a\\_work\\1\\s\\Source\\BackendServices\\BackendServices\\AAD\\AADService.cs:line 89\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.Provider.Utilities.UserLicenseAndTenantSettingsManager.<GetApplicableSkuCategoriesForUser>d__18.MoveNext() in D:\\a\\_work\\1\\s\\Source\\Provider\\Provider\\Utilities\\UserLicenseAndTenantSettingsManager.cs:line 451\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.SkypeSpaces.MiddleTier.Common.InstrumentedAsyncFunc`1.<ExecuteAsync>d__12.MoveNext() in D:\\a\\_work\\1\\s\\Source\\Common\\Common\\InstrumentedAsyncFunc.cs:line 118<---\r\nOne or more errors occurred.",
"code": "AccessDenied",
"innerError": {},
"date": "2022-06-03T14:24:00",
"request-id": "9f09d8dc-8be3-4793-9fa1-2d160553724e",
"client-request-id": "9f09d8dc-8be3-4793-9fa1-2d160553724e"
}
}
}

I just tested in Application permission and it seem to work

Related

Error when requesting subscription to Microsoft Graph Subscripton for Teams

I run into this error when creating subscription for Teams from a .NET framework app. My endpoint responds with a validation token and the 200 status is received with the notification, but then I receive this error? need help
Exception while Creating Subscription: Status Code: BadRequest
Microsoft.Graph.ServiceException: Code: ExtensionError
Message: Invalid workloadResource
Inner error:
AdditionalData:
date: 2020-11-17T21:40:13
request-id:
client-request-id:
ClientRequestId:
at Microsoft.Graph.HttpProvider.<SendAsync>d__18.MoveNext()
--- 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 Microsoft.Graph.BaseRequest.<SendRequestAsync>d__38.MoveNext()
--- 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 Microsoft.Graph.BaseRequest.<SendAsync>d__34`1.MoveNext()
--- 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.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

error The antiforgery token could not be decrypted. The key {guid} was not found in the key ring

We're running an ASP.NET MVC Core 1.1 application on a web farm with 2 servers and ran into these exceptions, when a user is attempting to upload a file. We believe this is happening because the get request is from one server and their post may be going to the other web server, leading to the keys being not matched?
Is there a way to get around this issue?
Error 1:
The antiforgery token could not be decrypted.
at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Deserialize(String
serializedToken) at
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.DeserializeTokens(HttpContext
httpContext, AntiforgeryTokenSet antiforgeryTokenSet,
AntiforgeryToken& cookieToken, AntiforgeryToken& requestToken) at
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.ValidateTokens(HttpContext
httpContext, AntiforgeryTokenSet antiforgeryTokenSet) at
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.d__9.MoveNext()
--- 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
Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ValidateAntiforgeryTokenAuthorizationFilter.d__3.MoveNext()
--- 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
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__20.MoveNext()
--- 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 Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
--- 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
Microsoft.AspNetCore.HttpOverrides.HttpMethodOverrideMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exce
Error 2: The antiforgery token could not be decrypted.
at
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Deserialize(String
serializedToken) at
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.DeserializeTokens(HttpContext
httpContext, AntiforgeryTokenSet antiforgeryTokenSet,
AntiforgeryToken& cookieToken, AntiforgeryToken& requestToken) at
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.ValidateTokens(HttpContext
httpContext, AntiforgeryTokenSet antiforgeryTokenSet) at
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.d__9.MoveNext()
--- 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
Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ValidateAntiforgeryTokenAuthorizationFilter.d__3.MoveNext()
--- 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
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__20.MoveNext()
--- 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 Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
--- 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
Microsoft.AspNetCore.HttpOverrides.HttpMethodOverrideMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exce
Do you have a machine key defined (see this: Adding machineKey to web.config on web-farm sites)? Both servers should have the same machineKey config entry (can be generated within IIS or via online tools).
<machineKey
validationKey="GENERATED VALUE"
decryptionKey="GENERATED VALUE"
validation="SHA1"
decryption="AES" />
For DotNetCore Apps running on IIS, if your application pool is set to use AppPoolIdentity, then you need to make sure "Load User Profile" is set to "True" in the Application Pool Advanced Settings.
See: https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/configuration/default-settings?view=aspnetcore-2.1
If the user profile is available, keys are persisted to the %LOCALAPPDATA%\ASP.NET\DataProtection-Keys folder. If the operating
system is Windows, the keys are encrypted at rest using DPAPI.

Issue with media stored in Azure Blob Storage using umbraco 7.5.2

I have an issue with media stored in Azure Blob Storage using umbraco 7.5.2
The old media content with images on the blob are unavailable to modify or delete, the image (file upload) and the custom media type instance itself. This is the error.
An error occured
The given key was not present in the dictionary.
Exception Details
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
Stacktrace
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Umbraco.Core.Persistence.Repositories.MediaRepository.PersistUpdatedItem(IMedia entity)
at Umbraco.Core.Cache.DefaultRepositoryCachePolicy`2.CreateOrUpdate(TEntity entity, Action`1 persistMethod)
at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.PersistUpdatedItem(IEntity entity)
at Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit(Action`1 transactionCompleting)
at Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit()
at Umbraco.Core.Services.MediaService.Umbraco.Core.Services.IMediaServiceOperations.MoveToRecycleBin(IMedia media, Int32 userId)
at Umbraco.Web.Editors.MediaController.DeleteById(Int32 id)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()
I tried to change the database image paths on cmsPropertyData to the blob url but the error persists.
The images on website looks good but on BO i can't do anything with it. I added new ones at it works fine but the old ones have this problem and I need to update it.
Any help would be appreciated.
Edit 1
this are the images
Image 1: BO error
Image 2: After try to delete an image
Based on the log, Umbraco will update the cache after you update or delete the media contents. The exception was throw during updating the media cache.
It causes the inconsistencies issue that the cache maybe lost some data. I suggest you refresh the Umbraco Cache to solve this issue. For how to refresh the Umbraco Cache, link below is for your reference.
How To Refresh The Umbraco Cache

VSTS Nuget push: 400 (Bad Request)

I'm attempting to push to the Package portion of VSTS. I'm getting Bad Request back, but there's no further detail, which is very frustrating. Here is my request and the return.
nuget push -Source "MFS" package.nupkg -Verbosity detailed -ApiKey VSTS
NuGet Version: 3.5.0.1938
Pushing package.nupkg to 'https://instance.pkgs.visualstudio.com/_packaging/c59817c1-a3c5-4654-95cf-760c1ce56c62/nuget/v2/'...
PUT https://instance.pkgs.visualstudio.com/_packaging/c59817c1-a3c5-4654-95cf-760c1ce56c62/nuget/v2/
BadRequest https://instance.pkgs.visualstudio.com/_packaging/c59817c1-a3c5-4654-95cf-760c1ce56c62/nuget/v2/ 10597ms
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at NuGet.Protocol.Core.Types.PackageUpdateResource.<>c.<PushPackageToServer>b__19_1(HttpResponseMessage response)
at NuGet.Protocol.HttpSource.<ProcessResponseAsync>d__14`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackageToServer>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackageCore>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackage>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.PackageUpdateResource.<Push>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Commands.PushRunner.<Run>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.CommandLine.PushCommand.<ExecuteCommandAsync>d__28.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at NuGet.CommandLine.Command.Execute()
at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
---> (Inner Exception #0) System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at NuGet.Protocol.Core.Types.PackageUpdateResource.<>c.<PushPackageToServer>b__19_1(HttpResponseMessage response)
at NuGet.Protocol.HttpSource.<ProcessResponseAsync>d__14`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackageToServer>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackageCore>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackage>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.Core.Types.PackageUpdateResource.<Push>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Commands.PushRunner.<Run>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.CommandLine.PushCommand.<ExecuteCommandAsync>d__28.MoveNext()<---
I was prompted to enter my username/password, which I assume was correct. There is no further data than this: no output logs, no Event logs, nothing. This is all I have to go on.
I tried removing the source and readding it, but I was not prompted to enter my credentials again, so if my credentials were somehow wrong, it's cached somewhere and I have no idea where.
TIA,
Matt
Figured it out. I had a folder at the nupkg's root, so all my files were actually 2 levels down. Once I brought the nuspec and other files to the root, it worked.
You'll need a -ApiKey {string} e.g. -ApiKey VSTS to push.
Rephrased to satisfy StackOverflow answer policy:
We see that the package pushed was invalid because it did not contain a file ending in .nuspec. You should open the nupkg as a zip file and confirm that the package contains a file ending with .nuspec.
TL;DR always add -ApiKey VSTS
I eventually figured it out, too.
I omitted the ApiKey since I was authenticating with my credentials, so why would I need a key? And I didn't know the key for our corporate VSTS.
The warning was being shown but I was ignoring it, thinking it was a general local NuGet.exe warning for whenever you make it push without a key.
Then I had a brainwave that actually the warning being shown is the header value and that it somehow needs a key just for no reason other than because it does.
So with a colleague and looking at the VSTS feed instructions itself, we saw -ApiKey VSTS in their sample and added that and still had to login, and bingo!

iOS Simulator: The chunked cookie is incomplete

Really need a hand here, iOS is killing me...
Have successfully build cordova app in Visual Studio 2015, have submitted and have been approved at PlayStore, app working great.
Have been unsuccessful in getting AppStore approval.
Have been working in Windows 10 environment and using MacInCloud as my iOS app builder and tester. Everything working from point of view of Visual Studio building app on MacInCloud and successful in launching xcode simulator.
The app leverages heavily webapi2 calls (basically using Sql Server to get game score results). The api application successfully built and published to iis on my server using asp.net core RC2. I turned on logging on the server side so I can get details.
When simulating at MacInCloud, the iOS app fails after jwt user token validation with a "The chunked cookie is incomplete"
Specifically:
info: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerMiddleware[3]
HttpContext.User merged via AutomaticAuthentication from authenticationScheme: Bearer.
fail: Microsoft.AspNetCore.Server.Kestrel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60[13]
Connection id "0HKS0QCDU42CH": An unhandled exception was thrown by the application.
System.FormatException: The chunked cookie is incomplete. Only 2 of the expected 3 chunks were found, totaling 7978 characters. A client size limit may have been exceeded.
at Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager.GetRequestCookie(HttpContext context, String key)
at Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler.<ReadCookieTicket>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler.<HandleAuthenticateAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.<InitializeAsync>d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware`1.<Invoke>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ApplicationInsights.AspNetCore.ExceptionTrackingMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ApplicationInsights.AspNetCore.RequestTrackingMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.<Invoke>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Server.Kestrel.Http.Frame`1.<RequestProcessingAsync>d__2.MoveNext()
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 10.467ms 200
I was getting this when my web api project was a RC1 project and thought that may be the issue. Have successfully ported project to RC2, but same error.
I'm using JWT bearer tokens for user authentication, so I don't get the cookie problem (not using cookies jwt token being passed in header...).
I do notice however that there are ionic cookies being written and wonder if that is related.
Any help/tips/leads would be greatly appreciated.
Todd

Resources