Activity Forums Salesforce® Discussions How can I show my IP Address in Salesforce Visualforce Page?

  • Tanu

    Member
    September 8, 2016 at 5:19 am

    Hello Pranav,

    Try this code

    Apex controller :

    public class IPAddress
    {
    public string myIPAddress{get;set;}
    public IPAddress()
    {
    myIPAddress = ApexPages.currentPage().getHeaders().get('X-Salesforce-SIP');
    }
    }

    VisualforcePage :

    <apex:page controller="IPAddress" >
    Your Login IP Address : {!myIPAddress}
    </apex:page>

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos