1

Microsoft Graph WebHooks was working fine till yesterday but I got problem today while creating subscription

Code: ExtensionError Message: Operation: Create; Exception: [A task was canceled.] Inner error

Following is code

[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);
        }
    }

Following is the stack trace

"   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"

Following is the image

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

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

halfer
  • 19,824
  • 17
  • 99
  • 186
  • 1
    ... what's this "*Inner error*"? – Stefan Jul 18 '18 at 09:18
  • i posted question to ask how do i know please open uploaded image – Salman Arshad Jul 18 '18 at 09:20
  • Can you use your web-development-tools (usually F12 in most browsers) to capture the request? It seems that some text is missing. – Stefan Jul 18 '18 at 09:22
  • what kind of text? this is code for creating subscription in web hooks of microsoft – Salman Arshad Jul 18 '18 at 09:25
  • Basically there information missing for us to answer this question. So you have 2 options here: 1) if you can, set a breakpoint at: `ViewBag.Message = BuildErrorMessage(e);` and examine full exception text and stacktrace. Post it as [edit] if you want to include it in your question. 2) if you don't have access to the server: use dev-tools to capture the network request, and examine the response. If you are lucky, `BuidErrorMessage` will contain the full error information. – Stefan Jul 18 '18 at 09:33
  • added image while debugging in the question – Salman Arshad Jul 18 '18 at 09:42
  • Hmm...that's not really a lot of info :-/ . Can you post the full stack trace as well? As text and as [edit] please. – Stefan Jul 18 '18 at 09:48
  • edited please have a look – Salman Arshad Jul 18 '18 at 09:57
  • Hmm... that doesn't reveal very much... I am sorry I can't help you. – Stefan Jul 18 '18 at 10:01

0 Answers0