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.ServerV ariables["REMOTE_ADD R"] = clientIP;
Above code is throwing an exception.
[PlatformNotSupp ortedException: Operation is not supported on this
platform.]
System.Web.Http ServerVarsColle ction.Set(Strin g name, String value)
+3254625
System.Collecti ons.Specialized .NameValueColle ction.set_Item( String name,
String value) +9
I have also tried
Request.ServerV ariables.Remove ("remote_addr") ;
Request.ServerV ariables.Add("R EMOTE_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.ServerV ariables["REMOTE_ADD R"] = clientIP;
Above code is throwing an exception.
[PlatformNotSupp ortedException: Operation is not supported on this
platform.]
System.Web.Http ServerVarsColle ction.Set(Strin g name, String value)
+3254625
System.Collecti ons.Specialized .NameValueColle ction.set_Item( String name,
String value) +9
I have also tried
Request.ServerV ariables.Remove ("remote_addr") ;
Request.ServerV ariables.Add("R EMOTE_ADDR", clientIP);
This code throws "Cannot directly modify server variables". Any idea how to
tackle this problem?
Thanks,
Sanjib