我正在修改Field Engineer Sample Mobile App以使用我在Azure SQL Server中的数据。
我可以通过Postman访问我的所有数据,但是当我尝试启动应用程序以查找完成UI开发的错误时,我无法通过AAD移动服务身份验证。
我看到了类似的未回答的问题。这是我的具体细节。
Azure Mobile Service Error in its Log
Exception=Microsoft.IdentityModel.Clients.ActiveDirectory.ActiveDirectoryAuthenticationException: sts_token_request_failed: Token request to security token service failed. Check InnerException for more details ---> Microsoft.IdentityModel.Clients.ActiveDirectory.ActiveDirectoryAuthenticationException: AADSTS70002: Error validating credentials. AADSTS50012: Invalid client secret is provided.
Postman return from https://xxxxxapp2.azure-mobile.net/api/getFieldAgentDisplayName
{
"message": "Authorization has been denied for this request."
}
Visual Studio 2013 error.
{StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Pragma: no-cache
Cache-Control: no-cache
Date: Fri, 18 Mar 2016 20:16:31 GMT
Set-Cookie: ARRAffinity=da2b3f6baacfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc5b604b7b9a3d4dbaf9af18;Path=/;Domain=dugisapp2.azure-mobile.net
Server: Microsoft-IIS/8.0
X-Powered-By: ASP.NET
Content-Length: 36
Content-Type: application/json; charset=utf-8
Expires: 0
}}
Error Detail copied from Visual Studio 2013
Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException was caught
_HResult=-2146233079
_message=The request could not be completed. (Internal Server Error)
HResult=-2146233079
IsTransient=false
Message=The request could not be completed. (Internal Server Error)
Source=Microsoft.WindowsAzure.Mobile
StackTrace:
at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient.<ThrowInvalidResponse>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 System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient.<SendRequestAsync>d__1d.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.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient.<RequestAsync>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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.WindowsAzure.MobileServices.MobileServiceClient.<InternalInvokeApiAsync>d__b.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.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.WindowsAzure.MobileServices.MobileServiceClient.<InvokeApiAsync>d__6.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.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at AzureMobile.Samples.FieldEngineer.Utilities.LoginHelper.<MobileServiceAuthenticate>d__0.MoveNext()
InnerException: