2 simple questions
ASP.NET
3
Posts
2
Posters
0
Views
1
Watching
-
-
1. How to check (on WinXP) whether current connection to internet has a public IP address (is NOT behind NAT)? 2.What cheap hosting sites that have appriopriate IIS for ASP.NET 2.0 could you recommend me? (I live in middle Europe) thank you in advance
To get the IP use something like
public string getClientIPaddress() { string IPAddress = HttpContext.Current.Request.ServerVariables\["HTTP\_X\_FORWARDED\_FOR"\]; if (IPAddress == null) { IPAddress = HttpContext.Current.Request.ServerVariables\["REMOTE\_ADDR"\]; } return IPAddress; }
As for the host i'm not really the best to answer that, we have our own servers in a datacentre, I know there are good sites out there to show and compare them
-
To get the IP use something like
public string getClientIPaddress() { string IPAddress = HttpContext.Current.Request.ServerVariables\["HTTP\_X\_FORWARDED\_FOR"\]; if (IPAddress == null) { IPAddress = HttpContext.Current.Request.ServerVariables\["REMOTE\_ADDR"\]; } return IPAddress; }
As for the host i'm not really the best to answer that, we have our own servers in a datacentre, I know there are good sites out there to show and compare them