セキュリティモデルがHTTPヘッダーに依存するカスタムSharePointアプリがあります。モバイルデバイスからリクエストが行われると、HTTP_RIM_DEVICE_EMAILと呼ばれるhttpヘッダーが各リクエストに追加されます。次の方法でhttpヘッダーを取得します。
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;
}
「HTTPRIMDEVICEEMAIL」を渡すと、nullが返されます。同じサーバー上に通常のasp.net2.0サイトがあり、ブラックベリーを介して要求するとヘッダーが表示されますが、SharePointサイトを要求すると表示されません。
SharePointが必要なhttpヘッダーを削除しないようにする方法はありますか?