3/12/2016

Scoped configuration. Nice!

Wouldn't it be nice if all the configuration settings read by code within an assembly to come from that assembly's config file as opposed to the app.config or web.config?  If I have an assembly (say ServiceClient.Dll) and all it contains is the code to talk to a service, then all service's related settings (i.e endpoint, bindings) can be placed within ServiceClient.config as opposed to the app's main config file. That would make dealing with configurations less messy and more modulerized.

Here is a nice article showing how it is done.

6/18/2015

Interesting explanation on why  B-Trees database indexes are efficient.
http://mattfleming.com/node/192

10/24/2014

Wish the MS documentation was more clear on this!

I spent two day hitting my head against the wall to figure this out! To deploy a web app using Microsoft Expression Encoder to Windows 2008 or 2013 Server, after installing the Microsoft Expression Encoder  SDK you must also add the Desktop Experience feature as well. Otherwise you get the following error:

Could not load file or assembly 'Microsoft.Expression.Encoder.Utilities.dll' or one of its dependencies. The specified module could not be found. 


10/09/2014

WebFaultException never sent to the client in Upload File.

I had created a WCF REST service which allows the clients to upload a file using the Stream parameter.

I discovered that as soon as I consume the stream, FaultExceptions will never make it to the client and the client gets a 202 (accepted) response instead! The WCF log shows that ther eservice had thrown an exception 'The message object has been disposed.' After some research, it turns out that tp be the StreamReader which I am using to read the stream in my implementation.Since StreamReader owns the stream, it will close it internally even though it was never closed in the code.



.net - Wrong WebFaultException when using a Stream and closing the stream - Stack Overflow:




1/29/2014

Showing a modal dialogs from a background thread is always a pain since you will get cross thread UI problems. SynchronizationContext comes to rescue.

Useful netsh commands

To see blocked ports on your system:  netsh interface ipv4 show excludedportrange protocol=tcp For more info visit: https://ardalis.com/atte...