Microsoft KB Archive/287411

= BUG: NULL Value Returned for Query String Variable From Formslogin.asp =

Article ID: 287411

Article Last Modified on 10/22/2002

-

APPLIES TO


 * Microsoft Site Server 3.0 Standard Edition

-



This article was previously published under Q287411



SYMPTOMS
When you use forms authentication in Site Server 3.0, a null value may be returned when you attempt to obtain the first query string variable from within the Formslogin.asp file when redirected to Formslogin.asp.



RESOLUTION
Here are two methods you can use to work around the problem:   Query for the query string variable as follows: Request.QueryString(&quot;/default.asp?value1&quot;)   Obtain the first query string value by using: Request.ServerVariables(&quot;QUERY_STRING&quot;) 



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
NOTE: For the purpose of explaining this problem please assume a membership enabled Web site with forms authentication enabled.

Suppose that the Default.htm file allows anonymous access. Default.htm has a form that takes user input and passes it in a query string to Home.asp, which has anonymous access disabled.

Because anonymous access is restricted on home.asp, the Authfilt.dll file handles redirecting the user to the Formslogin.asp file. Authfilt.dll passed the original URL, which contains a query string, as a query string.

The URL that is created looks similar to: http://localhost/_mem_bin/FormsLogin.asp?/home.asp?value1=1&value2=2 Note that there are two question marks. According to ASP, the first query string parameter appears to be &quot;/default.asp?value1&quot; and the second query string parameter appears to be &quot;value2&quot;.

If you subsequently try to read the first variable in the query string by using Request.QueryString(&quot;value1&quot;) the value returned is equal to null.

Keywords: kbbug kbfix KB287411

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.