locked
How to pass '#' without encoding it to WCF service? RRS feed

  • Question

  • User289218848 posted

    Hello,

    I have a WCF service and I'm having an issue while passing a query string with '#' in (_password=...#) this makes the request ignoring the rest of the URL.

    I have tried to Rewrite URL Rule but still the same

    <rewrite>
          <rules>
            <rule name="rule1">
              <match url="(.*)" />
              <conditions>
                <add input="{REQUEST_URI}" pattern="(.*)#(.*)" />
              </conditions>
              <action type="Redirect" url="{C:1}%23{C:2}" />
            </rule>
          </rules>
        </rewrite>

    I have also added 

    <system.net>
        <settings>
          <httpListener unescapeRequestUrl="false"/>
        </settings>
      </system.net>
    <uri>
        <schemeSettings>
          <add name="http" genericUriParserOptions="DontUnescapePathDotsAndSlashes"/>
          <add name="https" genericUriParserOptions="DontUnescapePathDotsAndSlashes"/>
        </schemeSettings>
      </uri>
    <system.web>   
        <compilation debug="true" targetFramework="4.5"/>
        <httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0"/> 
        <pages validateRequest="false" controlRenderingCompatibilityVersion="4.0"/>
      </system.web>

    But the issue is still remain.

    Friday, June 14, 2019 7:56 PM

All replies