[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 391
  • Last Modified:

403;4 Redirect via an ASP file

Here's my question, our server admin setup 403.4 error to run an ASP page in the root of the web directory.  Originally this had a Javascript in it that redirected the user to the given page.  To accomodate those that don't have Javascript on we need it to run an ASP script on the server side.

Problem is, when the 403.4 error throws the redirect.asp page, it doesn't run it like an ASP page.  Instead, it sends the whole thing like it's text or HTML (code brackets and everything) like it's not processing through the ASP engine?  How do we remedy this to make that page render as ASP and not text?

I tested with the following and instead of writing the word Test to a page it send the text verbatim.

<%
Response.Write("Test")
Response.End
%>
0
IUFITS
Asked:
IUFITS
1 Solution
 
Dave_DietzCommented:
Make sure the directory where the file is located is set to allow Scripts.  If the directory has None set for execution priveleges this can happen.

Dave Dietz
0
 
DireOrbAntCommented:
Another, very likely possibility is that the server admin picked file vs URL.
The steps are:
Right-click your Web site, Properties, Custom Errors, then select the 403.4 and click Edit.
In there, pick URL (not file) and then type the virtual path to the asp page like:
/MyErrorPages/My403.asp
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now