Steps To Create New Project/Team On TFS

Select New item from drop-down tab that will be on left of Dashboard tab. On click New Items from drop-down will open Create new team pop-up:-    Put new Team name > Give Description > Select permissions (if permissions is already there else create a new permissions). Create a new sprint:- Click on iteration > New > Add Iteration name > Start Date & End Date > Click Save and close button. Go to newly created project/team dashboard. Click Backlog in Work area Newly created sprint will be show in Backlog items:-

Add Connection String in Web.Config File

First option can be used for windows authentication and second option is for SQL server authentication. 1. <connectionStrings>     <add name="CustConnectionString" connectionString="Data Source=localhost; Integrated Security=SSPI; Intial Catalog=LocalTestDB" providerName="System.Data.sqlClient"/> </connectionStrings> 2. <connectionStrings>    <add name="CustConnectionString" connectionString="Data Source=localhost; uid=sa; pwd =" providerName="System.Data.sqlClient"/> </connectionStrings>

Open IIS Manager at command prompt

Click run on start menu. Type Inetmgr on open dialogue box and then click ok.

Enable HTTP Transport Security (HSTS) in IIS 7

Q.  What is the best way to turn on   HTTP Strict Transport Security   on an IIS 7 web server? Ans:  This can be done by adding following block in Web.Config:               <system.webServer>                     <httpProtocol>                          <customHeaders>                               <add name ="X-CustomName" value="MyCustomValue"/>                                               </customHeaders>                    </httpProtocol>             </system.webServer> We have to configure on IIS that has the ability to custom headers to response: Go to Internet Information Services(IIS) Manager. Configure Response headers that are added to response from the server. Now add your custom header Name and custom Value (Custom header name and value should be same as that in Web.Config).
SQL Error : String or binary data would be truncated While working on an application I found an error 'String or binary data would be truncated.After finding the solution I thought to publish it. Whenever you see the message :   string or binary data would be truncated That means the field is NOT big enough to hold my data. Check the table structure you will find that the length of one or more fields is not big enough to hold the data you trying to insert. For example : As the column ' FIRSTNAME VARCHAR(5)' is able to hold 5 characters and you are trying to put characters greater than  5 in it then you will get this error.Increase the size of the field or decrease the value while inserting.

What is C#?

C# is an object oriented, type safe and managed language that is compiled by .Net framework to generate Microsoft Intermediate Language.

Difference between Destructor, Dispose and Finalize

Destructor They are special method that contains clean up code for the object.We can't call them explicitly in our code as they are implicitly called by GC(Garbage Collector).In c# they have same name as the class name preceded by the "~" sign. class MyClass     {         public MyClass()         { }         ~MyClass()         { }     } Dispose These are like any other methods in the class and can be called explicitly but they have a special purpose of cleaning up the object.In the dispose method we write clean up code for the object.It is important that we freed up all the unmanaged resources in the dispose method like database connections,files, etc.. The class implementing dispose method should implement IDisposable which is inherited by interface and it contains GC.SupressFinalize() method for the object it is disposing if the class has destructor because it has already done the work to clean up the object ,then it is not necessary for the garbage colle

When to use Truncate and Delete Command in SQL

INTRODUCTION Truncate and Delete in SQL are two commands which is used to remove or delete data from table. Though quite basic in nature both Sql commands can create lot of trouble until you are familiar with details before using it. An Incorrect choice of command can result is either very slow process or can even blew up log segment, if too much data needs to be removed and log segment is not enough. That's why it's critical to know when to use truncate and delete command in SQL but before using these you should be aware of the Differences between Truncate and Delete , and based upon them, we should be able to find out when DELETE is better option for removing data or TRUNCATE should be used to purge tables. I have still seen people firing delete command just to empty a table with millions of records which eventually lock the whole table for doing anything and take ages to complete or Simply blew log segment or hang the machine. Truncate Use truncate table if you need

Difference Between Delete & Truncate in Sql Server

INTRODUCTION While working on database, we are using Delete and Truncate without knowing the differences between them and when to use them . In this article we will discuss the difference between Delete and Truncate in Sql. Delete Delete is a DML command. Delete statement is executed using a row lock,each row in the table is locked for deletion. We can specify filters in where clause. It deletes specified data if where condition exists. Delete activities a trigger because the operation are logged individually. Slower than Truncate because it Keeps logs Truncate Truncate is a DDL command. Truncate table always lock the table and page but not each row.As it removes all the data. Cannot use Where condition.  It Removes all the data. Truncate table cannot activate a trigger because the operation does not log individual row deletions. Faster in performance wise, because it doesn't keep any logs. Note Delete and Truncate both can be rolled back when used with Tr

Rollback Table after Truncate Command in Sql Server

It is misconception among people that Truncate cannot be rolled back. But in reality Truncate operation can be Rolled Backed before Commit.Here is the Sql query -- Create table  CREATE TABLE Employee                   ( EmpID INT PRIMARY KEY ,                     EmpSalary INT                   ) -- Check data before Truncate SELECT * FROM Employee --Begin  Transaction BEGIN TRAN --Truncate Table TRUNCATE TABLE Employee GO --Check data after Truncate SELECT * FROM Employee GO --Rollback Transaction ROLLBACK TRAN GO --Check the data after Rollback SELECT * FROM Employee GO Note:- If Transaction is done, mean Committed then we can not rollback Truncate command from log file but we can restore data using MSSQL Server Management Studio. Check for difference between Delete and Truncate in next article. Give your valuable comments it's encourage me to publish new articles.