Posts

PyCharm throws permission error despite elevated to run as administrator

Image
0 I am looking for help to sort out the following issue in PyCharm: Code below: #if there is a file with the same name, delete it first if os.path.exists(csv_name + ".csv"): os.remove(csv_name + ".csv") #Now save the df_csv to csv at the needed location df_csv.to_csv(csv_name + ".csv") Error below: PermissionError: [WinError 5] Access is denied: 'csv_outexample_csv.csv' The file is created with correct name but 0 bytes. PyCharm is already running as administrator. Any clue would be appreciated. Thank you in advance. python pycharm share | improve this question asked Nov 13 '1...

ASP.NET Core 2.1 Jwt setting custom claims

Image
0 I have this code that is supposed to set claims for a user. It works fine when I use identity and the default login. However, when I use jwt as authentication in another application, I don't have ApplicationUser as my ApplicationUser is stored in the other application that authenticates the user. How can I customize this code so that it works with jwt? private readonly SignInManager<TIdentityUser> _signInManager; public CustomClaimsCookieSignInHelper(SignInManager<TIdentityUser> signInManager) { _signInManager = signInManager; } public async Task SignInUserAsync(TIdentityUser user, bool isPersistent, IEnumerable<Claim> customClaims) { var claimsPrincipal = await _signInManager.CreateUserPrincipalAsync(user); var identity = claimsPrincipal.Identity as ClaimsIdentity; va...