Process | Control in the application of MSMQ can have a lot of applications, but the most common use is to uninstall the process in another thread. (such as IIS on the same machine as MSMQ) or IIS on a different machine. By uninstalling these blocked processes, you can enable the ASP program to continue to run.
In general, there are two things you should do to determine whether you need to uninstall a task process:
One is based on the time that the process runs.
The second is based on whether the user has a response (for example, a user in a chat room has not spoken for hours).
For example, if a server-side Web page task takes too long, the user gets a page timeout error message, we can generally refresh or simply discard the page by clicking it again. But now you can change the way you handle things, such as background processing, rather than simply adding time to the page. You know, background processing can also improve the performance of the site.
MSMQ also has the ability to control a specific COM object in the body of a message. This is OK as long as the object supports the IDispatch and IPersist (IPersistStream or IPersistStorage) interfaces.
One of the most commonly used, can support the two is ADODB. Recordset (or Ador. Recordset) and Word.Document. In the following we give a processing ADODB. Recordset example.
Example: How to deal with ADODB. Recordset:
Public Sub Sendrecordsetinmessage ()
Dim Objqinfo as New MSMQ. MSMQQueueInfo
Dim Objqsend as MSMQ. MSMQQueue
Dim objmessage as New MSMQ. MSMQMessage
Dim objRS as New ador. Recordset
Dim A as New msmqqueue
With objRS
. CursorLocation = adUseClient
. Fields.Append "FN", adVarChar, 25
. Fields.Append "LN", adVarChar, 25
. Open
. AddNew
. Fields ("FN") = "Chris"
. Fields ("LN") = "Blexrud"
. Update
. AddNew
. Fields ("FN") = "Shayna"
. Fields ("LN") = "Blexrud"
. Update
End With
Objqinfo.pathname = ". \test"
Set objqsend = Objqinfo.open (mq_send_access, Mq_deny_none)
Objmessage.label = "Recordset State!!!!"
Objmessage.body = objRS
Objmessage.send Objqsend
Objqsend.close
Set Objqinfo = Nothing
Set objqsend = Nothing
Set objmessage = Nothing
Set objRS = Nothing
End Sub
Do you know about MSMQ? I think now for the process of ASP deadlock, you already have a very good solution for it! I hope you can learn more about MSMQ and how to control the ASP process through MSMQ.