"Unspecified error" at accesing Excel file from asp, after installing Win 2003 SP1
am 14.09.2005 11:54:05 von istvan
I have an asp web application which reads the content of an Excel file
using the ADO objects.
After installing the Windows 2003 SP1 I encountered the following error
at opening the xls file:
"Microsoft JET Database Engine error '80004005'
Unspecified error"
I'm using the following piece of code for opening the Excel file:
sCnn = "Provider=Microsoft.Jet.OLEDB.4.0;"
sCnn = sCnn & "Data Source=""" & sFilePath & """"
sCnn = sCnn & ";Extended Properties=""Excel 8.0"
sCnn = sCnn & """"
Set cnnExcel = Server.CreateObject("ADODB.Connection")
cnnExcel.CursorLocation = 3 'adUseClient
cnnExcel.Open sCnn
It crashes at the last line.
Does anybody know what could be the problem?
Thanks,
Istvan
Re: "Unspecified error" at accesing Excel file from asp, after installing Win 2003 SP1
am 16.09.2005 12:08:23 von Jens
wrote in message
news:1126691645.795144.185720@g47g2000cwa.googlegroups.com.. .
>I have an asp web application which reads the content of an Excel file
> using the ADO objects.
> After installing the Windows 2003 SP1 I encountered the following error
> at opening the xls file:
> "Microsoft JET Database Engine error '80004005'
> Unspecified error"
>
> I'm using the following piece of code for opening the Excel file:
>
> sCnn = "Provider=Microsoft.Jet.OLEDB.4.0;"
> sCnn = sCnn & "Data Source=""" & sFilePath & """"
> sCnn = sCnn & ";Extended Properties=""Excel 8.0"
> sCnn = sCnn & """"
>
> Set cnnExcel = Server.CreateObject("ADODB.Connection")
> cnnExcel.CursorLocation = 3 'adUseClient
> cnnExcel.Open sCnn
>
> It crashes at the last line.
>
> Does anybody know what could be the problem?
> Thanks,
> Istvan
>
Could be an security issue in the component service.
Excel blocks if a program try to open it remote or local.
To change these settings do this:
run dcomcnfg.exe
Click icon My computer -> tab COM security
Insert the usergroup you want to give the rights, in Access permissions and
Launch and activation permissions
"Everyone with full control opens it all"
Jens...
Re: "Unspecified error" at accesing Excel file from asp, after installing Win 2003 SP1
am 16.09.2005 16:38:25 von istvan
Thanks for the replay, but unfortunately it did not helped.
I' sure that it is a security issue, but I could not find the cause.
In the mean time I made some progress: I created a new virtual site, a
new Application Pool for it and for the newly created application pool
the computer Administrator is specified at the Identity. If I copy the
asp file in this virtual site then the Excel file is opened without
problem.
Note that the original site uses the DefaultAppPool where the Network
Service user is specified at the Identity.