%@ LANGUAGE="VBSCRIPT" %>
MSMQ Asp Sample Open Queue Page - 2
MSMQ Asp Sample Open Queue Page - 2
[Home]
Opening Queue : <%= Request.QueryString ( "QueuePath" )%>
<% Set msmqinfo=CreateObject ( "MSMQ.MSMQQueueInfo" )
msmqinfo.PathName=Request.QueryString ( "QueuePath" )
on error resume next
Set Session ( "SendQueue" ) = msmqinfo.Open ( 2, 0 )
if err.number <> 0 then
response.write "Error 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 0x" & Hex(Err.Number) & " - " & Err.Description & "
"
else
dim var
var = Request.QueryString ( "QueuePath" )
Session ( "qname" ) = Right ( var, Len ( var ) - Instr ( var, "\" ))
Session ( "mname" ) = Left ( var, Instr ( var, "\" ) - 1)
response.write "Queue created.
"
end if
end if
set msmqinfo=Nothing
%>