473,395 Members | 1,641 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.

Headaches with UNC and FileSystemWatcher

Hello all.

I've created a FileSystemWatcher (ASP.Net w/VB.Net code
behind pages) that is to reside on Server A and monitor
the activity of folder on Server B.

The application works fine with watcher.path set to C:\.
However, when I specify any other drive for the
watcher.path, I receive an error message telling me the
selected path is invalid.

On my local machine Server B is mapped as W:\. I've tried
using the physical path as in watcher.path = "W:\RFTest",
as well as attempting to use the URL. All attempts result
in the same tired error message.

Any assistance will be greatly appreciated.

Thanks!

Brian.
Jul 21 '05 #1
1 4262
Using mapped drives will not work, since they are only
mapped for the currently logged on user. Because your
application is an ASP.NET application, it (the ASP.NET
worker process)Y runs under the credentials of
<localmachine>\ASPNET (Windows 2000) or
<localmachine>\NETWORK SERVICE (Windows Server 2003).
These are not the credentials with which you logged on.

The monitors works on C:\ because the account used by
ASP.NET has enough access rights on C:\ (which could be
considered as a security issue though...). The reason it
won't work on your file share, is that the ASP.NET account
doesn't have privileges on the remote server's share.

You can try to run your ASP.NET applications under
different credentials (change required to machine.config)
or you can use impersonation to get the necessary
privileges to connect to the file share.
-----Original Message-----
Hello all.

I've created a FileSystemWatcher (ASP.Net w/VB.Net code
behind pages) that is to reside on Server A and monitor
the activity of folder on Server B.

The application works fine with watcher.path set to C:\.
However, when I specify any other drive for the
watcher.path, I receive an error message telling me the
selected path is invalid.

On my local machine Server B is mapped as W:\. I've tried
using the physical path as in watcher.path = "W:\RFTest",
as well as attempting to use the URL. All attempts result
in the same tired error message.

Any assistance will be greatly appreciated.

Thanks!

Brian.
.

Jul 21 '05 #2

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

Similar topics

0
by: Brian | last post by:
Hello all. I've created a FileSystemWatcher that is to reside on Server A and monitor the activity of folder on Server B. The application works fine with watcher.path set to C:\. However,...
1
by: Troy Murphy | last post by:
How do I prevent the FileSystemWatcher event to keep firing while the file is being created? When copying a file to the watched folder, the event fires a dozen or more times! Also, the...
7
by: Allen Anderson | last post by:
I'm trying to figure out a way to catch when a file has been written to a directory. I currently have it where I can catch when the file begins writing, but this isn't helpful as I need to know...
13
by: David | last post by:
I have been working on trying to write a directory watcher service. One of the requirments is that it be able to watch multiple directories, not sub directories of one parent directory, but just...
3
by: Stampede | last post by:
Hi, I want to use the FileSystemWatcher in a Windows Service. I read an article, where the author created the FileSystemWatcher object in a seperate thread and when the event is fired, he started...
20
by: J-T | last post by:
We are working on an asp.net application which is a 3-tier application.I was aksed to create a component which monitors a folder and gets the file and pass them to a class library in our business...
1
by: brian | last post by:
Hello all. I've created a FileSystemWatcher (ASP.Net w/VB.Net code behind pages) that is to reside on Server A and monitor the activity of folder on Server B. The application works fine with...
12
by: ljh | last post by:
Has anyone else noticed that the FileSystemWatcher raises the changed event twice when a file is changed? Do you have any idea why this is the case?
5
by: =?Utf-8?B?Sm9obiBT?= | last post by:
I am trying to find out if there is a way to tell if there is already a filesystemwatcher (created by a webservice) monitoring a folder. I have a webservice that creates a filesystemwatcher,...
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:
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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.