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

  • Question

  • User289218848 posted


    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

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

    I have also added 

          <httpListener unescapeRequestUrl="false"/>
          <add name="http" genericUriParserOptions="DontUnescapePathDotsAndSlashes"/>
          <add name="https" genericUriParserOptions="DontUnescapePathDotsAndSlashes"/>
        <compilation debug="true" targetFramework="4.5"/>
        <httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0"/> 
        <pages validateRequest="false" controlRenderingCompatibilityVersion="4.0"/>

    But the issue is still remain.

    Friday, June 14, 2019 7:56 PM

All replies