asp.net - Send Authorization cookie when calling OData service -


I have 2 web applications.
The first web application contains ASP.NET web pages and a subscription provider has been used for authentication. The second web application is strictly an Odata Web API site that requires authentication.

Both the sites on the Web site have "machine validity key / decryption" and both are using "form" authentication, similarly "name of the form .testAUTH" < P> When I call the OData service and inspect the identity for both threads and httpcontext, they are both empty and certified for the name.

So how can I identify Odata? TETATU cookie?




Edit: Well, that's what I did. It does not seem right, but if someone knows better, please let me know

  dbContext.BuildingRequest + = AddCookie; Private Zero AddCookie (Object Sender, Microsoft.odata.Client.BuildingRequestEventArgs E) {var authCookie = HttpContext.Current.Request.Cookies ("Testwath"); E.Headers.Add ("cookie", ".teastAUTH =" + authCookie.Value); }    

I have done this to solve this problem.

  dbContext.BuildingRequest + = AddCookie; Private Zero AddCookie (Object Sender, Microsoft.odata.Client.BuildingRequestEventArgs E) {var authCookie = HttpContext.Current.Request.Cookies ("Testwath"); E.Headers.Add ("cookie", ".teastAUTH =" + authCookie.Value); }    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -