473,832 Members | 2,309 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Service and folder polling

I am trying to write a service that will send out emails whenever a file
hits a folder.

I know that email services do it. Is there a way to do this without
constantly reading the folder to see when a file is put into it?

I just want to be notified by an event that something has been put into a
folder.

Thanks,

Tom
Nov 17 '05 #1
3 2410
"tshad" <tf*@dslextreme .com> wrote in message
news:eS******** *****@tk2msftng p13.phx.gbl...
I am trying to write a service that will send out emails whenever a file
hits a folder.

I know that email services do it. Is there a way to do this without
constantly reading the folder to see when a file is put into it?

I just want to be notified by an event that something has been put into a
folder.

Thanks,

Tom


System.IO.FileS ystemWatcher can be used to recieve events when a file is
created in a folder. You could then use the classes in System.Web.Mail to
send an email notification when an event is raised.

CVD
Nov 17 '05 #2
"Cletus Van Damme" <cl****@iforgot .com> wrote in message
news:u2******** ******@TK2MSFTN GP12.phx.gbl...
"tshad" <tf*@dslextreme .com> wrote in message
news:eS******** *****@tk2msftng p13.phx.gbl...
I am trying to write a service that will send out emails whenever a file
hits a folder.

I know that email services do it. Is there a way to do this without
constantly reading the folder to see when a file is put into it?

I just want to be notified by an event that something has been put into a folder.

Thanks,

Tom
System.IO.FileS ystemWatcher can be used to recieve events when a file is
created in a folder. You could then use the classes in System.Web.Mail to
send an email notification when an event is raised.

I just found a program on the web that does uses the Folder Watcher and it
was exactly what I was looking for and works great.

Can I still use System.Web.Mail from a normal Application or Windows
Service?

I was a little curious about that.

Thanks,

Tom
CVD

Nov 17 '05 #3
"tshad" <tf*@dslextreme .com> wrote in message
news:eC******** ******@TK2MSFTN GP09.phx.gbl...
"Cletus Van Damme" <cl****@iforgot .com> wrote in message
news:u2******** ******@TK2MSFTN GP12.phx.gbl...
"tshad" <tf*@dslextreme .com> wrote in message
news:eS******** *****@tk2msftng p13.phx.gbl...
>I am trying to write a service that will send out emails whenever a file
> hits a folder.
>
> I know that email services do it. Is there a way to do this without
> constantly reading the folder to see when a file is put into it?
>
> I just want to be notified by an event that something has been put into a > folder.
>
> Thanks,
>
> Tom
>
>


System.IO.FileS ystemWatcher can be used to recieve events when a file is
created in a folder. You could then use the classes in System.Web.Mail
to
send an email notification when an event is raised.

I just found a program on the web that does uses the Folder Watcher and it
was exactly what I was looking for and works great.

Can I still use System.Web.Mail from a normal Application or Windows
Service?

I was a little curious about that.

Thanks,

Tom
CVD


Yes, you sure can, just add a reference to System.Web.dll.

CVD
Nov 17 '05 #4

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

Similar topics

3
2522
by: ray | last post by:
Hi, I just wrote a windows service application to call a function of another object periodically. I used System.Server.Timer and I found that it works fine within the first 2 hours but the onTimer event wouldn't be raised again after few hours. I checked the msdn and Microsoft claims that it is a bug in their .net framework as follows: http://support.microsoft.com/default.aspx?scid=kb;en-us;842793
5
1643
by: Wally | last post by:
Hi Hi need to monitoring my windows service written in VB NET. How can my monitor application "feel" that my service has made something? Is the only way a polling (for example on a Db table)? Can't service generate events into monitor application? Where can I retrieve examples about monitoring windows services? Thank in advance and... sorry for my english, but I'm Italian! :-)
5
5041
by: Belsam | last post by:
Hi all I need to create a windows service that will wait for a file to be copied somewhere, write it to the database, and then move the file to a storage area. I don't know when the file will come in, so I think I need a service vs using task scheduler. Am I correct? If yes, can someone help with how to do this? So far
1
2496
by: Alex | last post by:
Hi, Apologies if this not quite the right forum, but I am looking for ideas/method of polling a webservice with different parameter values at different times, the schedule for polling the webservice is coming from a database. My initial idea is to run a windows service getting the schedule(s) from a db but how do I keep track of possible multiple timer events on a daily basis from within the windows service. Should I be using MSMQ or...
7
1227
by: TClancey | last post by:
Hi all. I hope someone can give me a few pointers on 'best practice' for an app I'm about to start. I'm writing a small and simple label design application, users will define text fields on the label in a GUI, some data may come from a database. The application will be able to connect to any standard database in time, but for the time being it's access. I will need to 'bolt' this application into many other applications as time
0
1128
by: pdube | last post by:
I have been trying for a few weeks to have a service that calls a COM in .NET I made a service in .NET following simple instructions I found on the web. It worked fine. Then I needed to make a call to my COM object, which is compiled in VB.NET and it just does not work. I found out it fails at the CreateObject, and I just can't find why. If I call a COM object I had made in VB6 it works fine. If I call my COM in VB.NET from an ASP...
0
759
by: Rico | last post by:
Hello, I'm new to windows services and I am currently creating one out of a VB.net process that I created. The main this this process does is poll a folder on the network for new files, translate those files into a format that another software can read (as long as all the attributes match those in the SQL Server database) and deposit the translated file into another folder. Using the interface, I have used DynamicProperties using the...
1
1353
by: CraigMuckleston | last post by:
I have built a windows service that should check whether a page can be returned from a site (from various servers). If not, it logs to the Application Error log. My trouble is this. It runs once, but doesn't seem to loop at all, ie, I only get the 1 round of warning messages (it also sends me a net message, but that will be removed eventually). My code for the whole service is below: Imports System Imports System.IO Imports System.Net...
9
8622
by: mohitkumar | last post by:
Hello All, We have 3 windows services written in C#. We use them to process files from a folder into database and further to process the data into various SQL Tables. All the services hang atleast once in a week stopping the entire process. The files are queued up in the folders waiting to be processed. The services in the Service Control Manager seems to be running but they do not process any files. But when the processes are...
0
9642
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10497
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10539
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7753
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5788
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4420
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 we have to send another system
2
3968
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3077
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.