locked
How to Get the IP Address and Machine Name in the Silverlight Application RRS feed

  • Question

  • Hi,

              For Audit Purpose I have to Get the IPAddress & Machine Name of the Computer which is used to access my silverlight Application.

    Please help me how to get it.

    Thanks in Advance

    Selvakumar Rathinam

    Wednesday, June 8, 2011 12:08 AM

Answers

All replies

  • It is discussed in these 2 threads.

    http://forums.silverlight.net/forums/t/16418.aspx

    http://stackoverflow.com/questions/1362219/how-to-make-silverlight-client-aware-of-users-ip-address

    Wednesday, June 8, 2011 12:23 AM
  • HttpContext.Current.Server.MachineName;

    System.Net.Dns.GetHostByAddress(System.Net.IPAddress.Parse(System.Web.HttpContext.Current.Request.UserHostName)).HostName;

    string serverIP = Application.Current.Host.Source.DnsSafeHost.ToString();

    Thursday, June 9, 2011 2:05 AM
  • Hi,

            Thanks for the replay I have few questions on your answer please clear that

    1. Application.Current.Host.Source.DnsSafeHost.ToString() - will be return the server IP Addres or the the Client IP Address?

    2. HttpContext.Current.Server.MachineName - Httpcontext I will not be able to use in the silverlight application so, how to get the Client Machine Name

     

    Please help me

    Thanks in Advance

    Selva


    Thursday, June 9, 2011 3:24 AM
  • Selvakumar,

    did you solve the issue?

    Regards,

    Gabriel


    Wednesday, March 13, 2013 12:45 PM