Some new old things I discovered last week, this is news to me!
Configure proxy in .NET app
It has been a while since I developed applications that had to deal with proxies, so only recently I learned you can just add to your .config:
<system.net> <defaultProxy useDefaultCredentials="true" /> </system.net>
Which will then use the system proxy settings.
“If the defaultProxy element is empty, the proxy settings from Internet Explorer will be used. This behavior is different from version 1.1 of the .NET Framework.”
https://msdn.microsoft.com/en-us/library/kd3cf2ex(v=vs.110).aspx
Linq Aggregate
I forgot in which presentation I came across this, so I cannot give credit, it was something about functional programming in C#.
Anyway, check out this example.
How cool is that, it allows you to traverse a sequence while accumulating logic on it.
Linq’s Count, Min, Max and Avg are implementations of Aggregate.
Encrypt .config values
I learned this from K2 ‘s use of it, which uses encrypted connection strings in their .config files.
So apparently you can encrypt config sections with aspnet_regiis, which are automatically decrypted by ASP.NET at runtime when reading the values. Nooice.
Theme music for this blog post