Hi
I am trying to import an excel file to SQL Server database using SSIS in asp.net web app. My code is working when running as local host. when hosted the same code in IIS, Its not working. Giving Error Msg
Exception Details: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0xC020801C
Line 188:
Line 189:
Line 190: managedFlatFileInstance.AcquireConnections(null)
Line 191:
Line 192: managedFlatFileInstance.ReinitializeMetaData()
Stack Trace:
[COMException (0xc020801c): Exception from HRESULT: 0xC020801C]
Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass.AcquireConnections(Object pTransaction) +0
ImportLib.IntegrationService.Specialized.ExcelFileSource.InitializeDataflowComponent(DataflowComponent sourceDataFlowComponent) in D:\HARI\latest\SSISnew\IntegretionService_src\IntegretionService_src\ImportLib\IntegrationService\Specialized\ExcelFileSource.cs:190
ImportLib.IntegrationService.Specialized.DataflowManager.CreateDataflowComponents(DTSPackage package, DTSExecutable dataflowTask) in D:\hari\latest\SSISnew\IntegretionService_src\IntegretionService_src\ImportLib\IntegrationService\Specialized\DataflowManager.cs:100
ImportLib.IntegrationService.Specialized.DataflowManager.CreateDataFlowTask(DTSPackage package) in D:\hari\latest\SSISnew\IntegretionService_src\IntegretionService_src\ImportLib\IntegrationService\Specialized\DataflowManager.cs:79
ImportLib.IntegrationService.DTSManager.Transfer(ISourceStorage source, IDestinationStorage destination) in D:\HARI\latest\SSISnew\IntegretionService_src\IntegretionService_src\ImportLib\IntegrationService\DTSManager.cs:94
ImportLib.ImportManager.Transfer(ImportJob job) in D:\HARI\latest\SSISnew\IntegretionService_src\IntegretionService_src\ImportLib\ImportManager.cs:346
ImportLib.ImportManager.Transfer(String ConnectionString, String IntegratedSecurity, String TemplateName, String FileName, Int16 FileType, String TextQualifier, String ColumnDelimiter, Boolean HasTxtQualifier, Boolean UnixFile, Boolean FirstRowColName, Int32 SkipRows, String& errmsg, String ExcelSheetName, Boolean LookupRowDelimiter, Int16 UseThisRowDelimiter) in D:\HARI\latest\SSISnew\IntegretionService_src\IntegretionService_src\ImportLib\ImportManager.cs:291
WebImportSSIS._Default.Button1_Click(Object sender, EventArgs e) in D:\HARI\WebImportSSIS\WebImportSSIS\Default.aspx.cs:38
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
My connection string for excel is:
Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=""EXCEL 8.0;HDR=YES;"";Data Source=" + excelDatasource.FileName;
Can any one please give a good solution.
Thanks
Hari