title: SQL Server 2005, Windows Authentication, Connection String giving error "Login Failed"
body: <p>I have SQL Server 2005 and Visual Studio 2005  installed on my desktop.
  Every time I run SQL Server 2005, I have to go for "<strong><em>RUN AS ADMINISTRATOR</em></strong>" manually. I have tried changing the settings but no go. So I do it that way only.
  But anyways, that's not the actual issue.</p>
  
  <p>Now when I am making a connection string in Visual Studio- console application for Windows Authentication, it is throwing an error "Login failed".</p>
  
  <p>I am new to .NET</p>
  
  <p>Code is as below:</p>
  
  <pre><code>using System;
  using System.ComponentModel;
  using System.Data;
  using System.Data.SqlClient;
  public class Vin 
  {
      public static void Main()
      {
          Console.WriteLine("Hello World!!!");
          SqlConnection con = new SqlConnection("Data Source=.; Initial Catalog=VinOne; Integrated Security=True");
          SqlCommand cmd = new SqlCommand("select * from Prod", con);
          con.Open();
          SqlDataReader dr = cmd.ExecuteReader();
          while (dr.Read())
          {
              Console.WriteLine("Got It!!!");
          }
          Console.Read();
      }
  }
  </code></pre>