S
Sanjib Biswas
Hi,
I have an ASP.Net application which talks to an ASP application. As the
ASP.Net application talk to the ASP application, the REMOTE_ADDR server
variable points to the IP address of the ASP.Net application. I would like
to modify server variables to point to the actual client IP address rather
than ASP.Net application.
Client -> ASP.Net (Web application) -> ASP (Web application)
Request.ServerVariables["REMOTE_ADDR"] = clientIP;
Above code is throwing an exception.
[PlatformNotSupportedException: Operation is not supported on this
platform.]
System.Web.HttpServerVarsCollection.Set(String name, String value)
+3254625
System.Collections.Specialized.NameValueCollection.set_Item(String name,
String value) +9
I have also tried
Request.ServerVariables.Remove("remote_addr");
Request.ServerVariables.Add("REMOTE_ADDR", clientIP);
This code throws "Cannot directly modify server variables". Any idea how to
tackle this problem?
Thanks,
Sanjib
I have an ASP.Net application which talks to an ASP application. As the
ASP.Net application talk to the ASP application, the REMOTE_ADDR server
variable points to the IP address of the ASP.Net application. I would like
to modify server variables to point to the actual client IP address rather
than ASP.Net application.
Client -> ASP.Net (Web application) -> ASP (Web application)
Request.ServerVariables["REMOTE_ADDR"] = clientIP;
Above code is throwing an exception.
[PlatformNotSupportedException: Operation is not supported on this
platform.]
System.Web.HttpServerVarsCollection.Set(String name, String value)
+3254625
System.Collections.Specialized.NameValueCollection.set_Item(String name,
String value) +9
I have also tried
Request.ServerVariables.Remove("remote_addr");
Request.ServerVariables.Add("REMOTE_ADDR", clientIP);
This code throws "Cannot directly modify server variables". Any idea how to
tackle this problem?
Thanks,
Sanjib