COMException Unspecified Error with ADODB and .NET remote users

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
 
N

Natty Gur

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top