views:

30

answers:

2

Is there an issue with IIS or ASP Classic where *Request.ServerVariables("QUERY_STRING")* returns blank if no default file name is given in the URL? On my local developer machine, I can do

http://localhost/xslt/?opcs/abc

which returns "opcs/abc". However, on our ancient web server, it returns nothing. I have to explicitly give it the default file name in the URL. Like so

http://localhost/xslt/default.asp?opcs/abc

While nothing too major, it is a little bit of a annoyance. One way I can maybe think of remidying the problem is have Javascript read the URL and return everything after the ?.

Unfortunately, I do not know what version of IIS or ASP we are using.

Thank you.

A: 

That sounds like a bug, I never experienced that when I used to do a lot of ASP. Make sure you are patched up to the latest version.

RedFilter
I know for a fact that the server is not patched. It is running Windows NT and I've been told that they will not update it. Request.QueryString does not return anything either unless I specify the default file name. :(
Mike
Write your own functions then, to be sure.
RedFilter
I don't follow. Write my own functions for what? AFAIK, there is no other server side way to get the full URL requested.
Mike
You're right, I thought SCRIPT_NAME included the querystring and you could parse that, but it doesn't. I really think that server needs to get patched or decommisioned, for security reasons more than anything else.
RedFilter
I've gone ahead and accepted your answer. Thank you for your time and help. :)
Mike
A: 

If you're running IIS 4.0, this may very well be the case. So you're really stuck with this ancient piece of software (and probably hardware) ? :)

thomask