473,418 Members | 2,101 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,418 software developers and data experts.

Invalid path or file name.

I have a major problem with trying to access a foxpro database from a web app.

I have created a web app which is deployed on a server. The foxpro database
(dbf) is on a different server. The access to the database is a shared path.

I hace tried everything the only options that seem to work ON THE WEB SERVER
ONLY is if I set the impersonate to true in the web.config file. This is fine
and works if I access the page using ie on the webserver BUT it fails with
the error "Invalid path or file name." when I try and access the page from
anyother machine.

It appears to be security issue. If I add a username and password (which I
do not want to do) in the web.config then I can access the shared database.

Please help.

Nov 19 '05 #1
1 3001
Hi Saracen,

Thanks for your posting. From your description, you have a db file on a
remote machine which is exposed as a UNC shared, and you will access this
file in your asp.net application on another server. But you found the
accessing will faild unless you impersonate the asp.net under a DOMAIN
account, yes?

As for this problem, it's a normal security issue when acessing remote
resource in asp.net. When accessing a remote resource we need to let the
asp.net run under a certain account which is valid to the remote machine(
recognizable). What's your asp.net server's version? WIN2K (XP) OR
WIN2003? If it's a 2003 version, since the asp.net's default process
identity is NT AUTHORITY\NETWORKSERVICE which represent the server's domain
machine account (like domainName\machineName$) , so you can just grant the
access permission of the UNC shared folder (on the remote machine) to the
asp.net server's domainMachine account( domainName\machineName$).

If the asp.net server is not 2003, the default process account is a local
account named MACHINE\ASPNET which is not remotable so that the remote
access will fail. To workaround this , one means is just what you've
tried------- use a domain account to run(impersonate) the asp.net
application.
If you don't want to use domain account, you can also create two duplicated
local account(have the same username password) on both the two machines.
Then, let the asp.net run under that local account , when accessing the
remote machine, this account can be valid to the remote machine.
If there is anything unclear, please feel free to post here.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #2

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

Similar topics

8
by: Glenn A. Harlan | last post by:
Why am I receiving the below error when calling - Path.GetTempFileName() The directory name is invalid. Description: An unhandled exception occurred during the execution of the current web...
1
by: tascien | last post by:
This code is NOT working. Well, the error is saying that the path is invalid. But how... Before i open the connection, i am doing, if f.Exists(file) then. so, if that returns true, why the...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
21
by: John Howard | last post by:
Making the following call to a local MSAccess database works fine: Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) Dim intRows As Integer Dim strSQL As String Dim ds As New...
9
by: MR | last post by:
I get the following Exception "The data at the root level is invalid. Line 1, position 642" whenever I try to deserialize an incoming SOAP message. The incoming message is formed well and its...
3
by: Anders Jansson | last post by:
Hi all. I have 2 problems when I try to open and convert an ASP.NET VS 2003 web-applikation in VS 2005. In VS 2003 I have no problems at all! First: One subfolder with will not be converted!...
0
by: Brian | last post by:
I've deployed a 'URL rewriter' version of our application almost two months ago and it is working great (.NET 1.1, Win2k, IIS5). Since then, I've gotten just FOUR exceptions that look like this: ...
2
by: js | last post by:
I got this error when I moved my application to a new Windows 2003 server. I installed and recompiled the 'Microsoft.Practices.EnterpriseLibrary - June 2005" then added these assemblies to the...
0
by: shrik | last post by:
I have following error : Total giant files in replay configuration file are : File name : /new_file/prob1.rec Given file /new_file/prob1.rec is successfully verified. Splitting for giant file...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.