Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

FedAuth Cookie via CSOM and Cannot contact site at the specified URL

$
0
0

Hi,

We have a Sharepoint 2013 web application with ADFS as the Trusted Identify provider.  

.NET MVC4 app with WIF 4.5 is also setup as the relying party with the same ADFS server.  

If I browse the .NET application , it gets redirected to ADFS, gets authenticated and a fedauth cookie is received. Now, if I browse the sharepoint web application in the same browser , existing fedauth cookie is used and the user is automatically granted access to the sharepoint web app (working as expected).

Now, .NET app needs to access the web application via CSOM.  The .NET app is authenticated via ADFS and fedauth cookie is received as 2 chunks (fedauth, fedauth1) . Now, I simply read those cookies and attach it , using the below code to clientcontext.

e.WebRequestExecutor.WebRequest.CookieContainer = cookies

I get the error 

Cannot contact site at the specified URL "url"System.Exception {Microsoft.SharePoint.Client.ClientRequestException}


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>