SharePoint AppWeb URL is not passed in query string
-
Thursday, November 15, 2012 10:34 PMModerator
I was getting errors because SPAppWebUrl wasn't being passed in the query string.. finally found this blog:http://rainerat.spirit.de/2012/10/05/sharepoint-2013-apps-csom-vs-rest/ with the solution..
Right click on "SharePoint" .. Add New Item.."Empty Element"
Brandon - what was your repro where you were seeing the problem?
- Split by Brian Moore - MicrosoftMicrosoft Employee, Moderator Friday, November 16, 2012 5:23 PM new topic
- Edited by Brian Moore - MicrosoftMicrosoft Employee, Moderator Friday, November 16, 2012 5:27 PM
All Replies
-
Friday, November 16, 2012 5:31 AM
Brian - What I did was:
Create a new Lightswitch Html Client Project. Enable SharePoint, connecting to an office 365 developer SharePoint 2013 site. Add in the Page_Load code from the example that passes the querystring parameters along. Run the project. In the querystring for the Client/default.htm SPHostURL and some other variables are set, but not SPAppWebUrl.
To fix, go into the project, right click on "SharePoint" and add any element, and then redeploy. The querystring now has SPAppWebUrl
-
Friday, November 16, 2012 4:11 PMModeratorThanks Brandon - we'll have a look...
-
Friday, November 16, 2012 4:53 PM
Hi Brandon-
As you mentioned, the app web isn't created until you've added at least one SharePoint asset into the nested SharePoint project that exists within your LightSwitch application.
When you ran into this issue, were you following the Survey App Tutorial? If so, the sequence of the steps described in the tutorial are very important to follow because step 6.3 has you add a Picture Library to the SharePoint project (which will cause the app web to be created) before you access the app web URL in the Page_Load method in step 6.5.
Let me know if you have any other questions about this.
Thanks,
Nicole- Proposed As Answer by Beth MassiMicrosoft Employee, Owner Saturday, November 17, 2012 2:02 AM
- Marked As Answer by Brian Moore - MicrosoftMicrosoft Employee, Moderator Monday, November 19, 2012 7:31 PM
-
Saturday, November 17, 2012 5:47 PM
Nicole,
You are correct. I was following along with the Survey App Tutorial, but not following all of the steps exactly. I did not occur to me that step 6.3 was required to create the app web which would give access to the AppWebUrl.

