How to avoid a "permission denied" error while developing an ASP application?

I am developing a classic ASP application. In the following code section I show an ASP file. How do I avoid the following error when I insert the statement: MsgBox session("id").
I am trying to debug the application using displays

Microsoft VBScript runtime error '800a0046'
Permission denied: 'MsgBox'
/fssox/devdefault.asp, line 8

<!--#include file="dbstringFSNet.asp"-->
<%
dim conn
dim id, ssql, rst, reqType, header, mngr

'Response.Write "user id" & session("id")
id=session("id")
MsgBox session("id")

if id="" then
	Response.Redirect "default.asp?msg=4"
	Response.End
else
	dim rstmngr, mngrlast
	set rstmngr=server.CreateObject("adodb.recordset")
	ssql="select * from temployees where ldapid ='" & id & "'"
	rstmngr.Open ssql, conn,2,2
	mngrlast=rstmngr("last name")

	rstmngr.Close
	ssql="select * from temployees where manager='" & mngrlast & "' or manager1='" & mngrlast & "'"
	'response.write ssql
	rstmngr.Open ssql, conn, 2,2


	%>
	<HTML>
		<HEAD>
			<TITLE>SOX -dev</TITLE>
			<link rel="stylesheet" href="onelook.new.css">
		</HEAD>
		<BODY >
	<%

	if not rstmngr.EOF or mngrlast="Suchy" then
		session("mngr")="yes"%>
		<!--#include file="topdevmngr.asp"-->
	<%
	else
		session("mngr")="no"%>
		<!--#include file="topdev.asp"-->
	<%
	end if
	%>	
	
	<INPUT type="hidden"  NAME="reqid" value="<%=request("reqid")%>" ID="Hidden2">	

	<%

	if request("reqid")<>"" then
		reqid=" and reqid=" & request("reqid")
	else
		reqid=" "
	end if
        
	reqType = request("type")
	'response.Write reqtype  & "***"
	
	if reqtype="devact" then
		header="My Developer's Active Requests"
		ssql="SELECT     tSOXUsrRequest.reqID, reason,tSOXUsrRequest.appname, dtneeded, tSOXUsrRequest.userid, tSOXUsrRequest.userName, tSOXUsrRequest.userEml, tSOXUsrRequest.changeRequest, tSOXUsrRequest.dtrequested, tSOXUsrRequest.devID, tSOXUsrRequest.dev FROM tSOXUsrRequest LEFT OUTER JOIN tSOXSignOFF ON tSOXUsrRequest.reqID = tSOXSignOFF.reqID WHERE     (tSOXSignOFF.usrSignOff IS NULL)  and (mngr='" & mngrlast & "' or mngr1='" & mngrlast & "')  order by dev,dtrequested"	
		'response.Write "<BR>" & ssql
	elseif reqType = "compl"  then
		header= "My Completed Requests "
		ssql="SELECT * FROM tSOXUsrRequest LEFT OUTER JOIN tSOXSignOFF ON tSOXUsrRequest.reqID = tSOXSignOFF.reqID WHERE     (tSOXSignOFF.usrSignOff='Yes') and devid='" & id & "'   order by dtrequested"	
	else
		header="My Active Requests"
		ssql="SELECT     tSOXUsrRequest.reqID, reason,tSOXUsrRequest.appname, dtneeded, tSOXUsrRequest.userid, tSOXUsrRequest.userName,  tSOXUsrRequest.userEml, tSOXUsrRequest.changeRequest, tSOXUsrRequest.dtrequested, tSOXUsrRequest.devID, tSOXUsrRequest.dev FROM tSOXUsrRequest LEFT OUTER JOIN tSOXSignOFF ON tSOXUsrRequest.reqID = tSOXSignOFF.reqID WHERE     (tSOXSignOFF.usrSignOff IS NULL)  and devid='" & id & "'  order by dtrequested"	
		'response.Write ssql
	end if

	'response.Write ssql
	set rst=server.CreateObject("adodb.recordset")
	rst.Open ssql, conn,2,2

	%>
	<br>
	<table align=left width="100%" cellpadding=5 cellspacing=5>
	<tr>
	<td>
		<table border="0" cellpadding=2 cellspacing=2>
			<tr>
			<td class="bgbluelight" colspan=8 height="25px" align=left><%=header%> 
			<br></td>
			</tr>
			<tr>
			<%if rst.EOF then%>
			<td colspan="8" align=center"">
			You have no requests at this time.
			</td></tr>
			<%else%>
			<td width="10%">Request Date</td>
			<td width="20%">Application</td>
			<td width="10%">User</td>
			<td width="20%">Request</td>
			<td width="20%">Reason</td>
			<td width="10%">Date Needed</td>
			<td width="10%">Details</td>
			<td width="10%">Developer</td>
			</tr>
			<tr>
			<td colspan=8><hr></td>
			</tr>
			<%do until rst.EOF
					response.Write "<TR>"
					response.Write "<Td>" & rst("dtrequested") & "</td> "
					response.Write "<Td>" & rst("appname") & "</td> "
					response.Write "<Td>" & rst("userid") & "</td> "
					response.Write "<Td>" & rst("changerequest") & "</td> "
					response.Write "<Td>" & rst("reason") & "</td> "
					response.Write "<Td>" & rst("dtneeded") & "</td> "
					response.Write "<Td><a href='devReqDetails.asp?reqid=" & rst("reqid") & "'>View</td> "
					response.Write "<Td>" & rst("dev") & "</td> "
					response.Write "<tr><td colspan=8><HR></td></tr>"
					rst.MoveNext
				loop
			
			end if

			 %>
			
			</td>
			</tr>
		</table>
	</td>
	</tr>
	</table>
<%
end if%>
	</BODY>
</HTML>

Open in new window

zimmer9Asked:
Who is Participating?
 
pateljituCommented:
Please see this article:

http://classicasp.aspfaq.com/general/how-do-i-send-a-msgbox-or-inputbox-from-asp.html

Depending on either server-side of client-side you need this alert to displayed use the code.

For client-side javascript is the best practice.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.