473,386 Members | 1,763 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,386 software developers and data experts.

remote file access in .net app

Hi,

My .NET application has a script that checks whether an image file on a
remote server exists using File.Exists.
From my localhost (Server A), I can access the image file via network

path (\\servername\foldername\image.jpg) or virtual directory
(../foldername/image.jpg) within my application.

When I moved the app to a test server (Server B), it still works fine.

However, when the same codebase is run on a pilot server (Server C), it
somehow returns false when File.Exists() is executed. Same target, same
code.

Server A, B, and C are all Windows 2003 and the remote server is
Windows 2000. The target directory has Everyone to have full
permission.

What factors can affect file access on a remote server? I tried playing
with IIS, file system, etc but couldn't figure out.

Let me know if any of you has any suggestion.

Thanks in advance!

Mar 2 '06 #1
3 2214
I assume \\servername is different to Server A, Server B, and Server C?

As a guess I would examine whether ASP.NET is running under the same user
account of each machine. On our Windows 2003 server I think ASP.NET runs
under the "NETWORK SERVICE" account and I'm not sure whether this can cross
network boundaries at all.

Secondly, you are using a network share \\servername\\foldername to access
the resource. What permissions have been assigned to the network share? I
have found this to be a common gotcha.

Kevin.

"Amie" <am*******@gmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hi,

My .NET application has a script that checks whether an image file on a
remote server exists using File.Exists.
From my localhost (Server A), I can access the image file via network

path (\\servername\foldername\image.jpg) or virtual directory
(../foldername/image.jpg) within my application.

When I moved the app to a test server (Server B), it still works fine.

However, when the same codebase is run on a pilot server (Server C), it
somehow returns false when File.Exists() is executed. Same target, same
code.

Server A, B, and C are all Windows 2003 and the remote server is
Windows 2000. The target directory has Everyone to have full
permission.

What factors can affect file access on a remote server? I tried playing
with IIS, file system, etc but couldn't figure out.

Let me know if any of you has any suggestion.

Thanks in advance!

Mar 2 '06 #2
Hi Kevin,

Thanks for the reply.

Yes, Server A, B, and C are web servers the app is running, and the
target server has images files. Sorry if I wasn't clear previously.

As I specified, "Everyone" has full access to the directory (intranet
network), so figured it wouldn't be necessary to add NETWORK SERVICE--
and they are on different boxes after all. I thought about adding
IUSR_[ServerCMachineName] in the target directory, but shouldn't
"Everyone" cover it all?

Very puzzling thing is it does work from two servers (my localhost and
test server), but just not from our pilot server.. There's gotta be
something different but can't figure out what. [sigh]

If you can think of anything at all, please let me know..! Thank you
again.

Amie

Mar 2 '06 #3
It turns out it had to do with IIS setting. The web server that did not
have access to the remote directory was running in IIS 5 isolation
mode. After making it run in IIS 6 native mode, it worked fine.

Mar 8 '06 #4

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

Similar topics

4
by: Rene' Nielsen | last post by:
Context: Running Windows 2003 Server on an intranet. A web is configured with an anonymous access account that is a domain account that has been granted the desired access to a file on another...
9
by: Heather | last post by:
I have created a database application consisting of a front end and backend file. Data entry and administration of the application are done at a central location. The next requirement is to be able...
5
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
3
by: Daniel | last post by:
Is it possible to retain local file system read, write, delete access while impersonating for access to a remote drive in a different domain? I need to be able to move files from a local computer...
1
by: POnfri | last post by:
Hi, I have a problem in a peace of code were i'm doing a file copy using File.Copy. The Source is local and the target is a remote machine. Example: File.Copy(C:\temp\hi.txt,...
2
by: Jeff | last post by:
I have an ASP.NET web page accessing a SQL database. I've used VS to build the app and stored it in the eNPTest02 directory of my localhost on my development machine. The database is on the web. ...
3
by: Nick | last post by:
Hello all, I've spent a lot of my time on this issue, and I thought it best to share my solution with the community. A special thanks to Willy Denoyette for his help. Ive opened about two...
4
by: Noy B | last post by:
Hi, I have developed a small application that is using a MSAccess DB. the problem is that it was developed on a machine where the application and the DB are both located. now it needs to be...
5
by: =?Utf-8?B?QWRyaWFuTW9ycmlz?= | last post by:
Hello! I'm trying to copy a file from another computer on the network that I do not have permission with my current logon details to access. If I open the folder using the Windows file manager...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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...

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.