Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

Eric Madariaga's Blog

Building ASP.NET solutions with reusable software components

  • Free Google WiFi

    Looks like Google is getting ready to announce free WiFi access (http://wifi.google.com/faq.html). Very Cool.

    It looks like it will only be available in the San Francisco area initially.  I wonder how long until they make it to Raleigh/Durham NC :)

     

    Sponsor
  • Google Talk

    Google has released Google Talk (Beta) - http://www.google.com/talk/

    I am very excited to see that Google has released their communications platform on open Internet standards.  Currently Google Talk is based on Jabber / XMPP, an XML based messaging protocol.  According to their website, support for SIP will be available in the near future as well.

    Open standards mean a lot of new possibilities for software developers interested in integrating IM and VOIP capabilities. 

    Sponsor
  • Using the FileSystemWatcher from ASP.NET

    A recent ASP.NET project that I am working on requires that the web application monitor a directory for new files, and if new files are found, process them in some way. 

    Unfortunately the application is not accessed through its web interface very often and as a result it cannot poll the directory when pages are requested, sessions are created, etc. The web interface is actually used mostly for configuration of the application.

    We have decided to keep a FileSystemWatcher object alive by adding it to the ASP.NET application object. In the global.asax we do the following:

    private FileSystemWatcher fsw;
    
    protected void Application_Start(Object sender, EventArgs e)
    {
    	string monitorPath = this.Context.Server.MapPath("incomming/");
    
    	Application.Add("watcher", new System.IO.FileSystemWatcher(monitorPath));
    	fsw  = (FileSystemWatcher)Application["watcher"];
    	fsw.EnableRaisingEvents = true;
    	fsw.IncludeSubdirectories = false;
    
    	fsw.Changed += new System.IO.FileSystemEventHandler(fsw_Changed);
    	fsw.Created += new System.IO.FileSystemEventHandler(fsw_Created);
    }


    This seems to work so far.  Whenever a new file is dropped into the incoming/ directory, the FileSystemWatcher events fire and we are able to process incoming files.

    A colleague of mine said that he tried this on another web application and that events from the FileSystemWatcher stopped firing at some point. Has anyone run into any problems using the FileSystemWatcher this way from an ASP.NET application?

    Sponsor
  • Introduction

    Finally.  After years of finding help in blog entries and online articles I am finally able to get out in the community and try to give back.

     

    A little background on who I am - I have been working at /n software since 1999 marketing, supporting, evangelizing, and writing code where needed. If nothing else, my experience with Internet protocols and technologies has made me a master with acronyms.

     

    While /n software works with many development technologies from Java to COM, I work primarily with C# on web development projects. I am forced to occasionally switch gears and write code for Delphi, VB6, or classic ASP, but ASP.NET feels like home.

     

    I intend to focus primarily on ASP.NET and .NET development across a range of topics from building web controls to e-commerce development. As a member of a .NET component company I am sure that some of these entries will focus around the technologies that we are currently working with.  

     

    Outside of ASP.NET development I am an avid mountain biker. That's not to say that I'm any good - In fact, I am usually cut up and badly bruised after every ride. In spite of all of my injuries I still love hitting the trails after a long day at work.

     

    That’s enough about me.  Welcome to my blog!

     

     

    Disclaimer: This blog is completely independent of and unaffiliated with /n software itself.  All opinions included here are mine and do not represent the opinions of my employer or any of its other employees.

    Sponsor