I have Stored Procedure in SQL that works in C# fine locally. When I publish my C# project and call that stored procedure, it do not work anymore.
My Connection String:
<add name="SqlConnectionString" connectionString="Data Source=SERVER;Initial Catalog=BD;Integrated Security=True" providerName="System.Data.SqlClient" />
Calling the Stored Procedure:
SqlConnection sqlCon = null;
String SqlconString = ConfigurationManager.ConnectionStrings["SqlConnectionString"].ConnectionString;
using (sqlCon = new SqlConnection(SqlconString))
{
sqlCon.Open();
SqlCommand sql_cmnd = new SqlCommand("Actualizar_Avaliacoes_Servicos", sqlCon);
sql_cmnd.CommandType = CommandType.StoredProcedure;
sql_cmnd.ExecuteNonQuery();
sqlCon.Close();
}
