views:

478

answers:

3

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 = HttpContext.Current.Request;
            string returnValue = string.Empty;
            try
            {
                string[] val = Request.ServerVariables.GetValues(headerName);
                if (val.Length > 0)
                    returnValue = val[0];
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
            return returnValue;
        }

I pass in "HTTP RIM DEVICE EMAIL" and it's returning null. I have a regular asp.net 2.0 site on the same server and when I make a request to it through the blackberry, I see the header, but not when requesting the sharepoint site.

Is there a way to prevent sharepoint from stripping the http header that I need?

A: 

Have you tried manually adding the headers in IIS?

A: 

The value in the http header is device specific, which is dynamic.

Dave
A: 

Actually, sharepoint doesn't strip HTTP Headers.

Dave