rtay
asked on
stored procedure does not fire from ASP.NET after site is deployed
I have a stored procedure that fires an SSIS package from a button click event on an asp.net C# web site. The sql server that the SSIS package is deployed on is a server on the network. The sql server is not on my development machine. When running the website in debug mode from the development machine, the stored procedure fires correctly. After deployment, the stored procedure does not fire. No error messages, just nothing.
Here is the code to fire the stored procedure:
public partial class frm_Import : System.Web.UI.Page
{
private String strConnString = ConfigurationManager.Conne ctionStrin gs["SSISSt ring"].Con nectionStr ing;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
using (SqlConnection _conn = new SqlConnection(strConnStrin g))
using (SqlCommand _cmd = new SqlCommand("dbo.execute_ss is_package _sample", _conn))
{
_cmd.CommandType = CommandType.StoredProcedur e;
_cmd.Parameters.Add(new SqlParameter("@output_exec ution_id", SqlDbType.Int));
_cmd.Parameters["@output_e xecution_i d"].Value = 5; // whatever value you want
_conn.Open();
object result = _cmd.ExecuteScalar();
_conn.Close();
}
}
Here is the Connection string:
<add name="SSISString" connectionString="Data Source=SERVERNAME\MS2012;I nitial Catalog=master;Integrated Security=true" />
When I use sql server authentication In the connection string I get a error that windows security is required.
Again, I get no error message with the existing code. it just does nothing after deployment, but works fine on the development machine.
Here is the code to fire the stored procedure:
public partial class frm_Import : System.Web.UI.Page
{
private String strConnString = ConfigurationManager.Conne
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
using (SqlConnection _conn = new SqlConnection(strConnStrin
using (SqlCommand _cmd = new SqlCommand("dbo.execute_ss
{
_cmd.CommandType = CommandType.StoredProcedur
_cmd.Parameters.Add(new SqlParameter("@output_exec
_cmd.Parameters["@output_e
_conn.Open();
object result = _cmd.ExecuteScalar();
_conn.Close();
}
}
Here is the Connection string:
<add name="SSISString" connectionString="Data Source=SERVERNAME\MS2012;I
When I use sql server authentication In the connection string I get a error that windows security is required.
Again, I get no error message with the existing code. it just does nothing after deployment, but works fine on the development machine.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.