IIS 7 and Above
URL Rewrite Module
Bug found while settings custom server variables
Last post Oct 08, 2019 05:46 AM by Jalpa Panchal
Oct 02, 2019 04:33 PM|rinaldo81|LINK
I found this bug while setting up a rule with a custom server variable to be used with classic ASP.
Inside the "Edit Inbound Rule" window,
inserting a server variable it will be saved in the "web.config" file with the same uppercase and lowercase letters.
For example, setting the custom variable 'test' with value "1" I will have a web.config file containing:
<set name = "test" value = "1" />
Another example, setting the custom variable 'TeSt' (with uppercase and lowercase letters) with value "1" I will have a web.config file containing:
<set name = "TeSt" value = "1" />
Opening the rewritten page in this way I have no scripting errors on the page but the server variable remains empty, therefore on the script side:
hello is empty
I resolved this problem manually editing the "web.config" file and replacing the variable name in uppercase:
<set name = "TEST" value = "1" />
and now the server variable on the rewritten page will be correctly set.
So, how come these variables only work when you capitalize? Is it an IIS condition?
Eventually someone could correct this bug in the rewrite module so that it goes directly to write the "web.config" file by entering the variables in uppercase even if written in lowercase or a combination of lowercase / uppercase letters.
Oct 03, 2019 06:08 AM|Jalpa Panchal|LINK
I also tested your posted server variable code.
in my opinion, this is not a bug.
when you sue server varible you need to use uppercase latter.
you could refer this iis server variable list . all are in upper case.
IIS Server Variables
Oct 07, 2019 02:53 AM|Jalpa Panchal|LINK
Is your issue solved?
If your issue is solved then I suggest you to mark the helpful suggestion as an answer.
If your issue still exists then try to refer the solution given by the community members.
If then also you have any further questions then let us know about it.
We will try to provide further suggestions to solve the issue.
Thanks for your understanding.
Oct 07, 2019 01:15 PM|rinaldo81|LINK
well, I've notified both the problem and the way to solve it, and this is a change that only module developers can update.
Did you make this problem known to the technical department?
If, as you say, all the variables must be entered in uppercase, then to improve user-side usability the program could do it automatically even if the user goes into error.
Oct 08, 2019 05:46 AM|Jalpa Panchal|LINK
I will try to submit your request as a feature request if possible.
For a now I request you to mark the helpful suggestion as an answer. This will help other people who face the same issue.
Thank you for understanding.