How to add a configuration file (app.config) to your #C application?

How to add a configuration file (app.config) to your #C application?
3.7 (73.33%) 3 votes

Hi,

This article shows how to add a simple configuration file (app.config) to your #C project. Sooner or later, you need to change a value such database connection string or username. By adding an application configuration file (app.config file) to a C# project, you can customize how the common language runtime locates and loads assembly files which means you can create keys to be used on your project without need to recompile it everytime you need to update some value.

 

What is App.config?

At its simplest, the app.config is an XML file with many predefined configuration sections available and support for custom configuration sections. A “configuration section” is a snippet of XML with a schema meant to store some type of information.

Settings can be configured using built-in configuration sections such as connectionStrings or appSettings. You can add your own custom configuration sections; this is an advanced topic, but very powerful for building strongly-typed configuration files.

Web applications typically have a web.config, while Windows GUI/service applications have an app.config file.

Application-level config files inherit settings from global configuration files, e.g. the machine.config.

Reading from the App.Config

Connection strings have a predefined schema that you can use. Note that this small snippet is actually a valid app.config (or web.config) file:

Once you have defined your app.config, you can read it in code using the ConfigurationManager class. Don’t be intimidated by the verbose MSDN examples; it’s actually quite simple.

Continue reading “How to add a configuration file (app.config) to your #C application?”

Synchronize your Folders using SyncToy (for Windows)

Synchronize your Folders using SyncToy (for Windows)
5 (100%) 1 vote

Hello,

If you use different computers and drives in your job or at home, it can be annoying maintaining the same data in all places in case of disaster recovery.

Today’s post is about how to create your own personal “backup” solutions. Let’s get the party started then!

My bottom line

All the lights goes to “Microsoft SyncToy“. It’s a piece of cake. It’s free, it does completely his job and it’s lightweight. What else?

 

For Windows

Creating your disaster recovery plan can be easier with the Microsoft SyncToy 2.1 utility. You might have a flash drive to bring your data from the workplace to your home and vice versa. Though sometimes you might forget to copy that files and misteriously your drive starts failing. And oh boy, now you’re in problems .. or not, if you use Microsoft Sync Toy. It’s easy!

With Microsoft’s SyncToy it allows you to easily make sure all data between drives and folders is synchronized. There are a plently of reasons you might want to synchronize folders,  wanna to sync your My Pictures folder with the one at work, or sync your music at home with music on another computer. The bottom line is, it’s free and it works. Is provided by Microsoft and was once part of the XP Power Toys but has continued to grow and improve.

Continue reading “Synchronize your Folders using SyncToy (for Windows)”

Keep your SSRS ExecutionLog more than 60 days

Keep your SSRS ExecutionLog more than 60 days
5 (100%) 2 votes

Hello,

Welcome back! As 2017 begins, things are going to change around here. A new challenge has arrived, #22posts12months. I will try to keep posts shorter and objective. I will publish every 15 days. Keep me updated on how it all works for you!

ExecutionLogDaysKept

Probably you didn’t noticed yet but if you try to collect usage information for our Microsoft SQL Server Reporting Services (execution log), by default Reporting Services instance will only keep the most recent 60 days in the execution log . Even though the server had been running a good deal longer than that!

Parameter: ExecutionLogDaysKept

The number of days to keep report execution information in the execution log. Valid values for this property include 0 through 2,147,483,647. If the value is 0 entries are not deleted from the Execution Log table. The default value is 60.

Source: https://technet.microsoft.com/en-us/library/bb934303(v=sql.105).aspx

How to keep them then?

There’re 2 ways to do this: (1) through Server Properties page or (2) a SQL statement.  Continue reading “Keep your SSRS ExecutionLog more than 60 days”

The Beginner’s Guide to ServiceNow (Part 1): How to start and continue?

The Beginner’s Guide to ServiceNow (Part 1): How to start and continue?
5 (100%) 2 votes

Hello,

If you have been involved with IT in any capacity over the last years, you have probably heard the name ServiceNow. That is because in just a short period of time, this PaaS (Platform-as-a-service provider) has become one of the major players in the world of IT management. And with the company increasingly servicing the public sector, the ubiquity of ServiceNow products is only expected to grow. Continue reading “The Beginner’s Guide to ServiceNow (Part 1): How to start and continue?”

Boonzi – Take Control of Your Personal Finances

Boonzi – Take Control of Your Personal Finances
5 (100%) 2 votes

Over the past years, I tried several personal finance managers to try control my expenses. My requirements were very tough. The application shall respect the following requirements:

  • Multi-platform compatible (Windows, MacOS X and iOS).
  • Synchronous between platforms
  • Encrypted storage
  • Support multi currency
  • Import data from any online banking
  • Monthly reports and budget system

It wasn’t easy. During that time it was clear to me that while no alternative solution is perfect. I found several applications but they do not met on my requirements.

Tired of old and classic interfaces, tired of lack of user experience.

I got to move forward until I found BoonziContinue reading “Boonzi – Take Control of Your Personal Finances”

LMCompatibility – Failed to connect remote server via Remote Desktop (RDP)

LMCompatibility – Failed to connect remote server via Remote Desktop (RDP)
4.5 (90%) 2 votes
Hey guys,

Everything has been working great until recently for some reason you cannot use your RDP client to access your remote server? Did your remote desktop client continues to pop-up and you’re sure that entered the right password? Or your session unexpectedly exits? The following procedure could work on you.

Continue reading “LMCompatibility – Failed to connect remote server via Remote Desktop (RDP)”

Create your database sample from a excel file using deltasqltool

Create your database sample from a excel file using deltasqltool
4.7 (93.33%) 3 votes

Hi guys,

 

Did you ever think about how you can have a sample data to start build your ETL in meantime you don’t have access to the database?

Imagine the following scenario,

You’re a Europe(an) database administrator and you have received new requirements to build a new report. You found that the required data is located at China and your connection is actually strictly limited due security restrictions on both countries.

The integration will be something as I illustrate on the below figure.

 

DiagramTransferDataDBs

Continue reading “Create your database sample from a excel file using deltasqltool”

Excel found unreadable content when exporting a SSRS report

Excel found unreadable content when exporting a SSRS report
4.7 (93.33%) 3 votes

Hi guys,

I ran into a strange bug in Visual Studio when I was developing a new report to track the effort of each team member. Noticed that “description” field on the incidents was containing an invalid ASCII symbol,called “VT”. Imagine field “description” as a field available on a random ITIL platform where the users enters the full incident description.

Continue reading “Excel found unreadable content when exporting a SSRS report”

Hello World

Hello World
5 (100%) 1 vote

<Hello, World />, 9th September 2016.

Dear visitor,

I’d like to personally welcome each of you to my personal knowlegde base

To continue grow and self-improve as a profissional and a person, I decided to search for new ideas. Consider the knowledge you already have — the things you really know you can do. They are the things you have done over and over; practiced them so often that they became second nature. How many times you googled it and didn’t found the answer? If the goal is sharing ideas and findings, why not starting a blog? Let’s change the numbers.

Continue reading “Hello World”