I have a requirement to send secured cookies from WCF to MVC application.
I have 2 WCF application; WCF1 is in house service and WCF2 is an external service. I am consuming WCF2 service in WCF1; WCF2 returns data along with secured cookies to WCF1. I want to send this secured cookies from WCF1 to my mvc application (MVC application
consumes WCF1 service)
how can I pass the secured cookies from WCF2 to mvc application via WCF1?
I have a requirement to send secured cookies from WCF to MVC application.
I have 2 WCF application; WCF1 is in house service and WCF2 is an external service. I am consuming WCF2 service in WCF1; WCF2 returns data along with secured cookies to WCF1. I want to send this secured cookies from WCF1 to my mvc application (MVC application
consumes WCF1 service)
how can I pass the secured cookies from WCF2 to mvc application via WCF1?
Thanks
Selvakumar R
The design sounds questionable and probably needs rethinking as cookies are browser state management not code. Nonetheless a cookie is just a header in an HTTP response. The MVC app must contact WCF1 and request the cookie perhaps by exchanging credentials.
Or the MVC app can ask WCF2 to get the cookie from WCF1 and pass it back to the MVC. If the cookie contents is encrypted, that might cause issue depending on how the cookie is used.
Member
20 Points
59 Posts
How to pass cookies from WCF to MVC application
Jul 17, 2018 03:36 AM|Selvakumar Ramachandran|LINK
Hi,
I have a requirement to send secured cookies from WCF to MVC application.
I have 2 WCF application; WCF1 is in house service and WCF2 is an external service. I am consuming WCF2 service in WCF1; WCF2 returns data along with secured cookies to WCF1. I want to send this secured cookies from WCF1 to my mvc application (MVC application consumes WCF1 service)
how can I pass the secured cookies from WCF2 to mvc application via WCF1?
Thanks
Selvakumar R
All-Star
53001 Points
23591 Posts
Re: How to pass cookies from WCF to MVC application
Jul 17, 2018 02:45 PM|mgebhard|LINK
The design sounds questionable and probably needs rethinking as cookies are browser state management not code. Nonetheless a cookie is just a header in an HTTP response. The MVC app must contact WCF1 and request the cookie perhaps by exchanging credentials. Or the MVC app can ask WCF2 to get the cookie from WCF1 and pass it back to the MVC. If the cookie contents is encrypted, that might cause issue depending on how the cookie is used.
What is stopping you from passing data?