Search code examples
c#asp.net.netowin.net-4.8

c# asp.net: Owin's Startup not called when browser is Outlook-Add-In


We have a asp.net application with OWIN implementation to manage OAuth access.

All works fine in an normal browser, the OWIN's Startup method 'Configuration' is called and we can do our stuff.

However, if we load our page in Microsoft Outlook's Add-In Pane, the Startup.Configuration is just ommitted ...

What is the problem here?

The application is written in .NET-Framework 4.8


Solution

  • Thanks to Hans Kestling: The problem was, that I assumed Startup.Configuration would be called each client session, but actually only the first client session will trigger that call.

    So when I started a debug out from Visual Studio, I had activated to open page in Browser, which led to trigger the call. When I opened the Outlook Add-In afterwards, no additional call was made, even with the new client session.