Linq到Excel和发布到godaddy问题
本文关键字:godaddy 问题 Excel Linq | 更新日期: 2023-09-27 18:05:23
在我的机器上一切正常,但在发布到godaddy后,我得到了这个错误:
[5/28/2014 3:54:41 AM ]: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. , System.Data , at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at LinqToExcel.Query.ExcelUtilities.GetWorksheetNames(ExcelQueryArgs args)
at LinqToExcel.Query.ExcelQueryExecutor.GetWorksheetName()
at LinqToExcel.Query.ExcelQueryExecutor..ctor(ExcelQueryArgs args)
at LinqToExcel.Query.ExcelQueryable`1..ctor(ExcelQueryArgs args)
at LinqToExcel.ExcelQueryFactory.Worksheet(Int32 worksheetIndex)
at ArabicEWorld.BusinessLayer.NounManager.processNounFile(String path)
at ArabicEWorld.WebService.ArabicEWorldWebService.ProcessNounsFile() ,
知道如何使它在主机服务器上正常工作吗,而且它是共享主机,我的意思是我不能在上面设置任何程序
就像Krishanu Dey在评论中提到的,你不能在GoDaddy的共享主机上使用LinqToExcel,因为他们不允许你安装LinqToExcel使用的所需的OleDb引擎。
你会想找一个VPS来安装OleDeb引擎
我用openxml SDK解决了这个问题,稍微慢一点但它完成了任务