Solved

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

Posted on 2014-04-16
1
306 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

840 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