Loading color scheme

How to read connection string from App.config

If you are writing console application in C# and need to use the database connection, probably you would like to store the connection string in the App.config file. This is a common practice for C#.NET applications. But how to read the connection string from the file? See the answer below: 

 

ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionStringName"].ConnectionString;
Fiddler: The Powerful Debugging Tool for any Web Developer

Fiddler is a debugging proxy that monitors all web requests between your computer and a remote server and allows to inspect and modify them.

Fiddler can be extended with scripts written in JScript.NET (it's very easy to write them), change the program menu, and in general it is a wonderful tool. You can use it with any browser. In the new version of Fiddler, some features may change, some may be introduced.

When you enter Fiddler, a query window opens on the left and work tabs on the right.

Fiddler

As you can see, there are many options, they barely fit in the image. And, believe me, there are even more opportunities.

Capabilities & Operations on requests in Fiddler
In the requests window on the left, you can view and select requests, view their headers, save them to disk all together or separately.

Read more
[Source Code] C# True Random Password Generator

password

If you need to generate a bulk amount of passwords you can use one of the widely available websites, use a console generator program, or if you don't trust anyone, you can quickly write your own program. Below is the source code of a True Random password generator written entirely in C#. Compared to similar programs available on the net, which use clock-dependent C# System.Random Number Generator, this code sample uses RNGCryptoServiceProvider which is far more secure and provides unique numbers over a long period of time. Even if you won't notice the difference in generating 1-2 passwords, the RNGCryptoServiceProvider will have more even distribution for thousands of iterations.

Read more
Get all interesting articles to your inbox
Please wait