Friday, September 20, 2013
Tuesday, September 17, 2013
Thursday, September 12, 2013
Monday, September 9, 2013
Wednesday, August 21, 2013
Thursday, June 13, 2013
VisualStudio AddIn
Deployment Path:
* C:\ProgramData\Microsoft\MSEnvShared\Addins
Debug Path
* C:\Users\xxxx\Documents\Visual Studio 20xx\Addins
* C:\ProgramData\Microsoft\MSEnvShared\Addins
Debug Path
* C:\Users\xxxx\Documents\Visual Studio 20xx\Addins
Wednesday, June 5, 2013
Friday, May 31, 2013
Checking VC runtime of EXE, DLL, LIB
Open VisualStudio command prompt
dumpbin /all EXE|DLL|LIB > tmp.txt
Open tmp.txt and search for "MSVCRT", examples:
Linker Directives
-----------------
/include:__forceCRTManifestCUR
/manifestdependency:type='win32' name='Microsoft.VC90.CRT' version='9.0.30729.6161' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'
/DEFAULTLIB:msvcprt
/manifestdependency:type='win32' name='Microsoft.VC90.CRT' version='9.0.30729.6161' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'
/DEFAULTLIB:MSVCRT
/DEFAULTLIB:OLDNAMES
dumpbin /all EXE|DLL|LIB > tmp.txt
Open tmp.txt and search for "MSVCRT", examples:
Linker Directives
-----------------
/include:__forceCRTManifestCUR
/manifestdependency:type='win32' name='Microsoft.VC90.CRT' version='9.0.30729.6161' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'
/DEFAULTLIB:msvcprt
/manifestdependency:type='win32' name='Microsoft.VC90.CRT' version='9.0.30729.6161' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'
/DEFAULTLIB:MSVCRT
/DEFAULTLIB:OLDNAMES
Thursday, March 7, 2013
TCP Window
From Windows Vista, we can set TCP window auto-tuning
disabled = scale factor 0
highlyrestricted = scale factor 2
restricted = scale factor 4
normal = scale factor 8
experimental = scale factor 14
However, it can be override by Windows if TCP heuristics is ON. To turn it off, go to registry
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\EnableWsd and set it to 0.
or run command
% netsh int tcp set heuristics disabled
See here: http://social.technet.microsoft.com/Forums/en/w7itpronetworking/thread/5baff76a-be80-4e4d-a28e-e251dc5c5043
disabled = scale factor 0
highlyrestricted = scale factor 2
restricted = scale factor 4
normal = scale factor 8
experimental = scale factor 14
However, it can be override by Windows if TCP heuristics is ON. To turn it off, go to registry
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\EnableWsd and set it to 0.
or run command
% netsh int tcp set heuristics disabled
See here: http://social.technet.microsoft.com/Forums/en/w7itpronetworking/thread/5baff76a-be80-4e4d-a28e-e251dc5c5043
Wednesday, March 6, 2013
Wireshark
Wireshark on VirtualBox 4.0 cannot capture packet, see here for how to fix it:
https://forums.virtualbox.org/viewtopic.php?f=6&t=41831&start=0
https://forums.virtualbox.org/viewtopic.php?f=6&t=41831&start=0
Friday, January 25, 2013
IIS6
How to check and set password for IUSR_*
http://www.windowsitpro.com/article/passwords/how-can-i-check-the-password-of-the-iusr-and-iwam-local-accounts-on-a-machine--48361
Problem if password for IUSR is not synced between IIS metabase and SAM
http://blogs.msdn.com/b/jiruss/archive/2006/05/24/606107.aspx
Built in users and groups
http://www.iis.net/learn/get-started/planning-for-security/understanding-built-in-user-and-group-accounts-in-iis
http://www.windowsitpro.com/article/passwords/how-can-i-check-the-password-of-the-iusr-and-iwam-local-accounts-on-a-machine--48361
Problem if password for IUSR is not synced between IIS metabase and SAM
http://blogs.msdn.com/b/jiruss/archive/2006/05/24/606107.aspx
Built in users and groups
http://www.iis.net/learn/get-started/planning-for-security/understanding-built-in-user-and-group-accounts-in-iis
Thursday, January 24, 2013
.NET XML Serializer
MemoryStream memoryStream = new MemoryStream();
XmlSerializer xs = new XmlSerializer(typeof(ConfigState));
XmlTextWriter xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.UTF8);
xs.Serialize(xmlTextWriter, cs);
string configXml = Encoding.UTF8.GetString(memoryStream.ToArray());