2012-04-30 8 views
0

私はMSXMLリクエストに同じことを行う必要がありエンドポイント(特定のIP)をMSXMLリクエストにバインドしますか?

if (!ipAddress.Equals(myLocalIP)) 
      { 
       request.ServicePoint.BindIPEndPointDelegate = 
        delegate(ServicePoint servicePoint, IPEndPoint remoteEndPoint, int retryCount) 
        { 
         return new IPEndPoint(IPAddress.Parse(ConfigurationManager.AppSettings["SS_Outbound_IP"]), 0); 
        }; 
      } 

以下のようにこんにちは、私はIPEndpointが私のWebRequestsに結合します。 私のMSXMLリクエストはこちらです。

var xmlHttp_ = new XMLHTTP(); 
     Console.WriteLine("My IP is: "+FindMyPublicIPAddress()); 
     // Build the query. 
     string requestString = 
      "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + 
      "<a:propfind xmlns:a=\"DAV:\">" + 
      "<a:prop>" + 
      "<a:displayname/>" + 
      "<a:iscollection/>" + 
      "<a:getlastmodified/>" + 
      "</a:prop>" + 
       "</a:propfind>"; 

      // Open a connection to the server. 
      xmlHttp_.open("PROPFIND", Uri, false, "UserName","Password"); 

      // Send the request. 
      xmlHttp_.setRequestHeader("PROPFIND", requestString); 
      xmlHttp_.send(null); 


     // Get the response. 
     string folderList = xmlHttp_.responseText; 

いずれかの提案をいただければ幸いです。

答えて

0

MSXMLでエンドポイントバインドを行うことができません。

関連する問題