How to copy folder with content with C#

using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CopyFolder { class Program { static void Main(string[] args) { string sourcePath = @”G:\Mahedee_Share\Created”; string destPath = @”G:\Mahedee_Share\Development”; CopyFolder(sourcePath,destPath); } private static void CopyFolder(string sourcePath, string destinationPath) { try { //Now Create all of the directories foreach (string dirPath in Directory.GetDirectories(sourcePath, “*”,

Read More

How to configure IIS for different port

1.      Open IIS Manager (run -> inetmgr) 2.      In the Connections pane, expand the Sites node in the tree, and then click to select the site for which you want to add/edit binding. 3.      Right click on the site and click Edit bindings 4.      Select Port on the site binding pane 5.      Click Edit button 6.      In Edit Site Binding pane type port (ex. 1080) and click Ok

Call JavaScript from Asp.net code behind

Suppose you want to display confirmation message by javascript from asp.net code behind after saving data. Write the following code in your button event. protected void btnSaved_Click(object sender, EventArgs e) { string msg = “Data saved sucessfully”; Page.ClientScript.RegisterStartupScript(this.GetType(), “Alert”, “

Which Service is using which port?

Every day we fell in some difficulties and want to know which service is using by which port? Ports are divided into three ranges: The well-known ports (from 0 to 1023), the registered ports (from 1024 to 49151) and Dynamic (Private) ports (from 49152 to 65535). The Internet Assigned Numbers Authority (IANA) is responsible for

Read More

Unlock file(s) which is locked by someone in TFS

If you are team project administrator, do the following to unlock or undo checkout. From the Source Control Explorer find the folder containing the locked file(s). Right click and select Find -> Find by Status “Find in Source Control” window will appears Click the Find button A “Find in Source Control” tab should appear showing the file(s) that are checked

Read More

HTTP Error 404.3

Did you find the error “HTTP Error 404.3” ? Yes, I found the error at the time of deploying my ASP.NET web application to IIS 7. I found the following error (screen shot). To solve the error follow the following steps: Step 1: Go to Control Panel -> Programs and Features -> Turn Windows

Read More