473,326 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Connecting to FoxPro from .NET

I have an asp.net website that uses Form authentication to
authenticate users. I need to provide users with a report based on
FoxPro data that resides on a remote server. When I attempt to
connect to the Foxpro directory by using the ODBC DSN that we
currently use in ColdFusion, I get the following message:

ERROR [42S02] [Microsoft][ODBC Visual FoxPro Driver]File 'table.dbf'
does not exist.

I know this is probably a permissions issue because asp.net is being
run under a local username. I don't want to have to setup the aspnet
username on the remote server and manually manage passwords, and I
don't want to set up all web users names on the remote server.
I already have a specific user 'webuser' that has access rights to
both the webserver and the foxpro remote directory and would like to
make use of this existing user to connect from .NET.

Is there a way to connect to this FoxPro directory by specifying a
username password with the connection string?
Jan 3 '08 #1
7 5454
this may help

http://connectionstrings.com/

http://connectionstrings.com/?carrier=visualfoxpro

"z71mdridin" <z7********@gmail.comwrote in message
news:73**********************************@21g2000h sj.googlegroups.com...
>I have an asp.net website that uses Form authentication to
authenticate users. I need to provide users with a report based on
FoxPro data that resides on a remote server. When I attempt to
connect to the Foxpro directory by using the ODBC DSN that we
currently use in ColdFusion, I get the following message:

ERROR [42S02] [Microsoft][ODBC Visual FoxPro Driver]File 'table.dbf'
does not exist.

I know this is probably a permissions issue because asp.net is being
run under a local username. I don't want to have to setup the aspnet
username on the remote server and manually manage passwords, and I
don't want to set up all web users names on the remote server.
I already have a specific user 'webuser' that has access rights to
both the webserver and the foxpro remote directory and would like to
make use of this existing user to connect from .NET.

Is there a way to connect to this FoxPro directory by specifying a
username password with the connection string?

Jan 3 '08 #2
Yeah, I have already tried looking there. My connection string is as
follows:
Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=\
\remoteServer\foxPro\Data;Exclusive=No;
Collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH =NO;

but I still get the error message:
System.Data.Odbc.OdbcException: ERROR [42S02] [Microsoft][ODBC Visual
FoxPro Driver]File 'table.dbf' does not exist.

On Jan 3, 2:27 pm, "Mike" <igotyourdot...@gmail.comwrote:
this may help

http://connectionstrings.com/

http://connectionstrings.com/?carrier=visualfoxpro

"z71mdridin" <z71mdri...@gmail.comwrote in message

news:73**********************************@21g2000h sj.googlegroups.com...
I have an asp.net website that uses Form authentication to
authenticate users. I need to provide users with a report based on
FoxPro data that resides on a remote server. When I attempt to
connect to the Foxpro directory by using the ODBC DSN that we
currently use in ColdFusion, I get the following message:
ERROR [42S02] [Microsoft][ODBC Visual FoxPro Driver]File 'table.dbf'
does not exist.
I know this is probably a permissions issue because asp.net is being
run under a local username. I don't want to have to setup the aspnet
username on the remote server and manually manage passwords, and I
don't want to set up all web users names on the remote server.
I already have a specific user 'webuser' that has access rights to
both the webserver and the foxpro remote directory and would like to
make use of this existing user to connect from .NET.
Is there a way to connect to this FoxPro directory by specifying a
username password with the connection string?
Jan 3 '08 #3
Anybody have any other suggestions?
On Jan 3, 2:49 pm, z71mdridin <z71mdri...@gmail.comwrote:
Yeah, I have already tried looking there. My connection string is as
follows:
Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=\
\remoteServer\foxPro\Data;Exclusive=No;
Collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH =NO;

but I still get the error message:
System.Data.Odbc.OdbcException: ERROR [42S02] [Microsoft][ODBC Visual
FoxPro Driver]File 'table.dbf' does not exist.

On Jan 3, 2:27 pm, "Mike" <igotyourdot...@gmail.comwrote:
this may help
http://connectionstrings.com/
http://connectionstrings.com/?carrier=visualfoxpro
"z71mdridin" <z71mdri...@gmail.comwrote in message
news:73**********************************@21g2000h sj.googlegroups.com...
>I have an asp.net website that uses Form authentication to
authenticate users. I need to provide users with a report based on
FoxPro data that resides on a remote server. When I attempt to
connect to the Foxpro directory by using the ODBC DSN that we
currently use in ColdFusion, I get the following message:
ERROR [42S02] [Microsoft][ODBC Visual FoxPro Driver]File 'table.dbf'
does not exist.
I know this is probably a permissions issue because asp.net is being
run under a local username. I don't want to have to setup the aspnet
username on the remote server and manually manage passwords, and I
don't want to set up all web users names on the remote server.
I already have a specific user 'webuser' that has access rights to
both the webserver and the foxpro remote directory and would like to
make use of this existing user to connect from .NET.
Is there a way to connect to this FoxPro directory by specifying a
username password with the connection string?
Jan 4 '08 #4
Does your table 'table.dbf' exist? Did you give your ID or ASPNET ID
permission to the FoxPro database?
"z71mdridin" <z7********@gmail.comwrote in message
news:4c**********************************@s19g2000 prg.googlegroups.com...
Anybody have any other suggestions?
On Jan 3, 2:49 pm, z71mdridin <z71mdri...@gmail.comwrote:
>Yeah, I have already tried looking there. My connection string is as
follows:
Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=\
\remoteServer\foxPro\Data;Exclusive=No;
Collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETC H=NO;

but I still get the error message:
System.Data.Odbc.OdbcException: ERROR [42S02] [Microsoft][ODBC Visual
FoxPro Driver]File 'table.dbf' does not exist.

On Jan 3, 2:27 pm, "Mike" <igotyourdot...@gmail.comwrote:
this may help
>http://connectionstrings.com/
>http://connectionstrings.com/?carrier=visualfoxpro
"z71mdridin" <z71mdri...@gmail.comwrote in message
>news:73**********************************@21g2000 hsj.googlegroups.com...
>I have an asp.net website that uses Form authentication to
authenticate users. I need to provide users with a report based on
FoxPro data that resides on a remote server. When I attempt to
connect to the Foxpro directory by using the ODBC DSN that we
currently use in ColdFusion, I get the following message:
ERROR [42S02] [Microsoft][ODBC Visual FoxPro Driver]File 'table.dbf'
does not exist.
I know this is probably a permissions issue because asp.net is being
run under a local username. I don't want to have to setup the aspnet
username on the remote server and manually manage passwords, and I
don't want to set up all web users names on the remote server.
I already have a specific user 'webuser' that has access rights to
both the webserver and the foxpro remote directory and would like to
make use of this existing user to connect from .NET.
Is there a way to connect to this FoxPro directory by specifying a
username password with the connection string?

Jan 4 '08 #5
re:
!My connection string is as follows:
....snip...
!but I still get the error message:
!System.Data.Odbc.OdbcException: ERROR [42S02] [Microsoft][ODBC Visual
!FoxPro Driver]File 'table.dbf' does not exist

That's a permissions problem.

You are accessing "table.dbf" at a remote server, but the account ASP.NET
uses to access the file doesn't have access permissions to "table.dbf".

You need to have ASP.NET impersonate a network account which
has the necessary permissions to access the "table.dbf" resource.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"z71mdridin" <z7********@gmail.comwrote in message
news:27**********************************@s12g2000 prg.googlegroups.com...
Yeah, I have already tried looking there. My connection string is as
follows:
Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=\
\remoteServer\foxPro\Data;Exclusive=No;
Collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH =NO;

but I still get the error message:
System.Data.Odbc.OdbcException: ERROR [42S02] [Microsoft][ODBC Visual
FoxPro Driver]File 'table.dbf' does not exist.

On Jan 3, 2:27 pm, "Mike" <igotyourdot...@gmail.comwrote:
>this may help

http://connectionstrings.com/

http://connectionstrings.com/?carrier=visualfoxpro

"z71mdridin" <z71mdri...@gmail.comwrote in message

news:73**********************************@21g2000 hsj.googlegroups.com...
>I have an asp.net website that uses Form authentication to
authenticate users. I need to provide users with a report based on
FoxPro data that resides on a remote server. When I attempt to
connect to the Foxpro directory by using the ODBC DSN that we
currently use in ColdFusion, I get the following message:
ERROR [42S02] [Microsoft][ODBC Visual FoxPro Driver]File 'table.dbf'
does not exist.
I know this is probably a permissions issue because asp.net is being
run under a local username. I don't want to have to setup the aspnet
username on the remote server and manually manage passwords, and I
don't want to set up all web users names on the remote server.
I already have a specific user 'webuser' that has access rights to
both the webserver and the foxpro remote directory and would like to
make use of this existing user to connect from .NET.
Is there a way to connect to this FoxPro directory by specifying a
username password with the connection string?

Jan 4 '08 #6
I understand that this is a permissions issue. I am just trying to
figure out how to solve the problem. As mentioned before, I dont want
to create the ASPNET account on the remote server and manually manage
the passwords for the account. I already have an account, "webuser",
setup on both servers that I would like to reuse for this particular
instance. I am just trying to figure out how to accomplish this. Is
is possible to include some keyword in the connection string to
force .net to connect to the foxpro directory as webuser instead of
aspnet? Is impersonation possible even though I am using forms
authentication throughout the rest of the site?

Thanks for all the feedback so far
On Jan 4, 9:56 am, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
re:
!My connection string is as follows:
...snip...
!but I still get the error message:
!System.Data.Odbc.OdbcException: ERROR [42S02] [Microsoft][ODBC Visual
!FoxPro Driver]File 'table.dbf' does not exist

That's a permissions problem.

You are accessing "table.dbf" at a remote server, but the account ASP.NET
uses to access the file doesn't have access permissions to "table.dbf".

You need to have ASP.NET impersonate a network account which
has the necessary permissions to access the "table.dbf" resource.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
======================================"z71mdridin" <z71mdri...@gmail.comwrote in message

news:27**********************************@s12g2000 prg.googlegroups.com...
Yeah, I have already tried looking there. My connection string is as
follows:
Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=\
\remoteServer\foxPro\Data;Exclusive=No;
Collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH =NO;
but I still get the error message:
System.Data.Odbc.OdbcException: ERROR [42S02] [Microsoft][ODBC Visual
FoxPro Driver]File 'table.dbf' does not exist.
On Jan 3, 2:27 pm, "Mike" <igotyourdot...@gmail.comwrote:
this may help
>http://connectionstrings.com/
>http://connectionstrings.com/?carrier=visualfoxpro
"z71mdridin" <z71mdri...@gmail.comwrote in message
>news:73**********************************@21g2000 hsj.googlegroups.com...
I have an asp.net website that uses Form authentication to
authenticate users. I need to provide users with a report based on
FoxPro data that resides on a remote server. When I attempt to
connect to the Foxpro directory by using the ODBC DSN that we
currently use in ColdFusion, I get the following message:
ERROR [42S02] [Microsoft][ODBC Visual FoxPro Driver]File 'table.dbf'
does not exist.
I know this is probably a permissions issue because asp.net is being
run under a local username. I don't want to have to setup the aspnet
username on the remote server and manually manage passwords, and I
don't want to set up all web users names on the remote server.
I already have a specific user 'webuser' that has access rights to
both the webserver and the foxpro remote directory and would like to
make use of this existing user to connect from .NET.
Is there a way to connect to this FoxPro directory by specifying a
username password with the connection string?
Jan 4 '08 #7
One more thing...

Fellow MVP Rick Strahl has written "Web Connection" :

http://www.west-wind.com/webconnection/

It allows you to connect Web Applications to Visual FoxPro with minimum fuss/problems.

If you are committed to Visual FoxPro as a database platform,
you can't do any better than what Rick has written for "Web Connection".

You get full FoxPro source code to learn from/modify as you like.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"z71mdridin" <z7********@gmail.comwrote in message
news:9a**********************************@n20g2000 hsh.googlegroups.com...
I understand that this is a permissions issue. I am just trying to
figure out how to solve the problem. As mentioned before, I dont want
to create the ASPNET account on the remote server and manually manage
the passwords for the account. I already have an account, "webuser",
setup on both servers that I would like to reuse for this particular
instance. I am just trying to figure out how to accomplish this. Is
is possible to include some keyword in the connection string to
force .net to connect to the foxpro directory as webuser instead of
aspnet? Is impersonation possible even though I am using forms
authentication throughout the rest of the site?

Thanks for all the feedback so far
On Jan 4, 9:56 am, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
re:
!My connection string is as follows:
...snip...
!but I still get the error message:
!System.Data.Odbc.OdbcException: ERROR [42S02] [Microsoft][ODBC Visual
!FoxPro Driver]File 'table.dbf' does not exist

That's a permissions problem.

You are accessing "table.dbf" at a remote server, but the account ASP.NET
uses to access the file doesn't have access permissions to "table.dbf".

You need to have ASP.NET impersonate a network account which
has the necessary permissions to access the "table.dbf" resource.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
======================================"z71mdridin" <z71mdri...@gmail.comwrote in message

news:27**********************************@s12g2000 prg.googlegroups.com...
Yeah, I have already tried looking there. My connection string is as
follows:
Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=\
\remoteServer\foxPro\Data;Exclusive=No;
Collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH =NO;
but I still get the error message:
System.Data.Odbc.OdbcException: ERROR [42S02] [Microsoft][ODBC Visual
FoxPro Driver]File 'table.dbf' does not exist.
On Jan 3, 2:27 pm, "Mike" <igotyourdot...@gmail.comwrote:
this may help
>http://connectionstrings.com/
>http://connectionstrings.com/?carrier=visualfoxpro
"z71mdridin" <z71mdri...@gmail.comwrote in message
>news:73**********************************@21g2000 hsj.googlegroups.com...
I have an asp.net website that uses Form authentication to
authenticate users. I need to provide users with a report based on
FoxPro data that resides on a remote server. When I attempt to
connect to the Foxpro directory by using the ODBC DSN that we
currently use in ColdFusion, I get the following message:
ERROR [42S02] [Microsoft][ODBC Visual FoxPro Driver]File 'table.dbf'
does not exist.
I know this is probably a permissions issue because asp.net is being
run under a local username. I don't want to have to setup the aspnet
username on the remote server and manually manage passwords, and I
don't want to set up all web users names on the remote server.
I already have a specific user 'webuser' that has access rights to
both the webserver and the foxpro remote directory and would like to
make use of this existing user to connect from .NET.
Is there a way to connect to this FoxPro directory by specifying a
username password with the connection string?

Jan 4 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Simon Bailey | last post by:
I am a newcomer to databases and am not sure which DBMS to use. I have a very simplified knowledge of databases overall. I would very much appreciate a (simplifed) message explaining the advantages...
2
by: Salad | last post by:
OS = WinXP & Win98. Access = A97 & AXP Q1) Where can I find the VFP ODBC driver at Microsoft. I have been working developing an app in Access that will link to some DOS FoxPro tables. I...
4
by: Salad | last post by:
When I connect to FoxPro tables it takes about 1 1/2 minutes to view the records in a small table. Is this normal ODBC behavior?
14
by: John Spiegel | last post by:
Hi all, I'm missing something, probably stupid, on connecting to a SQL Server database from an aspx file. I haven't really done much w/ SQL Server and suspect that it's a problem on that side. ...
2
by: Edb | last post by:
Hi Everyone, I need to build an ASP.Net project that wraps around a FoxPro Database. It appears that I need to create an ODBC Connection to .dbf files. Some of them have relations to each...
3
by: Amar | last post by:
I have a abc.PRG file in visual foxpro 8.0. I can run this file using visual foxpro environment and it creates a table X.dbf in the same folder where this program file is and populates some data...
3
by: Burak Gunay | last post by:
Hello, I am trying to connect to a visual fox pro table from my asp.net page. I dragged an odbc connection and set it to a visual fox pro driver file dsn pointing to "mydocuments" folder. ...
2
by: Toco | last post by:
Hello. I have app written in C# that we are testing. The executable is shared on our network. The method we are testing is a call to a foxpro table. The call is made to query the table, then...
3
by: Salad | last post by:
Is it the rule that any table that you want to use via ODBC must be a UNIQUE record? And if you want any speed associated with the table it should be indexed? I was having some difficulty...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.