04-11-2002, 09:17 AM
This should be easy, but I just started learning ASP, so I don't know how:
But, I am trying to write an asp page that accepts a parameter of partial url which will be used to redirect the browser.
For some reason, it works fine if the parameter is html page, but if the destination page is an asp page, it gives me an error about the page cannot be displayed. It displays html pages just fine.
Please let me know what I've done wrong. Or can it be due to the network setting?
Recommendations to good ASP resources will also be appreciated.
<% @LANGUAGE=VBSCRIPT %>
<% OPTION EXPLICIT %>
<% RESPONSE.BUFFER=TRUE %>
<% RESPONSE.CLEAR %>
someURL = REQUEST("nextPage")
RESPONSE.REDIRECT someURL %>
<% RESPONSE.END %>
04-11-2002, 09:37 AM
You might want to try the Server.Transfer method. This is a direct
server-side redirect that doesn't require sending anything back to
04-11-2002, 09:58 AM
Okay, this is nuts. I tried your suggestion and got this message:
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'transfer'
What does this mean? The Web Server is not supporting ASP?
04-11-2002, 10:06 AM
Ah, it appears that Server.Transfer was added for IIS5. I am
sorry I got your hope up.
With that redirect, you did do Response.Buffer = True first, right?
04-11-2002, 10:39 AM
Yes I did. Just to be safe, I include response.buffer = true on all the pages.
This may be related, or not, but ... when trying to go to another page using hyperlinks, I notice significant difference:
1. Hyperlinking and going to html pages almost 100% reliability
2. Hyperlinking from or to asp page, sometimes errors occur
It seems like the system doesnt like asp to asp, asp to html is acceptable.
Any clues, Thinker? Thanks in advance.
04-11-2002, 10:46 AM
Are all the ASP pages in the same domain? Like www.microsoft.com
If so, I think you can leave the domain off, and just use the
part after it. I don't know if this will help or not.
04-11-2002, 11:04 AM
For now the pages are kept in the same folder. So, I can just reference the file names.
It's probably got to do with the proxy server or something weird like that. Thanks for the assistance Thinker. Please let me know if you have anymore ideas or good resources.
04-11-2002, 11:34 AM
Proxy server, hmmm. I wonder if it is caching these ASP pages.
You might want to set the Response.Expires/ExpiresAbsolute and
Response.CacheControl. It may not do any good, but it can't hurt
04-11-2002, 12:47 PM
Thinker since you've been so helpful, I just want to let you know that my Network Admin has encountered this problem so he knew what to look for
In order to run ASP correctly, the Virtual Directory's option of 'run in separate memory' has to be checked (by default it is unchecked)
The freaky thing is, when he assigned that virtual directory for me, he HAD checked it. Anyways, after told him about the, he unchecked and rechecked the option, then everything works fine.
Thanks for your clues. I hope you would still direct me later. When I can actually PROGRAM and not busy ADMINISTERing the **** thing.
04-11-2002, 01:04 PM
Thanks for posting back this answer. I will remember it, and it
could help someone else down the road.