request.servervariables

Sharepoint stripping HTTP Headers

I have a custom sharepoint app whose security model depends on an HTTP header. When a request is made from the mobile device, an http header called HTTP_RIM_DEVICE_EMAIL is added to each request. I grab the http header via the following method: private static string GetValueFromHeader(string headerName) { HttpRequest...

request.serverVariables() "URL" vs "Script_Name"

I am maintaining a classic asp application and while going over the code I came across two similar lines of code: request.serverVariables("URL") ''# Output: "/path/to/file.asp" request.serverVariables("SCRIPT_NAME") ''# Output: "/path/to/file.asp" I don't get it... what is the difference? both of them ignore the URL rewriting that I ...

what is asp's Request.ServerVariables("AUTH_USER") jsp equivalent?

well, on a IIS web site with integrated windows authentication and no anonymous access, I can retrieve the logon username of the user, something like like domain\user... is it possible to achieve this with jsp on tomcat? (or any other container) I've tried with request.getHeaderNames (on tomcat) but I only get host, user-agent, accep...

asp.net mvc when should i read servervariables?

Hi. When is the apropriate time (part of code) that i can gather information from servervariables? I mean, i have tried calling this string temp = Request.ServerVariables.Get("HTTP_REMOTE_USER"); in the Controller constructor, but i am getting a nullpointerexception, while in an action it works properly. And it just doesnt seem very c...

ASP.NET: UrlReferer has wrong value, interrogating in a static (webmethod) page called from jquery

Hi there, Can anyone help? I am trying to interrogate the UrlReferer whcih should contain Google.com but it contains my current site. My web page is a standard HTM page and jquery calls a static method like so [WebMethod] public static void ProcessTracking(string jsonString) Inside this method i do a standard lookup on Reques...

ServerVariables and POST Data

I've got a piece of tracking code which is capturing REMOTE_HOST, SERVER, REQUEST_METHOD, SCRIPT_NAME and QUERY_STRING. It grabs these from ServerVariables and sticks them in a database by user and IP. What is the best way to pick up the exact contents of what was posted back to a URL in ASP.NET? Is there an HTTP_POST? I'd rather not gr...

ASP.NET - Telling the difference between localhost and 127.0.0.1

How can you tell the difference between a request going to 127.0.0.1 and localhost. This line of code on Windows 7 and VS2010 built-in web server can not tell the difference. if (Request.ServerVariables["SERVER_NAME"].ToLower() == "localhost") { } try hitting your own built-in web server with: http://127.0.0.1/ and then http://local...

xsl server variable returns null

xsl server variable URL returns null. I tried all the other server variable and they all returns nulls. Is there anything I need to do (like in IIS or web.config) in order for xsl to show server variables? (i am working on webpart in sharepoint). <ParameterBinding Name="URL" Location="ServerVariable(URL)" DefaultValue=""/> <xsl:param ...

Is Request.ServerVariables["REMOTE_ADDR"] reliable enough?

Currently I am using Request.ServerVariables["REMOTE_ADDR"] to get the IP from the client. What guarantees I get when calling this Method. Or should I look in other ServerVariables as well? ...

Request.ServerVariables("REMOTE_ADDR") retrieving the same IP for multiple logins inside and outside my company

I've been asked to write code to track IP addresses of visitors to one of my company's online applications in .NET. This is actually the second one I've done, having done another site late last year. I noticed then, and again now, that I sometimes get the same IP address showing up for what I know is another box.....sometimes a co-work...

Asp.net ques regarding getting IP address of a user

trying to fetch IP address using this:- protected void Page_Load(object sender, EventArgs e) { string ClientIP; ClientIP = HttpContext.Current.Request.UserHostAddress; Label1.Text = ClientIP; } This code gives output as 127.0.0.1 and the code below displays nothing! string C...