- Enable Microsoft Windows Server with ASP: see instructions here: https://msdn.microsoft.com/en-us/library/aa544765%28v=cs.70%29.aspx
- Create your .html file as required
- Add the code below to the .html file
- Rename the file to .asp
- Make sure your IIS website has your file listed as a default page : see here: https://technet.microsoft.com/en-us/library/cc753615%28v=ws.10%29.aspx
- Browse to your site
Code for showing IP address
<div> Client Source IP address is:
<% Response.Write(Request.ServerVariables(“REMOTE_ADDR”)) %>
</div>
Code for showing al variables:
<table border=”1″ width=”500″ style=”border-collapse: collapse”>
<%
For each item in Request.ServerVariables
Response.Write(“<tr><td>” & item & “</td><td>”)
Response.Write(Request.ServerVariables(item))
Response.Write(“</td></tr>” & vbCrLf)
Next
%>
</table>
Above code from this website: http://www.powerasp.net/content/new/using-asp-to-retrieve-users-ip-address.asp