2013-07-24 38 views
0

我有一個討厭的Cookie問題。我有兩個項目:一個asp.net mvc客戶端和wcf服務。 WCF服務使用basicHttpBinding的,有:在wcf服務中獲取客戶端Cookie

allowCookies = true 
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> 

而且我的服務類具有

[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]. 

我使用窗體身份驗證。在客戶端應用程序中,我創建了一個cookie。無論它是SessionSecurityToken cookie(「FedAuth」)還是由Forms.Authentication.SetAuthCookie創建的傳統cookie,它都可以在客戶端應用程序中看到(如果我沒記錯的話,可以在HttpContext.Current.Request中看到),但根本不會在我的WCF服務中看到。

回答

0

我最終使用了article中提出的方法。

如果有人知道更好的解決方案,請告知。