Navid777
Navid777

Reputation: 3681

how can I retrieve a cookie that is sent by a WebService

There is a webService in a server that my HTML code POSTs a form to it and receives an answer from the webService. but when the webService is called, it sends a cookie with name "ASP.NET_SessionId" (it's value is something like "bmbggmfm2rsi0rvspq5eiqrv"), can I retrieve this cookies value in my HTML code ?

Upvotes: 0

Views: 93

Answers (1)

Stan
Stan

Reputation: 8768

If I understand you right, you POST some data to a domain different to your page's origin, and want to read a cookie sent from that domain. This is not possible due to security restrictions.

Depending from your needs, there could be a workaround. For example, if you need some kind of session identifier, and this information is considered as legitimate to read, then great chances are that the webservice provides a special method to read the info.

Upvotes: 1

Related Questions