So, we have a program that synchronizes another platform's appointments to Microsoft Outlook Calendar.
We have several companies that use our service. One of them though is having a problem.
After some troubleshooting, it seems the Microsoft.Graph component makes the program hard crash.
The program is a Win32 Console app running in 64-bit. This is the function being called:
Public Shared Async Function CreateEvent(ByVal token As String, ByVal calendarID As String, ByVal NewEvent As [Event]) As Task(Of Microsoft.Graph.Event) Console.WriteLine("Creating Client") Dim graphclient As New GraphServiceClient(New DelegateAuthenticationProvider(Function(requestMessage) requestMessage.Headers.Authorization = New AuthenticationHeaderValue("bearer", token) Return Task.FromResult(0) End Function ) ) Dim newcal As [Event] Try Console.WriteLine("Sending Request") newcal = Await graphclient.Me.Calendars.Item(calendarID).Events.Request.AddAsync(NewEvent) Console.WriteLine("Request succeded") Catch ex As Exception GoogleChatMessage("Calendar v2 Debug", "Error occured while creating event, purging calendar." & vbNewLine & vbNewLine & ex.Message & vbNewLine & ex.StackTrace) End Try Return newcal End Function
I added a bunch of console.writelines to see exactly where it crashes. This is what the command prompt looks like:
It doesn't seems to crash in the normal way it seems to just... quit. Or it's a silent crash. There's nothing in the system event log. And this is one of many requests it goes through inside of a do....loop, and it just does the first loop and exits, like if an Environment.exit(0) is being called somewhere (Not in my code)
I already asked the client to make sure that his Office 365 instance is still set to accept API requests, but I don't think this is the problem.
Anyone got an idea of what would cause this? Note I'm still kindof a newbie in coding with Microsoft Graph.
Oh, in case it matters, I use an offline use token provided by the client when they signup on a ASP.net portal.