Answered by:
ADFS 3.0 Refresh token time to live with .NET WIF application

Question
-
The problem is we use a lot of XHR requests to post and get data, if the client is sitting on a web form and the token has expired and they do a post using AJAX to send data to the server the request fails, and they lose their data. If they refresh the page IIS redirects to the ADFS server which then redirects back to our web application and they lose their data.
Once the token is expired and there is a AJAX request to the sever the request is redirected to the IDP url then the response fails with the CORS javascript error.
Access to XMLHttpRequest at has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
My question is in this scenario how can I refresh the token before it expires with a WIF .Net web application?- Edited by AaronAssetworks Friday, January 17, 2020 10:45 PM
- Moved by Xingyu ZhaoMicrosoft contingent staff Sunday, January 19, 2020 7:25 AM
Friday, January 17, 2020 10:41 PM
Answers
-
Might try asking for help over here.
https://forums.asp.net/25.aspx/1?Security
https://forums.asp.net/1022.aspx/1?ASP+NET+AJAX+Ajax+Control+Toolkit+ACT+
https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=ADFS
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Richard MuellerMVP Sunday, January 19, 2020 7:03 PM
- Marked as answer by Richard MuellerMVP Monday, January 27, 2020 10:58 AM
Sunday, January 19, 2020 8:23 AM
All replies
-
Hi AaronAssetworks,
Thank you for posting here.
Since your question is related to web application, I have moved the thread to where is the forum for forum which can help you find the correct forum to go ask questions.
Thank you for your understanding.
Best Regards,
Xingyu Zhao
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Sunday, January 19, 2020 7:24 AM -
Might try asking for help over here.
https://forums.asp.net/25.aspx/1?Security
https://forums.asp.net/1022.aspx/1?ASP+NET+AJAX+Ajax+Control+Toolkit+ACT+
https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=ADFS
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Richard MuellerMVP Sunday, January 19, 2020 7:03 PM
- Marked as answer by Richard MuellerMVP Monday, January 27, 2020 10:58 AM
Sunday, January 19, 2020 8:23 AM