This topic is locked

Header for ASP Pages

1/25/2007 6:31:06 PM
ASPRunnerPro General questions
J
jawendell author

I just started using Version 4.11 Build 212. I updated an application that I previously had been using Version 4.0. I uploaded it to a new directory on the web site. There are some pages that I had created manually to display the contents of a directory. Now, the pages do not work. The code at the top of the page is as follow:
<%@ Language=VBScript %>
<!--#include file="include/Filelists_variables.asp"-->

<!--#include file="include/Filelists_aspfunctions.asp"-->
<%

If Session("UserID")="" then

Session("MyURL")=request.ServerVariables("SCRIPT_NAME") & "?" & request.ServerVariables("QUERY_STRING")

Response.Redirect "login.asp?message=expired"

End If

if CheckSecurity("", "Search")<>True Then

Response.Write "<p>" & "You don't have permissions to access this table" & "<a href=""login.asp"">" & "Back to login page" & "</a></p>"

Response.End

end if

%>
It appears that some of the file names are different in the new version, such as the aspfunctions.asp file no longer has the prefix. Using the example above, what new code would I have to use to accomplish the same thing? Please advise.
Thanks in advance for your help.

J
Jane 1/26/2007

Jerome,
you need to replace these lines:

<!--#include file="include/Filelists_variables.asp"-->

<!--#include file="include/Filelists_aspfunctions.asp"-->

with this one:

<!--#include file="include/Filelists_variables.asp"-->

<!--#include file="include/commonfunctions.asp"-->

J
jawendell author 1/26/2007

Thanks for your reply. I replaced the two lines that you mentioned, but I still get the error. Should some of the following code be changed?
<%

If Session("UserID")="" then

Session("MyURL")=request.ServerVariables("SCRIPT_NAME") & "?" & request.ServerVariables("QUERY_STRING")

Response.Redirect "login.asp?message=expired"

End If

if CheckSecurity("", "Search")<>True Then

Response.Write "<p>" & "You don't have permissions to access this table" & "<a href=""login.asp"">" & "Back to login page" & "</a></p>"

Response.End

end if

%>
Please advise.
Thanks.

Alexey admin 1/29/2007

Jerome,
the ASP code created by version 4.1 differs alot from pages generated with ASPRunner 4.0.

So there is no guarantee that custom pages worked with 4.0 would work with 4.1
There are no problems with the code snippet you posted. It would work fine with 4.1 pages.

You need to either find an error somewhere else in your code or completely recreate your custom pages.