How to dynamically get the IP Address of the remote Server

Home Page Forums BizTalk 2004 – BizTalk 2010 How to dynamically get the IP Address of the remote Server

Viewing 1 reply thread
  • Author
    • #14691

      I have a scenario where I am using HTTP adapter to receive a request from multiple servers to BizTalk Server. I need to identify the IP Address of all the relevant servers [from where I am getting request to BizTalk] and map that address as one of the element in a schema. Does anybody have any idea about how to implement this ?

    • #14692

      The HTTP adapter does put the originating IP address into the message context. Probably because this info may not be relevant if you are behind a reverse proxy or hardware load balancer as Iggi has pointed out.

      One possibility is to use a reverse proxy that will set the [b:33c12af0b3]x-forwarded-for[/b:33c12af0b3] http header.

      The HTTP headers are available in the HTTP.InboundHttpHeaders property of the message context. Although they arrive a string so you will have to parse out the header value you want.

      Create a helper class with a static method that will parse and return the [b:33c12af0b3]x-forwarded-for[/b:33c12af0b3] header and assign this value to a distinguished field in you message in a message assignment shape of an orchestration.

      [code:1:33c12af0b3]newmessage.IPAddress = Mynamespace.MyHelper.GetForwardedForHeader(inboundmessage(HTTP.InboundHttpHeaders));[/code:1:33c12af0b3]

      • #14693

        imagine that you will need to enable IIS logging for this, as this information, the x-forwarded-for http header needs to be logged. This feature is suitable for application servers that are behind a Hardware Load Balancer or behind proxy server to see real client IP address in IIS logs. I cannot imagine that the standard biztalkhttpreceive.dll mechanism takes care of this stuff.

        I think that for the receive part you will have to get the file on a location, inspect the log (by searching for the filename e.g.) and promote this infos for further processing, but that is just plain guessing.

        Just my 2 cents



Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.