Thread doesn't start when app is running on Amazon windows server

Viewed 94

I manually start thread which runs SignalR on one page. Currently my app is running on two different servers - Contabo and Amazon. Both are windows servers.

I logged the whole process in my database and found out that the thread doesn't start on Amazon server.

 public static void PushOrdersAsync()
    {
        int frequency = ParameterManager.GetInteger("OrderPushingFrequency");

        Task t = Task.Run(() =>
        {
            while (mPush)
            {
            
                Thread.Sleep(frequency * 1000);
                List<vOrder> orders = OrderManager.GetvOrders(OrderStatusEnum.Open);
                List<vOrder> completedOrders = OrderManager.GetCompletedOrdersAll();

                PushOpenOrders(orders);
                PushCompletedOrders(completedOrders);
            }
        });
    }

EDIT : I am manually starting the thread when I start the website

1 Answers

if your server is a datacentre edition you should check your license, make sure it does not have "activate windows" on the desktop

Related