473,735 Members | 2,327 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5496
this may help

http://connectionstrings.com/

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

"z71mdridin " <z7********@gma il.comwrote in message
news:73******** *************** ***********@21g 2000hsj.googleg roups.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={Microso ft Visual FoxPro Driver};SourceT ype=DBF;SourceD B=\
\remoteServer\f oxPro\Data;Excl usive=No;
Collate=Machine ;NULL=NO;DELETE D=NO;BACKGROUND FETCH=NO;

but I still get the error message:
System.Data.Odb c.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...@gma il.comwrote in message

news:73******** *************** ***********@21g 2000hsj.googleg roups.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...@gma il.comwrote:
Yeah, I have already tried looking there. My connection string is as
follows:
Driver={Microso ft Visual FoxPro Driver};SourceT ype=DBF;SourceD B=\
\remoteServer\f oxPro\Data;Excl usive=No;
Collate=Machine ;NULL=NO;DELETE D=NO;BACKGROUND FETCH=NO;

but I still get the error message:
System.Data.Odb c.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...@gma il.comwrote in message
news:73******** *************** ***********@21g 2000hsj.googleg roups.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********@gma il.comwrote in message
news:4c******** *************** ***********@s19 g2000prg.google groups.com...
Anybody have any other suggestions?
On Jan 3, 2:49 pm, z71mdridin <z71mdri...@gma il.comwrote:
>Yeah, I have already tried looking there. My connection string is as
follows:
Driver={Micros oft Visual FoxPro Driver};SourceT ype=DBF;SourceD B=\
\remoteServer\ foxPro\Data;Exc lusive=No;
Collate=Machin e;NULL=NO;DELET ED=NO;BACKGROUN DFETCH=NO;

but I still get the error message:
System.Data.Od bc.OdbcExceptio n: 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...@gma il.comwrote in message
>news:73******* *************** ************@21 g2000hsj.google groups.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.Od bc.OdbcExceptio n: 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********@gma il.comwrote in message
news:27******** *************** ***********@s12 g2000prg.google groups.com...
Yeah, I have already tried looking there. My connection string is as
follows:
Driver={Microso ft Visual FoxPro Driver};SourceT ype=DBF;SourceD B=\
\remoteServer\f oxPro\Data;Excl usive=No;
Collate=Machine ;NULL=NO;DELETE D=NO;BACKGROUND FETCH=NO;

but I still get the error message:
System.Data.Odb c.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...@gma il.comwrote in message

news:73******* *************** ************@21 g2000hsj.google groups.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.comwrot e:
re:
!My connection string is as follows:
...snip...
!but I still get the error message:
!System.Data.Od bc.OdbcExceptio n: 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/
=============== =============== ========"z71mdr idin" <z71mdri...@gma il.comwrote in message

news:27******** *************** ***********@s12 g2000prg.google groups.com...
Yeah, I have already tried looking there. My connection string is as
follows:
Driver={Microso ft Visual FoxPro Driver};SourceT ype=DBF;SourceD B=\
\remoteServer\f oxPro\Data;Excl usive=No;
Collate=Machine ;NULL=NO;DELETE D=NO;BACKGROUND FETCH=NO;
but I still get the error message:
System.Data.Odb c.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...@gma il.comwrote in message
>news:73******* *************** ************@21 g2000hsj.google groups.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********@gma il.comwrote in message
news:9a******** *************** ***********@n20 g2000hsh.google groups.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.comwrot e:
re:
!My connection string is as follows:
...snip...
!but I still get the error message:
!System.Data.Od bc.OdbcExceptio n: 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/
=============== =============== ========"z71mdr idin" <z71mdri...@gma il.comwrote in message

news:27******** *************** ***********@s12 g2000prg.google groups.com...
Yeah, I have already tried looking there. My connection string is as
follows:
Driver={Microso ft Visual FoxPro Driver};SourceT ype=DBF;SourceD B=\
\remoteServer\f oxPro\Data;Excl usive=No;
Collate=Machine ;NULL=NO;DELETE D=NO;BACKGROUND FETCH=NO;
but I still get the error message:
System.Data.Odb c.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...@gma il.comwrote in message
>news:73******* *************** ************@21 g2000hsj.google groups.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
13348
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 and disadvantages of both programs. Many Thanks Simon
2
6601
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 have been doing my development work in A97 but the folks have AXP at their site. As near as I can tell, the FoxPro driver has been discarded from A97 and replaced with ODBC in A2K onward
4
3363
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
1860
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. I've installed the SQL Server developer edition locally and do have a pubs database. The connection I'm attempting is the following: SqlConnection objConnection =
2
1292
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 other. I have not done this before but have a few assesments on how to do it.
3
2502
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 in the table. I am now using VB.NET to run this abc.PRG file through VB.net environment. (Equivalent method to perform same as "DO abc.prg" command in foxpro). My code for this is as below. This code runs on click of a button in Vb.net.: Dim Fox...
3
1307
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. Here is the connection string SourceDB=c:\Documents and Settings\bgunay\My
2
2168
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 fill a datable with the resultset. All is fine when I run the executable from my machine. However, when our test user runsthe same executable, the app errors out when attempting to read from the foxpro table. I have logged where the user...
3
1873
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 linking to some FoxPro files last week. I can do so on 1 table now because it has a unique field...but has no index. The table opens like its on downers, staggering under the brunt of displaying 1000 records.
0
8958
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9248
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6045
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4555
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4821
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3269
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2186
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.