title: What domain should I give this cookie?
body: <p>I'm trying to call a web service from a c# application, with sessionID.<br>
  In order to do this I need to set the "Domain" header in a cookie.  </p>
  
  <p>In Fiddler it looks like - "ASP.NET_SessionId=izdtd4tbzczsa3nlt5ujrbf5" (no domain is specified in the cookie).  </p>
  
  <p>The web service is at - "http://[some ip goes here]:8989/MyAPI.asmx".  </p>
  
  <p>I've tried:<br>
  http://[ip] ,<br>
  http://[ip]:8989 ,<br>
  http://[ip]:8989/MyAPI.asmx  </p>
  
  <p>All of these cause runtime error.</p>
  
  <p><strong>I've also tried the ip alone</strong> (i.e. 100.10.10.10) , which doesn't cause a runtime error, and sets the cookie, but the cookie is never sent when I invoke a web method.   </p>
  
  <p>Here's my code for setting the domain:  </p>
  
  <pre><code>if (!string.IsNullOrEmpty(currentSessionID))
  {
     req.CookieContainer=new CookieContainer();
     Cookie cookie = new Cookie("ASP.NET_SessionId", currentSessionID);
     cookie.Domain = GetCookieUrl();  //&lt;- What should this be?
     req.CookieContainer.Add(cookie);
  }
  </code></pre>
  
  <p>So what should the domain be?  </p>
  
  <p>Thanks.</p>