简体   繁体   中英

Ajax call to a rest service behind an adfs

I am exposing some Rest services through an MVC 4 (.net) project. They are deployed behing an adfs authentication server. Other applications, that are behind the same ADFS are calling my services through ajax calls.

The problem is that the calls are stuck on the adfs. Even though the user was authenticated when he logged into the application, the auth cookie is under the app domain, and obviously not in the services server domain.

The cookies are locked under httpOnly, so i can't duplicate them for my services server (justifiably so). Is there a way to "steal" the cookies, or maybe another work around?

I think you are using Web API services. If so, please check whether your services are CORS support enabled or not.

Please go through http://brockallen.com/2012/06/28/cors-support-in-webapi-mvc-and-iis-with-thinktecture-identitymodel/

it may helps you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM