If you are like me and you are asked to implement a workflow that interfaces with the developers using Git and allows changes to flow through to the SVN repo seamlessly, then this post might be helpful.
Oct 07 2013
A word of caution, this is going to be a long long post. Let’s begin:
May 22 2013
If you are like and you were give a “scenario” where you had to design an online carousel which would show some images stored on the application server then you might find this demo useful . There are many different ways to create such an application and a typical method that comes to mind when brainstorming is to create an Asp.Net MVC app which has a razor template that has a place holder for these images. The browse initiates a request for these images by a click of a button, a full server postback is performed which invokes some controller in the application which renders our razor template in the view with the place holders resolved as img tags pointing to these images on our server. The HTML response will also have the required css and js files to create the carousel animation.
May 21 2012
If you are like me and you have deployed a windows service onto a production server and the CPU on the server spikes randomly then, this post may be helpful in finding the root cause of the problem.
Generally speaking, high CPU usage is indicative of the fact that one or more thread(s) in your application are stuck in some sort of an endless loop, and to bring CPU usage to normal levels you would most likely have to restart your app. This is exactly what happened to my innocent Windows service which was hosting an in-process WCF service to accept two string values from a client and relay that information to a third party API.
To start the diagnosis, I opened up windows task manager to see which process was consuming most of the CPU. Since this was a plain-vanilla Windows 2008 server with no other applications installed; apart from my windows service, it was quite clear that this service was the culprit. The CPU usage was around 90% when i first looked. I then created a dump file for further analysis by right clicking on the process in the task manager.
Mar 20 2012
If you are like me and you rely on trace information generated by your programs to diagnose production issues then you might like NLog.
NLog is a lightweight open source logging library which has worked well for me in the last couple of projects that I have shipped. Amongst many different configuration options that NLog offers, the 2 that I have used mostly are Console logging and Flat text file logging.
Jan 12 2012
If you are like me and you have a similar problem of having to share common in-house library code between various Visual studio solutions and you are using SVN for your source code control, then SVN Externals might be a good option to consider.
In my scenario, I had a class library which contains a lot of utility classes that are shared amongst different applications I write. Before starting a new project, I would typically create a Solution Items / bin folder in the solution directory of the new project and would place the compiled library dll in this folder which gets checked into SVN repo along with the application code. This approach sort of worked but had the following pain points:
- Before starting a new project, I had to get the latest version of the library code from the repo. Compile it and grab the dll and place it in the solution items folder of the new project.
- When I added more functionality to the library code, the existing solutions could not benefit from it.
- I could not debug the library code from within the application solution, unless i used Reflector Pro to decompile the library.
Oct 15 2011
If you are like me and you’ve:
- Created a WCF service that is hosted within a windows process.
- Configured the WCF service in code, instead of a config file.
- Exposed this service via the internet to a 3rd party (via router port forwarding for initial testing)
- Used basic http binding.
It all works fine, if you try to generate the service proxy (using svcutil.exe) from the local network, but the 3rd party complains that they can’t. Although they can see the default service help/greeting page when they view it in a browser.
Oct 02 2011
If you are like me (a lay-dev) and you swing back and forth between writing .net 4 and .net 2 apps. You are also asked to write simple winform applications from time to time, then this might help just a tad bit.
Like the rest of the world I’m in love with lambdas, extension methods, LINQ and all the cool stuff that was introduced post .net 2.0. So when i am writing in.net 2.0, this is the first pain point. I finally decided to look for a smarter way this time around & found something quite incredible.
Sep 30 2011
If you are like me and you develop a lot of small Visual Studio Solutions that need to be checked into SVN then you’ll love this tool.
I found it on Jeff Attwood’s site a while ago. Basically, the tool gets the crap out of your solution folder, makes it ideal for you to check in the entire folder as-is into subversion using windows explorer.