I am following this article- http://chakkaradeep.com/index.php/building-apps-for-sharepoint-with-mvc/ to learn building Provider Hosted Apps in SharePoint. I have one developer site collection (I am the administer of the same).

I followed exact steps in the article but somehow I am always getting null value in var clientContext = spContext.CreateUserClientContextForSPAppWeb()

I tried giving full read write access to Site Collection as well as particular List I am trying to access. I know it doesn't have to do with the permissions of the application.

I get the context when I try var clientContext = spContext.CreateUserClientContextForSPHost()but not with var clientContext = spContext.CreateUserClientContextForSPAppWeb()

I am very new to SharePoint 2013 and Provider hosted apps. Hope someone will help me out..

Regards, RP

1 Answer 1


You need to have app web for that. In provider hosted app, app web is not present by default. Create an empty module or list in your app web; basically in SP project which gets created when you create a provider hosted app and then you will have context.

Besides that, why do you need context of app web of you don't have anything in there?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.