[英]Azure App Service custom authentication getting System.ArgumentNullException: “Value cannot be null” “Parameter name: provider”
I have a simple dot net mobile app with custom authentication following the example at ( https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-dotnet-backend-how-to-use-server-sdk#custom-auth ) 我有一个简单的点网移动应用程序,其自定义身份验证遵循以下示例( https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-dotnet-backend-how- to-use-server-sdk #custom-auth )
I have an endpoint for generating the JWT Token https://test2ixresearcher.azurewebsites.net/.auth/login/custom?username=ade%40ixcompany.com&password=a (the user name and password are not checked, you can enter anything) 我有一个端点用于生成JWT令牌https://test2ixresearcher.azurewebsites.net/.auth/login/custom?username=ade%40ixcompany.com&password=a (未选中用户名和密码,您可以输入任何内容)
This creates a token which I use to call a secured endpoint with the provided token in the X-ZUMO-AUTH header: https://test2ixresearcher.azurewebsites.net/api/SecuredData - Calling the end point with an incorrect token or token missing returns a 401, as expected - Calling the end point with the token just created generates a 500 with the following message, no expected 这将创建一个令牌,用于在X-ZUMO-AUTH标头中使用提供的令牌调用安全端点: https ://test2ixresearcher.azurewebsites.net/api/SecuredData - 使用不正确的令牌或令牌丢失来调用端点按预期返回401 - 使用刚创建的令牌调用终点会生成500,其中包含以下消息,无预期
--Start Error message-- Application: 2018-09-22T23:12:20 PID[5520] Critical System.ArgumentNullException: Value cannot be null. --Start错误消息 - 应用程序:2018-09-22T23:12:20 PID [5520]严重System.ArgumentNullException:值不能为空。 Application: Parameter name: provider Application: at Microsoft.Azure.AppService.Authentication.EasyAuthTokenStore.d__7.MoveNext() Application: --- End of stack trace from previous location where exception was thrown --- 应用程序:参数名称:provider应用程序:at Microsoft.Azure.AppService.Authentication.EasyAuthTokenStore.d__7.MoveNext()应用程序:---从抛出异常的上一个位置开始的堆栈跟踪结束---
--End Error message-- I also have an unsecured endpoint and this works without any problems. --End错误消息 - 我也有一个不安全的端点,这没有任何问题。 https://test2ixresearcher.azurewebsites.net/api/UnSecuredData https://test2ixresearcher.azurewebsites.net/api/UnSecuredData
I have deployed at least 4 other apps with this model and this is the first instance of having this error. 我已经使用此模型部署了至少4个其他应用程序,这是第一个出现此错误的实例。 The error appears in the authentication, it seems to successfully validate the token issuer and pull out the user, and it fails before hitting my code. 该错误出现在身份验证中,它似乎成功验证了令牌颁发者并撤出了用户,并且在命中我的代码之前失败了。
My code can be found at https://github.com/antitheos/publictesting/tree/master/TestAzureCustomLogin 我的代码可以在https://github.com/antitheos/publictesting/tree/master/TestAzureCustomLogin找到
This is happening when published to azure in a new app service created through the portal or Visual Studio. 在通过门户网站或Visual Studio创建的新应用服务中发布到azure时会发生这种情况。 I have old app services working but I afraid to trying publishing to them in case i break live apps the are working. 我有旧的应用程序服务工作,但我害怕尝试发布给他们,以防我破坏正在运行的实时应用程序。
Any help would be appreciated. 任何帮助,将不胜感激。
Ok, Microsoft found the issue! 好的,微软发现了这个问题!
The product team found a regression bug and it's now slated for fixing in the next release for about a month from now. 产品团队发现了一个回归错误,现在它将在下一个版本中修复大约一个月。 In the meantime, you can resolve it with the following steps. 在此期间,您可以通过以下步骤解决它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.