Archive of ‘Tips & Solutions’ category

Remote Desktop Sessions from Commandline

You will commonly see the following error message when you try to connect windows 2003 server using RemoteDesktopConnection.

“The terminal server has exceeded the maximum of allowed connections ”

You can disconnect the other remotely logged in users if you are a domain Admin user. Most of the users some time not even be using the […]

Solution for Office 2007 application project system could not be enabled

When you first time creating a Office 2007 application using VS 2008 you may get the following error.
“Programmatic access to the Microsoft Office Visual Basic for Applications project system could not be enabled”
The Error looks like the following window

The solution for the above error is
1. Open the MS Word or MS Excel
2. Go to Tools […]

Calculating the size of the File in C#

This code snippet explains how to calculate the size of the file and display in a label control. For example I am taking PDF file to find the size. It Displays the size of the file in Bytes, Kilobytes and Megabytes.

//Calculate size of the PDF file        if (PdfFilePath.EndsWith("pdf")) […]

Working with Configuration files

Configuration files are central place to configure your web or windows applications. The web.config file is used for configuring the web applications and app.config for windows applications.
The ASP.NET Application comes with web.config file with default configuration sections and you can easily manage them at the intialstage of the project development. As soon as your project […]