2008-12-10 78 views
2

我有一個自定義的sharepoint應用程序,其安全模型取決於HTTP頭。 當從移動設備發出請求時,會向每個請求添加名爲HTTP_RIM_DEVICE_EMAIL的http標頭。 我通過以下方法搶http頭:Sharepoint剝離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; 
     } 

我通過在「HTTP RIM設備的電子郵件」和它的返回空。我在同一臺服務器上有一個常規的asp.net 2.0站點,當我通過黑莓向它發出請求時,我會看到標題,但不是在請求SharePoint站點時。

有沒有辦法阻止共享點剝離我需要的http頭?

回答

1

實際上,sharepoint不會剝離HTTP頭。

0

http頭中的值是特定於設備的,它是動態的。