4

In asp.net web api identity:

In ApplicationOAuthProvider.cs, There is a method:

var userManager = context.OwinContext.GetUserManager<ApplicationUserManager>();

This one method itself takes 4 seconds but the underlying query takes only 170 milliseconds.

I am not able to get what's happening. Can anyone help how I can optimize this method.

Thanks in advance

Satyajit
  • 1,971
  • 5
  • 28
  • 51

1 Answers1

0

The method could be taking a long time if it's the first time you call it after deploying your application, since it has to load the necessary frameworks. After loading the frameworks once, the method should be faster.

Philip
  • 3,135
  • 2
  • 29
  • 43