消息队列错误...无法修复. [英] Error on messagequeue...couldn't fix it.
本文介绍了消息队列错误...无法修复.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只是试图在asp.net中使用msmq.当我尝试单击发送按钮时,显示以下错误..
Hi,
I was just trying to use msmq in asp.net.When i tried to click the send button the following error is showing..
public System.Messaging.MessageQueue mq;
public static Int32 i = 0;
protected void Button1_Click(object sender, EventArgs e)
{
System.Messaging.Message mm = new System.Messaging.Message();
mm.Body = TextBox1.Text;
mm.Label = "MsgI" + i.ToString();
i++;
mq.Send(mm);//Error msg:Object reference not set to an instance of an object.
}
请告诉我这个错误是什么..
谢谢.
kindly tell me what is this error..
Thank you.
推荐答案
您初始化了System.Messaging.MessageQueue
的mq
对象吗?
请查看以下链接,以获取有关MessageQueue类的更多信息.
http://msdn.microsoft.com/en-us/library/system.messaging. messagequeue.aspx
Have you initializedmq
object ofSystem.Messaging.MessageQueue
?
Have a look at below link for more information on MessageQueue Class.
http://msdn.microsoft.com/en-us/library/system.messaging.messagequeue.aspx
这篇关于消息队列错误...无法修复.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文