?
Solved

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

Posted on 2011-10-11
1
Medium Priority
?
360 Views
Last Modified: 2012-05-12
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

0
Comment
Question by:zimmer9
1 Comment
 
LVL 15

Accepted Solution

by:
pateljitu earned 2000 total points
ID: 36949952
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question