troubleshooting Question

Classic ASP, Server.Execute failed while loading error

Avatar of opacons
opacons asked on
Web Languages and StandardsWeb DevelopmentASP
15 Comments1 Solution1838 ViewsLast Modified:
I'm trying to use a session variable together with a string literal as an argument to the Server.Execute function. When it is called I get a "Server.Execute failed while loading" error.

The code looks like this:
<%
Dim f
f = Session("site_root") & "/inc/incfile.asp"
Server.Execute(f)
%>

Session("site_root") returns a path similar to "/localhost/website" so based on the example above f = "locahost/website/inc/incfile.asp".

I don't want to use an SSI because of differences between the testing and production environments.

In essence all I want to do is have a variable webroot which can be adjusted according to the server setup the site is being run on.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 15 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros