473,466 Members | 1,613 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

permission to File.Exists

Hi,

In my Web Application, I need to check whether a file exists. I'm using the
System.IO.File.Exists("filename") method.
This file is in another server.
Always the return's method is False. But through the windows explorer I have
permission to access it. So Can I do?

thanks a lot
Marcos Santos
Nov 18 '05 #1
1 1369
Most likely the default ASPNET user account does not have network security
privileges.
To test this theory, use impersonation to have the web application run under
your user account.
Here's more info:
http://msdn.microsoft.com/library/de...ersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Marcos MOS" <ma***********@softway.com.br> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,

In my Web Application, I need to check whether a file exists. I'm using the System.IO.File.Exists("filename") method.
This file is in another server.
Always the return's method is False. But through the windows explorer I have permission to access it. So Can I do?

thanks a lot
Marcos Santos

Nov 18 '05 #2

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

Similar topics

3
by: PenguinsAnonymous | last post by:
Need to access a single text file for read only where it resides using file(). To test the code I copied it local because I got "permission denied" message where it exists. Any safe solutions?...
2
by: Wanda | last post by:
Hi all, I have a permission denied error when I tried to copy a file from the local directory to another local directory by using the FSO (FileSystem) Set fso =...
3
by: fripper | last post by:
When testing a VB .Net application on my system (with IIS installed) I get an error message when using the fileopen function and the file does not exist ... i.e. I want fileopen to create the file....
1
by: Jody Gelowitz | last post by:
Exactly what is the size limit of Isolated Storage in the Internet permission set? I have a document indicating it is 10MB (http://msdn.microsoft.com/msdnmag/issues/02/07/NetSmartClients/) ...
12
by: Russ | last post by:
Hello. My new dev machine is running XP Pro. In the past all equipment has only used Windows 2000. I have had a lot of problems getting my projects up and running on the new machine. The current...
4
by: Brent Bigler | last post by:
The computer: W2K server, domain controller, Microsoft.Net Framework 1.1 ======================== The error message: Access to the path "c:\fanmail\newfiles" is denied .... Exception...
2
by: Jeremy | last post by:
I am writing a little appliation. One process I want to do is to copy a folder to a different location, delete the contents of the original folder, and fill the original location with new files....
4
by: Russell Warren | last post by:
I've been having a hard time tracking down a very intermittent problem where I get a "permission denied" error when trying to rename a file to something that has just been deleted (on win32). ...
4
by: Mukesh | last post by:
Hi all I am trying to upload and save as a picture to "root/Photos" folder in my web application. I am using this code to perform this task DirectoryInfo strFolder = new...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.