0

I have Web application. I need to check for late orders every day. I search for the best way to do that ? but I still cant find it ? Is WCF is helpful ? or there are another technology to do that ?

Felipe Oriani
  • 37,948
  • 19
  • 131
  • 194
Raed Alsaleh
  • 1,581
  • 9
  • 27
  • 50

2 Answers2

1

You could create a Windows Service Application and configure a Timer to execute following a period specified. In the scope of this timer executing by the Windows Service you could add your routine to call another service to perform something.

CodeCaster
  • 147,647
  • 23
  • 218
  • 272
Felipe Oriani
  • 37,948
  • 19
  • 131
  • 194
  • How can add Windows Service Application to my Web app – Raed Alsaleh Jan 26 '16 at 13:40
  • You cannot. It is a separated application that will be instaled on windows and execute as a windows application, but it is a windows service. If you have permission to do it, I think it is the best way. – Felipe Oriani Jan 26 '16 at 13:41
-1

In the global.asax.cs:

public class MvcApplication : System.Web.HttpApplication
{
    protected void Application_Start()
    {
        AreaRegistration.RegisterAllAreas();
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
        RouteConfig.RegisterRoutes(RouteTable.Routes);
        BundleConfig.RegisterBundles(BundleTable.Bundles);
        RegisterGlobalFilters(GlobalFilters.Filters);

        InitializeLateOrdersChecker();
    }

    private void InitializeLateOrdersChecker()
    {
        // code for your timer. The ideal is running it every 60 seconds or so.
    }
}

A question (and answer) for the timer part:

Run once a day

Community
  • 1
  • 1
Alexandre Severino
  • 1,563
  • 1
  • 16
  • 38