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

File.Delete() fails

why would File.Delete(\\machine1\c$\folder1\file1) fail with the following
exception:

"Access to the path \\machine1\c$\folder1\file1 is denied"
Nov 17 '05 #1
5 3780
What account is the application being run under?

"John Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:ej*************@TK2MSFTNGP14.phx.gbl...
why would File.Delete(\\machine1\c$\folder1\file1) fail with the following
exception:

"Access to the path \\machine1\c$\folder1\file1 is denied"

Nov 17 '05 #2
Not sure. How would I determine this for a .NET Console Application ?
"Brendan Green" <bg****@simtap.com.au> wrote in message
news:eM**************@TK2MSFTNGP15.phx.gbl...
What account is the application being run under?

"John Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:ej*************@TK2MSFTNGP14.phx.gbl...
why would File.Delete(\\machine1\c$\folder1\file1) fail with the
following exception:

"Access to the path \\machine1\c$\folder1\file1 is denied"


Nov 17 '05 #3
Not sure. How would I determine this for a .NET Console Application ?
"Brendan Green" <bg****@simtap.com.au> wrote in message
news:eM**************@TK2MSFTNGP15.phx.gbl...
What account is the application being run under?

"John Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:ej*************@TK2MSFTNGP14.phx.gbl...
why would File.Delete(\\machine1\c$\folder1\file1) fail with the
following exception:

"Access to the path \\machine1\c$\folder1\file1 is denied"


Nov 17 '05 #4

Running process user account should have full access in remote machine
For your case, you are using C$ which is admin share in the machine. S
you should have admin rights in the remote machine

--
prabhumuthaia
-----------------------------------------------------------------------
prabhumuthaiah's Profile: http://www.msusenet.com/member.php?userid=62
View this thread: http://www.msusenet.com/t-186943438

Nov 17 '05 #5
For testing, the remote machine is actually the development machine.

What could be causing the error ?
"prabhumuthaiah" <pr*******************@no-mx.msusenet.com> wrote in message
news:pr*******************@no-mx.msusenet.com...

Running process user account should have full access in remote machine.
For your case, you are using C$ which is admin share in the machine. So
you should have admin rights in the remote machine.
--
prabhumuthaiah
------------------------------------------------------------------------
prabhumuthaiah's Profile: http://www.msusenet.com/member.php?userid=624
View this thread: http://www.msusenet.com/t-1869434380

Nov 17 '05 #6

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

Similar topics

48
by: Joseph | last post by:
Hi I'm writing a commercial program which must be reliable. It has to do some basic reading and writing to and from files on the hard disk, and also to a floppy. I have foreseen a potential...
2
by: Justin | last post by:
Hi all, Does anybody know a way, in VB.Net, I can discover the file locks on a file on the local machine. I have an application which needs to delete specific files, but I would like to verify...
13
by: Bob Darlington | last post by:
I have a repair and backup database routine which runs when a user closes down my application. It works fine in my development machine, but breaks on a client's at the following line: If...
1
by: Matt Hamilton | last post by:
I have a simple image gallery where I want to allow users to delete files. The problem I have is that after an image is displayed in the browser, I am not able to delete the file because "The...
2
by: Roger Twomey | last post by:
I am working on a filewatcher application. The premis is: User uploads an xml file onto the web server the filewatcher app sees the xml file filewatcher app reads the file and inserts...
19
by: **Developer** | last post by:
When I get the image from the file the file remains locked so the Delete fails with a "used by another process" So I tried using a clone and disposing the obtained image. But that didn't fix...
5
by: wo20051223 | last post by:
Deleting some files with C# fails with "Access to the path 'X' is denied". I have files copied from a CD that I burned (and not locked by a process) and a text file that I created in Windows...
5
by: Hans Munich | last post by:
Szenario: User selects a XML File ("products.xml") to import newest Data. Data should replace Data in an existing Acess File which is connected via Dataadapter (daadaptFLR). Bevore the Existing...
6
by: sam_cit | last post by:
Hi Everyone, I'm using remove() function to delete a file, and i observed the following behavior, Concerned file : sample.txt Operation : i open the file in read mode and don't close the...
7
Curtis Rutland
by: Curtis Rutland | last post by:
Building A Silverlight (2.0) Multi-File Uploader All source code is C#. VB.NET source is coming soon. Note: This project requires Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 and...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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
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
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...
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...

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.