Pablo Retyk's blog

"An error occurred while trying to display the error message."

  • Override WCF client settings for custom config file using DuplexChannel

    WCF config files are a great thing, once you have everything configured you just need 2 or 3 lines of code and everything get parsed and you are able to consume the service. By default WCF configuration is stored in the app.config or web.config of the main application, but sometimes (as was my case) the client is in-process of another unknown application, if so the WCF config file will have to be named SomeApp.exe.config and would need to be placed in the same folder as the application. Dealing with this can make things difficult, this is when you have to create your own ChannelFactory, this way you can provide your own config file. The solution I found after doing some goggling was to inherit from ChannelFactory and the pass the config file to the constructor

  • "No files were found to look in"

    Today I was really frustrated trying to use the search on Visual Studio, I was searching for something I was sure it was somewhere in the code, but Visual Studio didn't find anything. I searched again and again thinking that maybe I checked some 'don't show any results" checkbox, I even started to believe that that piece of code I was looking for didn't exist, even though I saw it a thousand times, fortunately I decided to read what was written in the search results window:

  • Attach to process for lazies

    Attaching to a process is something that developers use very often to debug, but what happens when the process (A) you want to debug is launched from another process (B) and you want to debug is the initialization of process A,  Supposing that process A can only run within the context of process B in that case the only way to start process A is to do so from process so classic F5 won't help us to debug the initialization of A.