문제

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

도움이 되었습니까?

해결책

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?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top