locked
Web API not recognizing new users when created by Web Portal RRS feed

  • Question

  • User-169382190 posted

    I have a Web API and an Azure Web App that access the same database. This database has all user information. I'm using ASP.NET Identity for user management. I'm having an issue where when a user is created by the web app the Web API requires a restart, or at least a relatively long while before the user becomes authenticated by it. This, of course, is entirely impractical. How can I update the environment immediately on the Web API so that the user can access their resources?

    Thursday, November 12, 2015 9:05 PM

All replies

  • User-2057865890 posted

    Hi,LavaHot

    Welcome to asp.net forum.

     I'm having an issue where when a user is created by the web app the Web API requires a restart, or at least a relatively long while before the user becomes authenticated by it. This, of course, is entirely impractical. How can I update the environment immediately on the Web API so that the user can access their resources?

    If the server requires a restart,I think user can not access their resources,only wait.

    Best regards,
    Chris Zhao

    Monday, November 16, 2015 4:15 AM
  • User-1946294156 posted

    I am assuming the API & Web Apps are on two different instances?  If so this sounds like a caching issue.  First try changing the Page Caching time (playing with it for your optimal timing).  This would be done via IIS.  What sounds to be happening is that because your user creates an account via on instance of your application, the caching is only updating that instance (in this case the web app).  Leaving the Web API to run through it's cache information until it expires. 

    Monday, November 16, 2015 7:11 AM