Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Craig100 1136 posts 2523 karma points c-trib
    Dec 11, 2021 @ 12:56

    Remote_Addr Magic String Not Working

    Umb 9.1.2 UF 9.2.0-rc001 hosted on Windows.

    I have a form which is meant to record the sender's IP address in a hidden field using "[@Remote_Addr]" as it's Default Value in the field's settings.

    This field is always empty in both the page source and the sent email.

    The form.cshtml correctly displays the IP address in text, i.e. "Your IP address will be recorded as". To get that I inject Microsoft.AspNetCore.Http.IHttpContextAccessor HttpContextAccessor and output the IP address with @HttpContextAccessor.HttpContext.Connection.RemoteIpAddress.ToString()

    Because it displays correctly on the page I suspect something is amiss with the way UF accesses it.

    Any advice would be appreciated. I'll raise an issue on GitHub if it's not just me ;)



  • Craig100 1136 posts 2523 karma points c-trib
    Dec 13, 2021 @ 20:12
Please Sign in or register to post replies

Write your reply to: