We’ve discovered a bug in how the Live Framework Tools for Microsoft Visual Studio (“VS tools”) set permission values for Live Mesh-enabled web apps uploaded using the VS tools. This results in your mesh app running with fewer permissions than the intended default permission set, which will prevent your app from modifying mesh feeds for contacts or news.

You can fix the default permissions on your app after you perform the first upload steps in VS and the dev portal.

Perform the first-time app upload steps in VS to upload the zip to the dev portal and set the app self link in the VS project.

In VS, press F5 again to verify that your mesh app starts up in Live Desktop in the browser, under VS debugger control.

4 Responses to “Fixing Default Permissions in Mesh Apps Created With Live Framework Tools for Microsoft Visual Studio”

Thanks for the info. I’m not sure I’m reading this correctly, are you saying that the permissions set by uploading the initial zip file are correct, but subsequent file uploads by Visual Studio undo the permissions?

Correct, the default permissions are set correctly by the dev portal when you manually upload the zip file, but when VS creates its debug copy of the app resources the permissions we set are the wrong names. (We missed the internal memo…)

VS creates a new application resource to debug upon to avoid automatic updates from updating the app while we’re debugging it. We set the version number of the debug app resource to a value greater than the app.CurrentVersion. This effectively removes our debug app resource from the automatic update pool. If the root application gets updated with changes from some other source, those changes will not be pushed into our debug resource feed. If the application.CurrentVersion catches up to or exceeds our debug app resource version, we rev our version number to keep ourselves isolated.

On your second question, the reason we upload files individually instead of uploading the zip file is because the REST API we’re uploading to doesn’t handle zip files. The dev portal that you manually upload your zip file to unzips the file and uploads the individual bits to the production storage. The Live Services REST APIs that the VS tools use to upload files goes (as far as I know) straight into the production storage.

In a nutshell, the dev portal that you see in your web browser is just a front end to the actual cloud service. VS doesn’t upload to the dev portal UI, it uploads to the cloud itself.

Keep in mind that the long side trip of manual steps that you currently have to go through to get a new app created and uploaded to the cloud will all be going away as soon as the cloud APIs to create and provision a new application are implemented.