Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I use a provider hosted Apps, so need to work with an App Web and Lists.

Could anybody provide a code snippet to get ClientContext() of the App?

Can I do something like this?

Uri appWeb = new Uri(HttpContext.Current.Request.QueryString["SPAppWebUrl"]);
using (var clientContext = TokenHelper.GetS2SClientContextWithWindowsIdentity(appWeb, HttpContext.Current.Request.LogonUserIdentity))
{
   ...
}
share|improve this question
3  
Have you seen this blog greggalipeau.com/category/sharepoint-2013/apps/… –  Robert Lindgren Apr 17 '13 at 14:08
    
@RobertLindgren, Thanks a lot! It's a very helpful site for me! –  Warlock Apr 17 '13 at 14:10
    
Seemed to be! Good luck! –  Robert Lindgren Apr 17 '13 at 14:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.