わかりました、私はタオルを投げて、知っているかもしれない人々に目を向けました. 私はネットを検索し、いくつかの例を試しましたが、Cookie コンテナーからデータを引き出すことに近づいていません。
コードをデバッグすると、次の変数のエントリ/値を確認できます: CookieContianer > 非パブリック メンバー > m_domainTable > {ドメイン URI} > 値 > エントリのリスト
そこに JSESSIONID というエントリがあります。私がやりたいのは、その特定のエントリを取得して、割り当てられた値を使用できるようにすることだけです。
どうすれば簡単に取り組めるのか、誰かが光を当てることができますか?
どうもありがとう。
==== リクエストの作成方法の例 (RequestItem は別のメソッドから渡されることに注意してください):
var request = (HttpWebRequest)WebRequest.Create(requestItem.RequestUri);
request.CookieContainer = new CookieContainer();
.... some additional code here building up a web request
var formResponse = (HttpWebResponse)formPost.GetResponse();
... some additional logic to check the headers to see if authentication was successful
requestItem.CookieContainer = request.CookieContainer;
//This call to the requested protected resource which uses the cookiecontainer from the authenticat
var passRequest = (HttpWebResponse) requestItem.GetResponse();