事件未在Web服务中触发 [英] event not firing in web service

查看:70
本文介绍了事件未在Web服务中触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。我在web service.am中使用mCore™SMS在我的服务中测试ussd输入时触发事件有问题。在Windows窗体应用程序中,当我选中复选框以触发新传入的ussd时,其工作正常但问题是在一个Web服务中,我已经在启动时创建了一个函数,我连接调制解调器并且工作正常。问题是收到ussd请求的事件,它根本没有触发。这是我的代码。





Hello all.I have an issue with firing event in web service.am using the mCore™ SMS to test ussd input in my service.In windows form application,when i check the checkbox to fire new incoming ussd,its working okay.but the problem is in a web service,I have created a function on start which i connect with modem and that works okay.The problem is the the event which receives the ussd request,its not firing at all .Here is my code.


public void <pre lang="cs">objSMS_NewUSSDReceived(object sender, mCore.NewUSSDReceivedEventArgs e)
       {
           string message = e.Message.ToString();
           string status = e.Status.ToString();


           if (message.Contains("Welcome user"))
           {
                 //MY FUNCTION TO CALL

           }
           else
           {

               //problem with ussd



           }
       }

When the service starts on debug,i call the function below which has the ussd request.However it does not trigger any event

  public void Test()
        {
            bool result = objSMS.SendUSSD("*1234#");
            if (result)
            {
            
                //it lands in this code below but nothen happens.The event "objSMS_NewUSSDReceived" is not triggered

                objSMS.NewUSSDReceived +=objSMS_NewUSSDReceived;
                objSMS.NewUSSDIndication = true;


            }

推荐答案

这篇关于事件未在Web服务中触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆