Hi Guys!

I am using the following Connection Strings for ms sql. I am new in programing so help me.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'Administrator'.

Source Error:

Line 27:
Line 28: SqlConnection conn = new SqlConnection(ConnStr);
Line 29: conn.Open();
Line 30:
Line 31: string Query = "insert into CustomerInfo(ReportingPlace, BelongingArea, Name,Address, POBox, City,Country, Phone, Mobile, Email, Website, CustomerType, ReferedBy, Remarks) " +


    <add name="DaniConnectionString" 
connectionString="Data Source=DANISH-AHMED\Administrator;
Initial Catalog=Dani_Test;
User ID=Administrator;
Password=danish106" providerName="System.Data.SqlClient"/>

try following code for inserting data using asp.net
SqlConnection conn = new SqlConnection(connStr);
SqlCommand cmd = new SqlCommand(StrSql, conn);
int i = cmd.ExecuteNonQuery();
return i;