5,699,997 members and growing! (21,827 online)
Email Password   helpLost your password?
Web Development » ASP.NET » General     Intermediate License: The Code Project Open License (CPOL)

Deployment Of Web Application Executing SSIS Package In Web Server.

By santosh poojari

This article describes the prerequisite needed for .Net And SSIS integrated deployment.
C# (C# 2.0, C#), .NET (.NET, .NET 3.0, .NET 3.5, .NET 2.0), SQL Server (SQL 2005, SQL Server), ASP.NET, Architect, DBA, Dev, Design

Posted: 4 Sep 2008
Updated: 4 Sep 2008
Views: 4,010
Bookmarked: 8 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
5 votes for this Article.
Popularity: 2.10 Rating: 3.00 out of 5
3 votes, 60.0%
1
0 votes, 0.0%
2
0 votes, 0.0%
3
0 votes, 0.0%
4
2 votes, 40.0%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article

Sample Image - maximum width is 600 pixels

Introduction

Recently I was working on the module that has SSIS package that needs to be called from ASP.net web page. We have two production server one is web server (.Net Framework 2.0- IIS 6.0) and other one is Database server (SQL Server). The challenge we face was to deployed web application calling SSIS -Dtsx package from .net environment as a file system. This article describes prerequisites required before one go on for deployment into production.

1.Deployment Checklist And Important Notes

1.Installed Integration service In Web Server

Make sure Web server in which web application is going to be deployed has Integration service installed. It does not require database to be installed. This will help to include references Microsoft.SqServer.ManagedDTS in Global Cache Assembly.

Reference :

       using Microsoft.SqlServer.Dts.Runtime;
        
       protected void btnExecute_Click(object sender, EventArgs e)
       {
            Application app = new Application();
            Package package = null;
            try
            {
            string fileName = 
Server.MapPath(System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName.ToString()));
            FileUpload1.PostedFile.SaveAs(fileName);
            
            //Load DTSX
            package = 
app.LoadPackage(@"D:\SSIS_ASP_NET\SSIS_ASP_NET_DEMO\SSIS_ASP_NET_DEMO\Package1.dtsx", null);
            
            //Global Package Variable
            Variables vars = package.Variables;
            vars["Business_ID"].Value = txtBusinessID.Text;
            vars["Business_Name"].Value = txtBusinessName.Text;
            
            //Specify Excel Connection From DTSX Connection Manager
            package.Connections["SourceConnectionExcel"].ConnectionString =
 "provider=Microsoft.Jet.OLEDB.4.0;data source=" + fileName + ";Extended Properties=Excel 8.0; ";
            
            //Execute DTSX.
            Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();
        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {
            package.Dispose();
            package = null;
        }
    }

        

Sample Image - maximum width is 600 pixels

Sample Image - maximum width is 600 pixels

Sample Image - maximum width is 600 pixels

2.If Migrated From SQL Server 2000 To SQL Server 2005

Database server having SQL server 2000 and SQL Server 2005 both installed in same box, make sure SQL server 2000 is stopped. Check the connection string in web application .See below if you get this error

"SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "[DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.". 8/12/2008 5:31:38 PM SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "DestinationConnectionOLEDB" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. 8/12/2008 5:31:38 PM component "Destination - XXXX" (41) failed validation and returned error code 0xC020801C. 8/12/2008 5:31:38 PM One or more component failed validation. 8/12/2008 5:31:38 PM There were errors during task validation. 8/12/2008 5:31:38 PM "

Resolution to this to include instance name and port in DATA SOURCE property.

< data source=10.10.10.10/Yukon,1533;initial catalog=NorthWind;UID=xxx;PWD=xxx; Connect Timeout=300>

3.Web application having Enterprise Library

Add pooling =false in connection string to disable database connection pooling mechanism

< data source=10.10.10.10/Yukon,1533;initial catalog=NorthWind;UID=xxx;PWD=xxx; Connect Timeout=300;pooling=false>

Conclusion

Any corrections and inputs are most welcome.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

santosh poojari


He is a Team Lead currently working with a software company in India.He has overall 5.5 years of experience in .net technology. He is a B.E in computers from Mumbai University. His area of Interest is Microsoft Technology : Asp.Net,C#,Web services,SSIS,SSRS,Windows Workflow Foundation 3.0,State Machine Compiler,Regular Expression, Enterprise Library3.0,Spring.net,Design Patterns and Architecture Design.
He is MCPD-EA Certified.

He loves playing Cricket,Driving,Music and Drawing Sketches.
Occupation: Team Leader
Location: India India

Other popular ASP.NET articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 3 of 3 (Total in Forum: 3) (Refresh)FirstPrevNext
GeneralProblem in accessing SSIS package after deploying web application...memberavik103:14 23 Nov '08  
GeneralThanks for sharingmemberAbhijit Jana19:45 4 Sep '08  
GeneralRe: Thanks for sharingmembersantosh poojari22:33 16 Sep '08  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 4 Sep 2008
Editor: Sean Ewington
Copyright 2008 by santosh poojari
Everything else Copyright © CodeProject, 1999-2008
Web17 | Advertise on the Code Project