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
Thursday, March 7, 2013
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());
Wednesday, December 5, 2012
WPF - 2
Cheat sheet:
- XAML for WPF: http://blog.blueboxes.co.uk/2009/02/03/xaml-for-wpf-cheatsheet/
- DataBinding: http://www.nbdtech.com/Blog/archive/2009/02/02/wpf-xaml-data-binding-cheat-sheet.aspx
Programming tools
- http://www.wpftutorial.net/wpfdevtools.html
Themes:
- http://wpf.codeplex.com/wikipage?title=WPF%20Themes&referringTitle=Home
- Download is here: http://wpf.codeplex.com/releases/view/14962
Data binding:
- See http://msdn.microsoft.com/en-us/library/ms750612.aspx
- Why we shouldn't use DependencyObject inside ViewModel layer: http://stackoverflow.com/questions/291518/inotifypropertychanged-vs-dependencyproperty-in-viewmodel
- How to serialize Dependency Object using XamlReader/Writer: http://www.codeproject.com/Tips/61443/Serialize-DependencyObject-it-s-easy
- How to reduce coding for INotifyPropertyChanged:
- http://stackoverflow.com/questions/1315621/implementing-inotifypropertychanged-does-a-better-way-exist
- Use CallerMemberName attribute available from .NET 4.5, see http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110).aspx
MVVM
- How to implement Command pattern: http://www.codeproject.com/Articles/101881/Executing-Command-Logic-in-a-View-Model
- Calling command by events: http://stackoverflow.com/questions/1048517/wpf-calling-commands-via-events
Topics:
- Async and data binding
- Types of bindings, multiple ? hierarchy ? collision ?
- Binding, converter, validation
- XAML for WPF: http://blog.blueboxes.co.uk/2009/02/03/xaml-for-wpf-cheatsheet/
- DataBinding: http://www.nbdtech.com/Blog/archive/2009/02/02/wpf-xaml-data-binding-cheat-sheet.aspx
Programming tools
- http://www.wpftutorial.net/wpfdevtools.html
Themes:
- http://wpf.codeplex.com/wikipage?title=WPF%20Themes&referringTitle=Home
- Download is here: http://wpf.codeplex.com/releases/view/14962
Data binding:
- See http://msdn.microsoft.com/en-us/library/ms750612.aspx
- Why we shouldn't use DependencyObject inside ViewModel layer: http://stackoverflow.com/questions/291518/inotifypropertychanged-vs-dependencyproperty-in-viewmodel
- How to serialize Dependency Object using XamlReader/Writer: http://www.codeproject.com/Tips/61443/Serialize-DependencyObject-it-s-easy
- How to reduce coding for INotifyPropertyChanged:
- http://stackoverflow.com/questions/1315621/implementing-inotifypropertychanged-does-a-better-way-exist
- Use CallerMemberName attribute available from .NET 4.5, see http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110).aspx
MVVM
- How to implement Command pattern: http://www.codeproject.com/Articles/101881/Executing-Command-Logic-in-a-View-Model
- Calling command by events: http://stackoverflow.com/questions/1048517/wpf-calling-commands-via-events
Topics:
- Async and data binding
- Types of bindings, multiple ? hierarchy ? collision ?
- Binding, converter, validation
Thursday, November 15, 2012
Tuesday, November 13, 2012
Emulating network bandwidth and latency
Network Emulator Toolkit:
http://blog.mrpol.nl/2010/01/14/network-emulator-toolkit/
http://blogs.msdn.com/b/lkruger/archive/2009/06/24/creating-a-stand-alone-network-emulator-using-vs2010-beta-1-release.aspx
Network Shaper:
http://stackoverflow.com/questions/130354/how-do-i-simulate-a-low-bandwidth-high-latency-environment
http://blog.mrpol.nl/2010/01/14/network-emulator-toolkit/
http://blogs.msdn.com/b/lkruger/archive/2009/06/24/creating-a-stand-alone-network-emulator-using-vs2010-beta-1-release.aspx
Network Shaper:
http://stackoverflow.com/questions/130354/how-do-i-simulate-a-low-bandwidth-high-latency-environment
WCF alternatives
- ServiceStack
- Transport is http only: http://www.servicestack.net/overview.htm
- NServiceBus
- Default transport is MSMQ, but others can be plugged in
- Agatha
- Use WCF for transport
- Why not WCF: http://thatextramile.be/blog/2009/07/why-i-dislike-classic-or-typical-wcf-usage
- no longer in active development
Monday, November 5, 2012
WCF Extension
MSDN link
http://msdn.microsoft.com/en-us/library/gg132853.aspx (MS document, not very good)
http://blogs.msdn.com/b/drnick/archive/2006/05/08/592110.aspx (Very good step-by-step blog)
-> improved and source code: http://blogs.msdn.com/b/dmetzgar/archive/2012/10/16/an-updated-custom-wcf-transport-channel-example.aspx
-> tcp example: http://code.msdn.microsoft.com/windowsdesktop/Sample-WCF-transport-474c4c02
Configuring custom binding:
- http://msdn.microsoft.com/en-us/library/ms788753.aspx
- http://msdn.microsoft.com/en-us/library/ms788759(v=vs.110).aspx
- http://robbincremers.me/2012/01/01/wcf-custom-binding-by-configuration-and-by-binding-standardbindingelement-and-standardbindingcollectionelement/
http://msdn.microsoft.com/en-us/library/dd699779.aspx (WCF example document)
http://blogs.msdn.com/b/carlosfigueira/archive/2011/12/08/wcf-extensibility-transport-channels-request-channels-part-1.aspx
http://msdn.microsoft.com/en-us/magazine/cc163302.aspx
http://msdn.microsoft.com/en-us/magazine/cc163394.aspx
http://blogs.msdn.com/b/drnick/archive/2006/05/08/592110.aspx (Very good step-by-step blog)
-> improved and source code: http://blogs.msdn.com/b/dmetzgar/archive/2012/10/16/an-updated-custom-wcf-transport-channel-example.aspx
-> tcp example: http://code.msdn.microsoft.com/windowsdesktop/Sample-WCF-transport-474c4c02
Configuring custom binding:
- http://msdn.microsoft.com/en-us/library/ms788753.aspx
- http://msdn.microsoft.com/en-us/library/ms788759(v=vs.110).aspx
- http://robbincremers.me/2012/01/01/wcf-custom-binding-by-configuration-and-by-binding-standardbindingelement-and-standardbindingcollectionelement/
http://msdn.microsoft.com/en-us/library/dd699779.aspx (WCF example document)
http://blogs.msdn.com/b/carlosfigueira/archive/2011/12/08/wcf-extensibility-transport-channels-request-channels-part-1.aspx
http://msdn.microsoft.com/en-us/magazine/cc163302.aspx
http://msdn.microsoft.com/en-us/magazine/cc163394.aspx
Example
http://wcfextensions.codeplex.com/http://webservices20.blogspot.jp/2008/11/introducing-wcf-clearusernamebinding.html
http://www.microsoft.com/en-us/download/details.aspx?id=21459
Tutorial
Writing channels: http://blogs.msdn.com/b/drnick/archive/2007/02/19/channel-development-tour-part-1.aspx