<%@ LANGUAGE="VBSCRIPT" %> MSMQ Asp Sample Open Queue Page

MSMQ Asp Sample Open Queue Page

Opening Queue : <%= Request.QueryString ( "MachName" ) & "\" & Request.QueryString ( "QName" ) %>
<% Set msmqinfo=CreateObject ( "MSMQ.MSMQQueueInfo" ) msmqinfo.PathName=Request.QueryString ( "MachName" ) & "\" & Request.QueryString ( "QName" ) on error resume next Set Session ( "SendQueue" ) = msmqinfo.Open ( 2, 0 ) if err.number <> 0 then response.write "Error opening queue for receive access: 0x" & Hex(Err.Number) & " - " & Err.Description & "

" else on error resume next Set Session ( "RecvQueue" ) = msmqinfo.Open ( 1, 0 ) if err.number <> 0 then response.write "Error opening queue for send access: 0x" & Hex(Err.Number) & " - " & Err.Description & "

" else response.write "Queue opened.

" end if end if set msmqinfo=Nothing Session ( "qname" ) = Request.QueryString ( "QName" ) Session ( "mname" ) = Request.QueryString ( "MachName" ) %>

[Home]