I'm having the issue where when clicking on a button to cause a postback, the URL changes all uppercase letters to lowercase letters.
I aim to fix this. A helpful solution I found on StackOverflow shows how this is done. But in the process, it does not tell me where to put the <rules> at in the Web.config.
I only know <rules> are to be placed / nested inside the <system.Webserver> tags, but I don't know what else do I need to wrap around the <rules> so it is valid?
Currently, this is my <system.Webserver> configurations from the Web.config:
<system.webServer><validation validateIntegratedModeConfiguration="false"/><modules><remove name="ScriptModule"/><add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules><handlers><remove name="WebServiceHandlerFactory-Integrated"/><remove name="ScriptHandlerFactory"/><remove name="ScriptHandlerFactoryAppServices"/><remove name="ScriptResource"/><add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></handlers><directoryBrowse enabled="true"/></system.webServer>
So, what exactly do I need to put, to replace the <UNKNOWN_TAG> tag below, so I can disable converting uppercase letters in the URLs to lowercase letters? The <rules> tag is copied over from the linked StackOverflow post above.
<system.webServer><!-- ... Other tags. --><UNKNOWN_TAG><rule name="LowerCaseRule1" stopProcessing="true"><match url="[A-Z]" ignoreCase="false"/><action type="Redirect" url="{ToLower:{URL}}"/><conditions logicalGrouping="MatchAny"><add input="{REQUEST_FILENAME}" pattern="\.aspx$"/><add input="{REQUEST_FILENAME}" pattern="\." negate="true"/></conditions></rule></UNKNOWN_TAG><!-- ... Other tags --></system.webServer>
Thanks.