This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C5DBD9.D060ACF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I'm trying to write an import utility for a web app that I am developing =
and I'm using an Excel spreadsheet to hold the data to be imported.

I'm using ODBC and this is my connection string--

"Driver=3D{Microsoft Excel Driver (*.xls)};Dbq=3D" + =
HttpContext.Current.Server.MapPath(".//" + csv_store_read);"

where csv_store_read is the directory where the Excel file is.

My application has to use a user account other than the anonymous =
internet account due to the requirements of the external system that it =
is accessing. I also have Impersonate set to true in the Web.config =
file.

I've also hard coded the file path to point to the file on the local =
machine and neither are working. I keep getting the following error:

[Microsoft][ODBC Excel Driver] Disk or network error.

This works fine on my Windows 2000 machine so I know it has something to =
do with security but I've tried everything I can think of to no avail.

Any ideas as to what I am missing?

TIA,

Bill Youngman

------=_NextPart_000_0008_01C5DBD9.D060ACF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2627" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I'm trying to write an import utility =
for a web app=20
that I am developing and I'm using an Excel spreadsheet to hold the data =
to be=20
imported.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm using ODBC and this is my =
connection=20
string--</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>
<P><FONT face=3DArial size=3D2>"Driver=3D{Microsoft Excel Driver =
(*.xls)};Dbq=3D" +=20
HttpContext.Current.Server.MapPath(".//" + csv_store_read);"</FONT></P>
<P><FONT face=3DArial size=3D2>where csv_store_read is the directory =
where the Excel=20
file is.</FONT></P>
<P><FONT face=3DArial size=3D2>My application has to use a user account =
other than=20
the anonymous internet account due to the requirements of the external =
system=20
that it is accessing. I also have Impersonate set to true in the =
Web.config=20
file.</FONT></P>
<P><FONT face=3DArial size=3D2>I've also hard coded the file path to =
point to the=20
file on the local machine and neither are working. I keep getting the =
following=20
error:</FONT></P>
<P><FONT face=3DArial size=3D2><EM>[Microsoft][ODBC Excel Driver] Disk =
or network=20
error.</EM></FONT></P>
<P><FONT face=3DArial size=3D2>This works fine on my Windows 2000 =
machine so I know=20
it has something to do with security but I've tried everything I can =
think of to=20
no avail.</FONT></P>
<P><FONT face=3DArial size=3D2>Any ideas as to what I am =
missing?</FONT></P>
<P><FONT face=3DArial size=3D2>TIA,</FONT></P>
<P><FONT face=3DArial size=3D2>Bill =
Youngman</FONT></P></DIV></BODY></HTML>

------=_NextPart_000_0008_01C5DBD9.D060ACF0--

Re: Can't open Excel spreadsheet from within .Net web app on Windows XP by Paul

Paul
Mon Oct 31 10:19:34 CST 2005

On Fri, 28 Oct 2005 16:08:20 -0400, "Bill Youngman" <wyoungman@anexinet.com> wrote:

¤ I'm trying to write an import utility for a web app that I am developing and I'm using an Excel spreadsheet to hold the data to be imported.
¤
¤ I'm using ODBC and this is my connection string--
¤
¤ "Driver={Microsoft Excel Driver (*.xls)};Dbq=" + HttpContext.Current.Server.MapPath(".//" + csv_store_read);"
¤
¤ where csv_store_read is the directory where the Excel file is.
¤
¤ My application has to use a user account other than the anonymous internet account due to the requirements of the external system that it is accessing. I also have Impersonate set to true in the Web.config file.
¤
¤ I've also hard coded the file path to point to the file on the local machine and neither are working. I keep getting the following error:
¤
¤ [Microsoft][ODBC Excel Driver] Disk or network error.
¤
¤ This works fine on my Windows 2000 machine so I know it has something to do with security but I've tried everything I can think of to no avail.
¤
¤ Any ideas as to what I am missing?
¤

Have you tried using Jet OLEDB with the Excel ISAM driver? I would avoid using ODBC if possible.

Also, have you provided sufficient permissions, for the user you are impersonating, to access the
folder where the Excel file is located?

I would also verify that the path (Dbq) to your Excel file is correct.


Paul
~~~~
Microsoft MVP (Visual Basic)

Re: Can't open Excel spreadsheet from within .Net web app on Windows XP by Bill

Bill
Tue Nov 01 10:10:45 CST 2005

I switched over to using OleDb and am now getting this error - 0x80004005
'unspecified error'.

I double checked the permissions on the file and the impersonated user has
full rights to the file. I found some threads that said to also set the
windows\temp directory to include this user as well, so I did that. Nothing
seems to work.

Help!!!!

"Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com> wrote in message
news:blgcm1p31ohdi5i0dbo1go3oejvji54lri@4ax.com...
> On Fri, 28 Oct 2005 16:08:20 -0400, "Bill Youngman"
> <wyoungman@anexinet.com> wrote:
>
> ¤ I'm trying to write an import utility for a web app that I am developing
> and I'm using an Excel spreadsheet to hold the data to be imported.
> ¤
> ¤ I'm using ODBC and this is my connection string--
> ¤
> ¤ "Driver={Microsoft Excel Driver (*.xls)};Dbq=" +
> HttpContext.Current.Server.MapPath(".//" + csv_store_read);"
> ¤
> ¤ where csv_store_read is the directory where the Excel file is.
> ¤
> ¤ My application has to use a user account other than the anonymous
> internet account due to the requirements of the external system that it is
> accessing. I also have Impersonate set to true in the Web.config file.
> ¤
> ¤ I've also hard coded the file path to point to the file on the local
> machine and neither are working. I keep getting the following error:
> ¤
> ¤ [Microsoft][ODBC Excel Driver] Disk or network error.
> ¤
> ¤ This works fine on my Windows 2000 machine so I know it has something to
> do with security but I've tried everything I can think of to no avail.
> ¤
> ¤ Any ideas as to what I am missing?
> ¤
>
> Have you tried using Jet OLEDB with the Excel ISAM driver? I would avoid
> using ODBC if possible.
>
> Also, have you provided sufficient permissions, for the user you are
> impersonating, to access the
> folder where the Excel file is located?
>
> I would also verify that the path (Dbq) to your Excel file is correct.
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)



Re: Can't open Excel spreadsheet from within .Net web app on Windows XP by Paul

Paul
Tue Nov 01 13:13:23 CST 2005

On Tue, 1 Nov 2005 11:10:45 -0500, "Bill Youngman" <wyoungman@anexinet.com> wrote:

¤ I switched over to using OleDb and am now getting this error - 0x80004005
¤ 'unspecified error'.
¤
¤ I double checked the permissions on the file and the impersonated user has
¤ full rights to the file. I found some threads that said to also set the
¤ windows\temp directory to include this user as well, so I did that. Nothing
¤ seems to work.
¤

Have you tried installing the latest Jet database engine service pack?

http://support.microsoft.com/kb/239114/


Paul
~~~~
Microsoft MVP (Visual Basic)

Re: Can't open Excel spreadsheet from within .Net web app on Windows XP by Bill

Bill
Tue Nov 01 13:52:21 CST 2005

Yes I already have it on my machine.

"Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com> wrote in message
news:bhffm1dgssho8usksn7bfcv059p44hd6ca@4ax.com...
> On Tue, 1 Nov 2005 11:10:45 -0500, "Bill Youngman"
> <wyoungman@anexinet.com> wrote:
>
> ¤ I switched over to using OleDb and am now getting this error -
> 0x80004005
> ¤ 'unspecified error'.
> ¤
> ¤ I double checked the permissions on the file and the impersonated user
> has
> ¤ full rights to the file. I found some threads that said to also set the
> ¤ windows\temp directory to include this user as well, so I did that.
> Nothing
> ¤ seems to work.
> ¤
>
> Have you tried installing the latest Jet database engine service pack?
>
> http://support.microsoft.com/kb/239114/
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)



Re: Can't open Excel spreadsheet from within .Net web app on Windows XP by Bill

Bill
Tue Nov 01 15:07:47 CST 2005

This is a multi-part message in MIME format.

------=_NextPart_000_001B_01C5DEFE.671228F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Through Google and searching on 'oledb excel asp.net' I found a posting =
that detailed the 'unspecified error' that I am getting and it suggested =
two things -

- The first was to make sure that the directory where the file is =
located has the proper permissions - did that.
- The second was to go to C:\Documents and =
Settings\machinename\ASPNET\Local Settings\Temp and make sure that the =
account that you are using for impersonation has permissions for this =
folder as well. Hadn't done that - but after I did I am now getting this =
'Could not find installable ISAM' - I guess it's progress though.

"Bill Youngman" <wyoungman@anexinet.com> wrote in message =
news:efwrh3x3FHA.1148@tk2msftngp13.phx.gbl...
> Yes I already have it on my machine.
>=20
> "Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com> wrote in =
message=20
> news:bhffm1dgssho8usksn7bfcv059p44hd6ca@4ax.com...
>> On Tue, 1 Nov 2005 11:10:45 -0500, "Bill Youngman"=20
>> <wyoungman@anexinet.com> wrote:
>>
>> =A4 I switched over to using OleDb and am now getting this error -=20
>> 0x80004005
>> =A4 'unspecified error'.
>> =A4
>> =A4 I double checked the permissions on the file and the impersonated =
user=20
>> has
>> =A4 full rights to the file. I found some threads that said to also =
set the
>> =A4 windows\temp directory to include this user as well, so I did =
that.=20
>> Nothing
>> =A4 seems to work.
>> =A4
>>
>> Have you tried installing the latest Jet database engine service =
pack?
>>
>> http://support.microsoft.com/kb/239114/
>>
>>
>> Paul
>> ~~~~
>> Microsoft MVP (Visual Basic)=20
>=20
>
------=_NextPart_000_001B_01C5DEFE.671228F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2769" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Through Google and searching on 'oledb =
excel=20
asp.net' I found a posting that detailed the 'unspecified error' that I =
am=20
getting and it suggested two things -</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>- The first was to make sure that the =
directory=20
where the file is located has the proper permissions - did =
that.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- The second was to go to C:\Documents =
and=20
Settings\</FONT><EM>machinename</EM>\<FONT face=3DArial =
size=3D2>ASPNET\Local=20
Settings\Temp and make sure that the account that you are using for=20
impersonation has permissions for this folder as well. Hadn't done that =
- but=20
after I did I am now getting this <EM>'Could not find installable ISAM' =
- </EM>I=20
guess it's progress though.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Bill Youngman" &lt;</FONT><A=20
href=3D"mailto:wyoungman@anexinet.com"><FONT face=3DArial=20
size=3D2>wyoungman@anexinet.com</FONT></A><FONT face=3DArial =
size=3D2>&gt; wrote in=20
message </FONT><A =
href=3D"news:efwrh3x3FHA.1148@tk2msftngp13.phx.gbl"><FONT=20
face=3DArial =
size=3D2>news:efwrh3x3FHA.1148@tk2msftngp13.phx.gbl</FONT></A><FONT=20
face=3DArial size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; =
Yes I already=20
have it on my machine.<BR>&gt; <BR>&gt; "Paul Clement" &lt;</FONT><A=20
href=3D"mailto:UseAdddressAtEndofMessage@swspectrum.com"><FONT =
face=3DArial=20
size=3D2>UseAdddressAtEndofMessage@swspectrum.com</FONT></A><FONT =
face=3DArial=20
size=3D2>&gt; wrote in message <BR>&gt; </FONT><A=20
href=3D"news:bhffm1dgssho8usksn7bfcv059p44hd6ca@4ax.com"><FONT =
face=3DArial=20
size=3D2>news:bhffm1dgssho8usksn7bfcv059p44hd6ca@4ax.com</FONT></A><FONT =

face=3DArial size=3D2>...<BR>&gt;&gt; On Tue, 1 Nov 2005 11:10:45 -0500, =
"Bill=20
Youngman" <BR>&gt;&gt; &lt;</FONT><A =
href=3D"mailto:wyoungman@anexinet.com"><FONT=20
face=3DArial size=3D2>wyoungman@anexinet.com</FONT></A><FONT =
face=3DArial size=3D2>&gt;=20
wrote:<BR>&gt;&gt;<BR>&gt;&gt; =A4 I switched over to using OleDb and am =
now=20
getting this error - <BR>&gt;&gt; 0x80004005<BR>&gt;&gt; =A4 =
'unspecified=20
error'.<BR>&gt;&gt; =A4<BR>&gt;&gt; =A4 I double checked the permissions =
on the file=20
and the impersonated user <BR>&gt;&gt; has<BR>&gt;&gt; =A4 full rights =
to the=20
file. I found some threads that said to also set the<BR>&gt;&gt; =A4 =
windows\temp=20
directory to include this user as well, so I did that. <BR>&gt;&gt;=20
Nothing<BR>&gt;&gt; =A4 seems to work.<BR>&gt;&gt; =
=A4<BR>&gt;&gt;<BR>&gt;&gt; Have=20
you tried installing the latest Jet database engine service=20
pack?<BR>&gt;&gt;<BR>&gt;&gt; </FONT><A=20
href=3D"http://support.microsoft.com/kb/239114/"><FONT face=3DArial=20
size=3D2>http://support.microsoft.com/kb/239114/</FONT></A><BR><FONT =
face=3DArial=20
size=3D2>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt; Paul<BR>&gt;&gt; =
~~~~<BR>&gt;&gt;=20
Microsoft MVP (Visual Basic) <BR>&gt; <BR>&gt;</FONT></BODY></HTML>

------=_NextPart_000_001B_01C5DEFE.671228F0--


Re: Can't open Excel spreadsheet from within .Net web app on Windows XP by Paul

Paul
Wed Nov 02 11:12:21 CST 2005

On Tue, 1 Nov 2005 16:07:47 -0500, "Bill Youngman" <wyoungman@anexinet.com> wrote:

¤ Through Google and searching on 'oledb excel asp.net' I found a posting that detailed the 'unspecified error' that I am getting and it suggested two things -
¤
¤ - The first was to make sure that the directory where the file is located has the proper permissions - did that.
¤ - The second was to go to C:\Documents and Settings\machinename\ASPNET\Local Settings\Temp and make sure that the account that you are using for impersonation has permissions for this folder as well. Hadn't done that - but after I did I am now getting this 'Could not find installable ISAM' - I guess it's progress though.
¤

The ISAM error usually indicates that there is a syntax error in your connection string. Can you
post an example?


Paul
~~~~
Microsoft MVP (Visual Basic)