Zeeshan Umar's .Net Blog

In almost all projects we have to implement some kind of logging mechanism which facilitates us in finding the root cause of the issue and application health. However generally I believe that log files are not properly formatted due to which we need to spend more time in understanding our log files.

So, finally I have written a small class to format complex object into well formatted log file. Also it uses word wrap on columns of log to ensure readable format. Here is how log files look before:-

This is been quite some time since I have shared some useful stuff
with community. As you all know priorities always keep changing. So here
is another simple utility class to generate random password.

You
can define the minimum numbers of characters in your password string as
well. This can be very useful if you have strict requirements for
password security. As many password policy restrict user to set a
password with sufficient complexity so that no one can brute force it
easily.

This class uses double randomization algorithm to ensure that passwords don't get repeated. First it randomly picks the characters into a buffer. Once done, it does random swapping of all elements on buffer to ensure randomness of password.
Here is how you can utilize this code:-

Many People has asked me that how they can add hyper link to another sheet through EPPlus. This is bit tricky because ws.Cells[1,1].Hyperlink takes Uri object which is generally used for external references only (file or website).

So after doing bit RnD I have developed a function through which you can easily add hyperlinks within your sheets. Here is the function:-

Last month I was invited at PNSC (Pakistan National Shipping Corporation) to have a session related to ASP .Net MVC 3. It was really a wonder full experience to share the knowledge with other persons. You can find the slides shared during session below:-