I have 2 web applications.
The first web application contains ASP.NET web pages and used a Membership provider for authentication.
The second web application is strictly
Here is what I did to solve the problem.
dbContext.BuildingRequest += AddCookie;
private void AddCookie(object sender, Microsoft.OData.Client.BuildingRequestEventArgs e)
{
var authCookie = HttpContext.Current.Request.Cookies(".TESTAUTH");
e.Headers.Add("Cookie", ".TESTAUTH=" + authCookie.Value);
}