Chili!Soft ASP and wierd server cache thingy...
i started playing with ASP today, and am very annoyed. i'm using Chili!Soft ASP on a Cobalt Raq4.
Basically, i upload a test file that doesn't do very much but print a few lines, and out of habit i included a semi-colon at the end of a line. the file is included by another asp script which does nothing but include it.
so i get this error
Microsoft VBScript compilation error '800a0401' Expected end of statement testinc.asp, line 6 response.write("blah blah blah"); --------------------------------^
And i'm all like 'doh' and slap myself on the forehead. I fix the problem, re-upload the file, and refresh. Same error, telling me i have a semi-colon where i no longer do. so i upload the file again to be sure, same thing. so i delete the file from the server, go reload and the same thing, EVEN THOUGH THE FILE DOESN'T EXIST! clear my cache, same thing. try NS6, same thing.
So what the hell is the deal with ASP? I'm about to give up and i havn't even started yet!
Peter J. Boettcher posted this at 22:38 — 11th February 2002.
They have: 812 posts
Joined: Feb 2000
Try removing the () like:
response.write "blah blah blah"
ROB posted this at 00:36 — 12th February 2002.
They have: 447 posts
Joined: Oct 1999
that's not the problem, the exact same error with the exact same line of code (including the semicolon) is displayed, even if the file no longer exists on the server.
i figured out a fix though. if file1.asp includes file2.asp, and you want to change something in file2.asp (such as fix an error) you need to re-upload both file1 and file2 for changes in file2 to be visible. after reading a bit more about ASP i think it may have to do with the session, once the included file is in memory ASP doesn't think it needs to read it again, but it should at least check to see if it's been modified...
Peter J. Boettcher posted this at 14:13 — 12th February 2002.
They have: 812 posts
Joined: Feb 2000
If you want to make sure the page doesn't get cached try including the following at the top of your page:
Response.AddHeader "cache-control", "private"
Response.Addheader "pragma", "no-cache"
Response.Expires = 0
Be sure to delete your cache first
PJ | Are we there yet?
pjboettcher.com
detox posted this at 14:07 — 13th February 2002.
They have: 571 posts
Joined: Feb 2001
if you arent using session variables at all (they are sometimes a necerssary evil) the simply use :
<?php
<%@ ENABLESESSIONSTATE=False
?>
?>
here is a link about the pros and cons of using session variables
4guysfromrolla.com/webtech/092098-2.shtml
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.