Hi all,

I am trying to do what I thought would be a simple task: connect to a
foxpro database, that resides on another machine on our network,
through .Net.

I get the following error:

//windowsrv//f$//GSD//DEPO//L1//' is not a
valid path. Make sure that the path name is spelled correctly and that
you are connected to the server on which the file resides

Now this path is definitly a valid one.

The code is. i use connection string from web.config :

<add key="cnstr" value="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=//windowsrv//f$//GSD//DEPO//L1//;Extended Properties=dBASE III "/>

f is drive name,

Any ideas?

Dani AI

Generated

Short expert note: because the app runs fine from Visual Web Developer but fails under IIS, this is almost never a spelling problem — it’s an identity / access issue or an incorrect UNC format. ’s tweak (removing the dollar sign) won’t help when the IIS process simply can’t see or access that remote resource.

Quick diagnostic you can drop into a test page (runs under the IIS app pool) to confirm whether IIS can see the folder:

// on a simple ASPX page or handler run by the app pool
bool ok = System.IO.Directory.Exists(@"\\windowsrv\f$\GSD\DEPO\L1");
Response.Write(ok ? "Accessible" : "Not accessible");

If that prints “Not accessible”, do the following in order:

  • Use a proper UNC with backslashes (\server\share...) rather than the forward-slash style shown in the thread.
  • Avoid relying on a mapped drive letter — mappings are per-user and won’t exist for IIS.
  • Replace the admin share (f$) with a normal shared folder if possible; admin shares require administrative credentials.
  • Configure the application pool to run as a domain account (or otherwise grant the pool identity both Share and NTFS permissions on the remote folder). Grant both share and file-system rights — one without the other won’t work.
  • If you must use Jet/OLEDB, ensure the provider is available for the IIS process (Jet is 32-bit only on many systems — set “Enable 32-bit Applications” on the app pool or use the VFP OLE DB provider).

Caution: giving broad rights to admin shares is a security risk. Best practice is to create a dedicated share with minimal required permissions and run the app pool under a least-privilege domain account that has only those rights.

Recommended Answers

All 2 Replies

I believe your key should looks like below :

<add key="cnstr" value="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=//windowsrv//f//GSD//DEPO//L1//;Extended Properties=dBASE III; "/>

I have removed "$" sign and added ";" at the end.

Try it :-)

Thanks for reply.
but i have try ur suggetions and made changes and run application from the Visual Web Developer ,it cant found path, here f is remote drive.application is on local machine and database is on remote machine.
Let u know one thing that i posted error is come when i run application from iis,it run successfully when i run it from VWD.
i hope u understand what i want to say

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.