locked
Get user id in startup RRS feed

  • Question

  • User477335199 posted

    Hi.

    How I can get current user id in ConfigureServices

    or it is not possible ? 

    Monday, May 31, 2021 7:07 AM

Answers

  • User-474980206 posted

    You can’t. There is no request, so no user at startup.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 31, 2021 2:19 PM
  • User-1545767719 posted

    Get user id in startup

    It depends on what you mean by "startup". To get user id the user must visit the site and must be authenticated. If your "startup" is after that it is maybe possible. But if your "startup" means the startup.cs is is impossible.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 1, 2021 12:09 AM

All replies

  • User-474980206 posted

    You can’t. There is no request, so no user at startup.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 31, 2021 2:19 PM
  • User-1545767719 posted

    Get user id in startup

    It depends on what you mean by "startup". To get user id the user must visit the site and must be authenticated. If your "startup" is after that it is maybe possible. But if your "startup" means the startup.cs is is impossible.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 1, 2021 12:09 AM