FileSystemWatcher in MVC application

  1. #1

    FileSystemWatcher in MVC application

    In my MVC 3 application, i want to perform this:
    When a new XML file is created in a given folder, the application reads the relevant data from the XML file and displays/updates information regarding that file in a partial View.

    After searching for relevant controls to achieve this functionality, I went for FileSystemWatcher. I am not quite sure how effective it is in web applications.
    So can i use FileSystemWatcher in MVC applications? Is there any alternatives to FileSystemWatcher? Whats the best way to achive my goal? Please provide me with an example
  2. #2
    Hi @mhd,

    Welcome to the Ext.NET forums!

    Well, a FileSystemWatcher might be worth to use.

    It looks obvious, but please clarify - you don't know a moment of file creation and have to monitor a file system, right?
  3. #3
    Thanks Daniil,
    Yes thats what i need
  4. #4
    Then, it looks that you have found exactly what you need. I mean the FileSystemWatcher class. I would also try with that.

    Another or additional thing that you'll probably need is to poll a server from a client. If on a client request you determine a change in the file system, you could send anything back as a response.

    As an alternative of polling a server from a client, there is SignalR. There is an example of that.
    https://examples2.ext.net/#/SignalR/Basic/StockTicker/
  5. #5
    That's exactly what i'm looking for.
    Is there any tutorial how to install and start with SignalR for Visual Studio 2010 ad MVC 3?
    Is there any SignalR example with Razor engine since i'm using .cshtml files?
    Thanks in advance
  6. #6
    Google is your friend here. I sure if you search the internet for "SignalR and ASP.NET MVC" some results will be returned.
    Geoffrey McGill
    Founder

Similar Threads

  1. Sample Application on MVC 4 with Ext.Net
    By sundarsureshin in forum 2.x Help
    Replies: 3
    Last Post: Jul 01, 2014, 2:31 PM
  2. RIA application using asp.net
    By sahuvijay in forum 2.x Help
    Replies: 1
    Last Post: Mar 19, 2013, 1:38 AM
  3. ASP.NET MVC 3 web application
    By fosteliss in forum 2.x Help
    Replies: 0
    Last Post: Jul 25, 2012, 4:32 PM
  4. Desktop Application
    By xMAC in forum 1.x Help
    Replies: 4
    Last Post: Jun 25, 2012, 8:27 PM
  5. Replies: 1
    Last Post: Jul 01, 2010, 6:07 AM

Tags for this Thread

Posting Permissions