Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

IP in ASP.Net

  • 11-12-2003 9:56am
    #1
    Closed Accounts Posts: 43


    Im doing a college project through ASP.Net and was wonder if anyone out there could tell where I could find any code or information on collecting IP addresses, Machine Numbers or Names and User Names of the Person logging onto the site.Ive seen the pictures on other posts which display this information.Any information would be a great help:D


Comments

  • Closed Accounts Posts: 8 WoodyWoodPecker


    the main class to be aware of when looking for this type of information is the HttpRequest class, this provides you access to data (i.e IP Address) about the client which made the request


    the class is exposed as a property of the Page class, so access is straightfoward for a quick test just drop a button onto a form along with a textbox and add the following code,

    TextBox1.Text = Request.UserHostAddress;

    you should see the clients IP address show up, take a look at the other class members to get any other info. you need

    do a few googles for the HttpRequest class and you'll find tons of examples


Advertisement