homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

Problem with server side includes
Problem with server side includes

10+ Year Member

Msg#: 270 posted 4:28 am on Nov 28, 2002 (gmt 0)

Hello folks.

The hosts of my chat room can type in a password protected url to change the room status to "open" or "closed". This is supposed to change several things at once, including the image site wide that displays the chat room status.

This page itself is working fine. The variable is changed in a text file. This text file is included into settings.asp and then settings.asp is included in all the other relevant pages, is doesn't seem to be having an effect though.

settings.asp is getting included, but the chat status file included into that appears as if it is not included, although it must be!

There are no errors so the code should be getting included, chatStatus="open" for example. For the page which re-directs users accordingly, no re-direction is taking place. I've played around with the coding a lot, but to no avail.

Originally I would ftp the settings.asp file whenever a change in the chat rooms status occured. However, this is not suitable for my hosts and in the long term isn't really an efficent method.

The problem is probably something really simple, that's always the way!



WebmasterWorld Senior Member korkus2000 us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 270 posted 1:23 am on Nov 29, 2002 (gmt 0)

Why not have a setting in a database instead of using a text file?


10+ Year Member

Msg#: 270 posted 12:45 pm on Nov 29, 2002 (gmt 0)

What about using a cookie? If you're referring to a local variable in an include file, it will be re-initialized every time the page loads. Use a cookie or Session variable.


10+ Year Member

Msg#: 270 posted 8:05 pm on Nov 29, 2002 (gmt 0)

I know someone would mention databases.

The reason I'm using a text file is that I'm only just getting into databases and the info is only one little piece of data.

In terms of security with holding the variable in a text file, well it's in a url secured area so that's okay.

I'll look into using a session variable,


10+ Year Member

Msg#: 270 posted 6:19 pm on Dec 8, 2002 (gmt 0)

Could the problem you're having be caused by pages being cached in the browser so that the updated status text file doesn't take effect?

If so there is another Webmaster World discussion that suggests something you might try:
Response.Expires = -1
Response.Expiresabsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"

(before the html tag).

Global Options:
 top home search open messages active posts  

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved