Nov 042008

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.

  1. 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.
  2. In VS, press F5 again to verify that your mesh app starts up in Live Desktop in the browser, under VS debugger control.
  3. Close the Live Desktop browser to end the debug session.
  4. Open a new browser window and log into Live Desktop (
  5. Select the Apps page. 
  6. Find your mesh app in the list of installed mesh apps.  Click on the name of your mesh app instance to view its details page.

The permissions listed on the details page will look like this:

Read access to my Live Mesh object
Read access to my Windows Live Contacts
Read access to my Live Mesh User News

To adjust the permissions to the correct default values, click on the “Edit” link in the top right corner of the panel.

An “Access Permission” page will be displayed.  Click Cancel to return to the app instance list. 

Click on the app instance link in the installed applications list to view the app’s details page again.

The app permissions should now look like this:

Read access to my Windows Live Profiles
Read access to my Live Mesh Devices
Read and update access to my Windows Live Contacts
Full access to my Live Mesh User News

Your mesh app can now write to its contacts and news feeds.

This permissions adjustment only needs to be done once after the VS tools have uploaded the app for the first time.  Subsequent edits & updates by VS will not change the permissions.

This default permissions bug will be fixed in the next update of the VS tools.

 Originally posted in the Live Framework discussion forum

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

  1. 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?

    On a related note, would you be able to answer the question I raised here:
    Why does Visual Studio update individual app resources rather than follow the documented workflow up uploading a zip file?

  2. Hi Oran,

    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.

  3. 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.

Sorry, the comment form is closed at this time.