Browse by Tags
All Tags »
Tips&Tricks (
RSS)
One of the ways to add another security level to our application is to use SSL. SSL gives the ability to encrypt messages between two endpoints. If you will search the web you’ll probably notice that this ability is given to you [almost] out of the box. If you are already using IIS as your web server and you want to add this security level, all you need to do is to check some check boxes in your web site configuration. In order to accomplish the configuration part you will be asked to provide a certificate...
It's very useful to take an enum and bind it into bind-able controls (like drop down list, check box, grid view and etc). For example, if we have an enum which represents bug statuses and you want to bind it into a drop down list. public enum Bug { Opened = 1, Closed = 2, Rejected = 3, Resolved = 4, InProgress = 5 } In addition, usually in a UI we want to separate between the enum words (for example to change the "InProgress" to "In Progress"). I search over the net and I...
Few days ago we faced an interesting challenge, we needed to implement a component which can move some code execution from a web context to a different context (like a service host in a windows service). The request first came up when we needed to perform a heavy processing work which started in a web context. Furthermore, we had some additional constraints like: This process shouldn’t use the same web application thread pool and we needed it will execute in a high isolation level. We chose to implement...
Did you ever need to do some string manipulation? For example, in a case you have a collection of string and you want to display it nicely in GUI with a separator? Or, if you want to check if a string contains a value? Or just to build your SQL statement in a case you need to create an "IN" clause and you have a collection as a parameter? String class gives us some powerful helper methods which help us to manipulate our strings. I'm really sure that you already familiar with some of...
It's a best practice to work with strong types instead of typing the name of the class/properties by our own hands. One of the common places that we are usually typing a string is when we're retrieving data from configuration file. In this post I will show you how to declare a custom configuration section with a strongly typed class. 1. Declare the configuration section in configuration file: < configSections > < section name = " serviceSettings " type = " ServiceSettingsHandler...
I want to add some tracking tools to my blog, just to know if someone is interesting in my posts. One of the tracking tools I decide to add was Google analytics – a really powerful tool that gives you a visual view on your site visitors, must viewable posts, traffic sources and much more. So I got into its site and registered my blog as one that I want to track for. Like all other tracking tools I just needed to add a piece of script code and everything supposed to work perfect. The script looks...