π•Ίπ–“π–žπ–
π•Ίπ–“π–žπ–
CC#
Created by π•Ίπ–“π–žπ– on 4/24/2024 in #help
Invalid signature
Hi, while working on code to access remotely some files, I got this error : Invalid Signature. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileSystemEnumerableIterator`1.CommonInit() at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) at System.IO.Directory.GetFiles(String path, String searchPattern) The line where it happens is Directory.GetFiles (path, "*.*").ToList(); I have the exact same code in another file, and it works perfectly If anyone has an idea
19 replies
CC#
Created by π•Ίπ–“π–žπ– on 3/22/2024 in #help
Impersonation
Hello, as part of a corporate project, I need to create an application. So far, nothing out of the ordinary, but to put it on the server, I need to impersonate a generic server admin account to access the files. No problem, it's already been done in previous projects. But it no longer works with the latest computers, and we don't know why. Based on the code provided by Microsoft, we've already been able to run a few tests: https://learn.microsoft.com/en-us/dotnet/api/system.security.principal.windowsidentity.impersonate?view=netframework-4.8.1. On a computer configured max before the first half of last year, no problem, whether you're an admin or not. But on more recent PCs, we systematically get an error 1326 "Incorrect username or password", even though both are correct (as is the domain). The program itself works - it sounds a bit silly when you put it like that, but you can impersonate yourself, it works without a hitch, and there's the connection change and disconnection. What comes up most often is configuration differences, but finding out exactly what's wrong with an entire computer isn't easy, so if anyone has any ideas, or if it's something else, we'll take it.
7 replies