File.GetLastWriteTime seems to be returning ‘out of date’ value

During my experience I went throw a couple of issues like yours. On Windows Vista/7 systems that function not always returns a reliable result. After a while we found this link: Disabling Last Access Time in Windows Vista to improve NTFS performance An observant Windows Vista user noticed a registry named NtfsDisableLastAccessUpdate under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ControlFileSystem and … Read more

create local user account

I had a very similar issue change the first line to PrincipalContext context = new PrincipalContext(ContextType.Machine, “127.0.0.1”); see if that fixes your issue. And triple check that the program is running with administrator privileges. The other issue it could be is the server has password complexity requirements and password that is being passed in to … Read more

I’ve been hacked. Evil aspx file uploaded called AspxSpy. They’re still trying. Help me trap them‼

If you running asp.net and only as you tagged, then you only need to add this web.config on the root directory that your users upload files. With that web.config you do not allow anyone to run aspx pages on this directory tree. The web.config on the protected must only contains: <configuration> <system.web> <authorization> <deny users=”*” … Read more

wmic error (invalid XSL format) in windows7

It’s a bug in the wmic command. It’s been suggested to copy XSL files into the %WINDIR%\system32 (or equivalent if 64 bit.) However, the command below works just as well without the need to copy files: wmic process get ProcessId,Description,CommandLine,ExecutablePath,ParentProcessId /format:”%WINDIR%\System32\wbem\en-us\csv” Of course, the “en-us” will be different for different locales. If you want to … Read more

How do I run a Play Framework 2.0 application as a Windows service?

This worked for me on Windows 7: Create folder C:\my_app Go to your Play! app folder in command line and type play dist Copy generated “something-SNAPSHOT” folder to C:\my_app Download YAJSW and extract to C:\my_app In C:\my_app\something-SNAPSHOT\ make a new file start.bat and fill it with command like this: java -cp “C:\my_app\something-SNAPSHOT\lib\*” play.core.server.NettyServer Save it … Read more