1

Microsoft Graph WebHooks 直到昨天都运行良好,但我今天在创建订阅时遇到了问题

代码:扩展错误消息:操作:创建;异常:[任务被取消。]内部错误

以下是代码

[Authorize]
    public async Task<ActionResult> CreateSubscription()
    {
        string baseUrl = $"{Request.Url.Scheme}://{Request.Url.Authority}";

        try
        {
            var subscription = await SubscriptionHelper.CreateSubscription(baseUrl);

            SubscriptionViewModel viewModel = new SubscriptionViewModel()
            {
                Subscription = subscription
            };

            return View("Subscription", viewModel);
        }
        catch (Exception e)
        {
            ViewBag.Message = BuildErrorMessage(e);
            return View("Error", e);
        }
    }

以下是堆栈跟踪

"   at Microsoft.Graph.HttpProvider.<SendAsync>d__19.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown
---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Graph.BaseRequest.<SendRequestAsync>d__36.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown
---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Graph.BaseRequest.<SendAsync>d__32`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown
---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at GraphWebhooks.Helpers.SubscriptionHelper.<CreateSubscription>d__2.MoveNext() in C:\\Users\\alias\\Downloads\\aspnet-webhooks-rest-sample-master\\aspnet-webhooks-rest-sample-master\\GraphWebhooks\\Helpers\\SubscriptionHelper.cs:line 32\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at GraphWebhooks.Controllers.SubscriptionController.<CreateSubscription>d__1.MoveNext() in C:\\Users\\alias\\Downloads\\aspnet-webhooks-rest-sample-master\\aspnet-webhooks-rest-sample-master\\GraphWebhooks\\Controllers\\SubscriptionController.cs:line 30"

以下是图片

https://i.stack.imgur.com/RDESj.png

https://i.stack.imgur.com/AviYX.png

4

0 回答 0