COMException Unspecified Error with ADODB and .NET remote users

  • Thread starter Thread starter Jim Lacenski
  • Start date Start date
J

Jim Lacenski

I have a VB class that uses .NET and ADODB to write into
an Excel spreadsheet (via Jet) on a server as part of a
web application. ADODB is used instead of ADO.NET because
it greatly simplifies the write process, and is supported
for use on a server. (Excel is not supported (1),
licensing issues with OWC). The routine works fine for a
user at the server, but when a user from a system other
than the server runs the page the error "Unspecified
Error" occurs.

Exception Details:
System.Runtime.InteropServices.COMException: Unspecified
Error

which occurs on the Open call of the ADODB connection.
Code fragment:
' make connection to Excel sheet
strConnExcelPfx = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="
If blHasHeader = True Then
strConnExcelSfx = ";Extended
Properties=""Excel 8.0;HDR=YES;MAXSCANROWS=1;"""
Else
strConnExcelSfx = ";Extended
Properties=""Excel 8.0;HDR=NO;MAXSCANROWS=1;"""
End If

strConn = strConnExcelPfx & sTempFilePathName &
strConnExcelSfx

cnn.ConnectionString = strConn
cnn.Open()

What do I need to do to eliminate the "Unspecified Error"
for the web users?

Summary:
1) application works fine when run on the development
server by a (web) user at the server
2) application fails when accessed by a user remote to
the server (web client): Unspecified "COMException"
3) Excel and OWC are not acceptable alternatives due to
lack of MS support and licensing issues with OWC
4) ADODB preferred instead of ADO.NET for the write
because it greatly simplifies the code when scalability
to other data layouts is concerned

(1) Reference: MS KnowledgeBase article 257757

Thank you in advance,

Jim Lacenski
 
Hi,

I'm not sure but it looks like security issue (since it happning just to
remote users). try to change the default asp.net user by using Identity
tag in web.config. let me know

HTH


Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
Back
Top