Quantcast
Viewing all articles
Browse latest Browse all 1485

UAG authentication from code

Hi Experts,


I'm trying to write some simple .NET code to authenticate programmatically against a UAG 2010 (SP3) server. All I care about at this moment is authenticating a session, once I can nail that I will move on to accessing resources behind the UAG

I am using guidance from some links but I am unable to post them since my account isn't authorized to post links, so I'm posting them as text

usingnat.net/sharepoint/2011/2/23/how-to-programmatically-authenticate-to-uag-protected-sharep.html
stackoverflow.com/questions/11875646/how-to-authenticate-programmatically-to-uag-for-sharepoint-with-windows-phone-ap

However, every time I try and authenticate, I check in the UAG Web monitor and the session remainds unauthenticated. I am hardcoding the user credentials within the post. The basic method I'm following is:

1) Do a GET on the login page, get the cookie

2) Do a POST on the login page with encrypted user credentials (passed through the headers) and the cookie obtained from step 1.

I have tried everything now but the session simply won't authenticate. I can authenticate using a browser without a problem, so I know UAG is working. Do I need to make any configuration changes to either UAG or TMG to allow it to authenticate programmatically?

I have also used fiddler2 to trace the headers being exchanged, and from what I can tell all the right information is being sent to the UAG server, but authentication is failing. 

Any help is much appreciated

Thanks 



Viewing all articles
Browse latest Browse all 1485

Trending Articles



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