Solved

stored procedure does not fire from ASP.NET after site is deployed

Posted on 2014-04-16
1
301 Views
Last Modified: 2016-02-10
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.ConnectionStrings["SSISString"].ConnectionString;


        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {

            using (SqlConnection _conn = new SqlConnection(strConnString))
            using (SqlCommand _cmd = new SqlCommand("dbo.execute_ssis_package_sample", _conn))
{  
   _cmd.CommandType = CommandType.StoredProcedure;

   _cmd.Parameters.Add(new SqlParameter("@output_execution_id", SqlDbType.Int));
   _cmd.Parameters["@output_execution_id"].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;Initial 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.
0
Comment
Question by:rtay
1 Comment
 
LVL 51

Accepted Solution

by:
Mark Wills earned 500 total points
ID: 40005828
Sounds like it is unable to resolve the windows user / security issues.

On top of that there are SSIS roles and more importantly the SQL Server Agent roles.

I am guessing that in dev you are part of a privileged group ?

So... two MS articles to check : http://technet.microsoft.com/en-us/library/ms141053.aspx and http://technet.microsoft.com/en-us/library/ms188283.aspx

And a fairly thorough walkthrough : http://armordba.wordpress.com/2013/04/29/executing-a-sql-server-2012-ssis-package-with-a-proxy-account-with-least-rights-across-domains/

Now, the links above are for 2012 (in the TechNet versions, use the drop down the get to the correct version). The last one uses SSISDB being 2012 and you might need to adjust for MSDB in earlier versions.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now