1 Replies - 928 Views - Last Post: 07 July 2011 - 02:00 PM Rate Topic: -----

#1 Nickshawn  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 27-September 07

Server Error Function?

Posted 06 July 2011 - 07:58 AM

I'm getting SQL Injection on my site. ASP.NET stops it with "A potentially dangerous Request.Form..."
Is there a way to log the IP Address of the user during or before this page is thrown?

Thanks,
Nick
Is This A Good Question/Topic? 0
  • +

Replies To: Server Error Function?

#2 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,960
  • Joined: 21-March 08

Re: Server Error Function?

Posted 07 July 2011 - 02:00 PM

You can get the IP Address for the visitor by using this...

string IPAddress = Request.ServerVariables["REMOTE_ADDR"];


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1