Interface is as follows:
Public async Task ConnectionValidation1 (Request Request, IFormCollection files) Call is as follows:
Byte [] responseBytes=webClient. UploadData (interface address, "POST", bytes); a file upload interface, using multi-threaded calls, occasionally return to the login page of HTML, Login authentication cookie following
Services. AddAuthentication (b=& gt; { B.D efaultAuthenticateScheme=CookieAuthenticationDefaults. AuthenticationScheme; B.D efaultChallengeScheme=CookieAuthenticationDefaults. AuthenticationScheme; B.D efaultSignInScheme=CookieAuthenticationDefaults. AuthenticationScheme; }). AddCookie (b=& gt; { //cancel the certification paper Cookie SameSite attribute Biggest ookie. SameSite=SameSiteMode. None; //login address B.L oginPath="/Account/Login"; //sid Biggest ookie. Name="My_SessionId"; //biggest ookie. Domain="shenniu.core.com"; Biggest ookie. Path="/"; Biggest ookie. HttpOnly=true; Biggest ookie. Expiration=new TimeSpan (0, 60, 30); B.E xpireTimeSpan=new TimeSpan (0, 60, 30); }); Interface Controller does not add the Authorize attribute, inheritance is the Controller, the
how can appear multithreading occasionally call interface to return to the login page? CodePudding user response:
Since no add the Authorize features not login validation problems, you said multi-threaded calls to return to the login page, try out single thread calls? Don't return to the landing page? Should be in your program
CodePudding user response:
Feeling is a variable string,
CodePudding user response:
Add [AllowAnonymous] feature
You said once in a while, may be have landed, but browser did not shut down, the next operation, the current context is already logged in
Or is landed to remember me
CodePudding user response:
Another suggestion, authentication, authorization, you can refer to Microsoft's official documentation, personal feel good
CodePudding user response:
reference 1/f, 711 glaciers response: since without the Authorize features not login validation problems, you said multi-threaded calls to return to the login page, try out single thread calls? Don't return to the landing page? Problems should be or your program As shown in figure, I in the event of a return to the login page records the URL log, recording the requestUrl (request address) is the interface address, no other URL, sufficient program is no problem, will return to the login page is somehow interface, : CodePudding user response:
refer to the second floor is nu month god reply: feeling is a variable string, Personal feeling is the interface problem, deployed on a docker CodePudding user response:
refer to autumn red fruit reply: 3/f add [AllowAnonymous] feature You said once in a while, may be have landed, but browser did not shut down, the next operation, the current context is already logged in Or is landed remember me Call interface and your browser is not related CodePudding user response:
refer to 7th floor response: my QQ - 554433626 Quote: refer to the third floor of autumn red fruit response: Add [AllowAnonymous] feature You said once in a while, may be have landed, but browser did not shut down, the next operation, the current context is already logged in Or is landed remember me Call interface and the browser is not related browser, this I just guess Add AllowAnonymous feature also not line, estimation is a condition that code directly jump to the login page CodePudding user response:
refer to autumn red fruits on the eighth floor response: Quote: refer to 7th floor response: my QQ - 554433626 Quote: refer to the third floor of autumn red fruit response: Add [AllowAnonymous] feature You said once in a while, may be have landed, but browser did not shut down, the next operation, the current context is already logged in Or is landed remember me Call interface and the browser is not related browser, this I just guess Add AllowAnonymous feature also not line, estimation is a condition that code directly jump to the login page Returns an empty after request prohibit redirection