none
REST with GET operation URL contains empty and special characters RRS feed

  • Question

  • Hello,

    My property schema having 3 values i.e. Value1,Value2 and Value3.

    I have exposed a REST service and using WCF-WebHttp adapter with below operation to get values from external application through this service into BizTalk.

    <BtsHttpUrlMapping>
    <Operation Name="GET" Url="/Status/{Value1}_{Value2}_{Value3}"/>
    </BtsHttpUrlMapping>

    I am facing issue  at the time of receiving special characters or empty values in URL.

    like below,

    (//,.,empty,-,&)

    http://localhost/BizTalk/RestService.svc/Status/http://WWW.ABCD.COM__2016-05-13 06:24:45.093

    http://localhost/BizTalk/RestService.svc/Status/You&Me_44503_1-000-222

    Please suggest to handle this and read values into BizTalk.

    Thank you.


    Thursday, June 16, 2016 9:58 PM

All replies

  • Hi Prashant,

    Refer a similiar thread where user faced this issue: WCF-WebHttp Adapter Substituting Nonstandard Characters In Address URI With Web Encoded Equivalent

    WCF-WebHttp adapter isn't the problem. It's doing exactly what it should by URL encoding any potentially 'unsafe' characters that have been 'injected' into the URL via a promoted property. Potentially the promoted property could contain malicious content, especially if that content has been sourced directly from text in an incoming message to BizTalk.

    You can edit the web.config of the 3rd party site so it no longer excludes any specific characters from the request.

      <system.web>
        <httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0" />
      </system.web>


    Rachit Sikroria (Microsoft Azure MVP)


    Friday, June 17, 2016 1:25 AM
    Moderator
  • Thanks Rachit.

    I am not very much clear on what exactly need to do here to get it work/resolved.

    Currently I am sending the URL request through Postman and its not coming into BizTalk if that URL contains any empty or special characters. I am receiving message through custom pipeline contains custom disassembler pipeline component to send Ack back to the sender.

    I am receiving empty message body as expected and promoted values into context, but its not coming into BizTalk if URL having special characters.

    Thanks.

    Friday, June 17, 2016 4:02 PM