Windows Azure Platform Developer Center >
Azure Forums
>
Live Framework
>
New MeshObject does not look initialized and Add throws
New MeshObject does not look initialized and Add throws
- This is my first Mesh App, SilverLight, I already fixed permissions
I am trying to add new MeshObject
MeshObject m = new MeshObject("Ancestry News");
The MeshObject fields are null except for the title I set.
I try to add (maybe will init properly)
liveOperatingEnviroment.Mesh.MeshObjects.Add(ref m); Everytime I get exception "Live operation failed, please review the innerException for transport level exception details"
innerException is null (how helpfull...)
I watch Ori do this in a demo over and over, but it does not work for me. Any ideas?
--Ben
Answers
- Ben,
A Mesh-enabled Silverlight application can create and manipulate objects within the application's data feeds. The application itself is a Mesh Object, so you already have one to play with. A desktop .NET app doesn't have its own Mesh Object, so it has to create one or get access to somebody else's object.
Try something like this in your meshAppLoaded event:
var myfeed = new DataFeed("myfeed");meshApp.DataFeeds.Add(
ref myfeed);
You can then play around with creating and adding DataEntries to that DataFeed.
You can use the LivefxResourceBrowser (at C:\Program Files\Microsoft SDKs\Live Framework SDK\v0.9\Tools) to view the results of your feed manipulations. Look for your application name in the Mesh Objects list, then click on the LiveFX/DataFeeds link in your application mesh object. You should see an entry in there with a title of "myfeed" (or whatever you called your feed in the sample code above). Click on the "LiveFX/DataEntries" link to see the data entries you've added to your feed.
You probably don't want to create a new data feed every time you run the app, so you'll need to add some code to the sample above to scan your app's data feeds (use meshApp.DataFeeds.Entries) to see if your data feed has already been created, and if it has not, create it.
-Danny
http://dannythorpe.com- Proposed As Answer byVikas-AhujaMSFT, ModeratorMonday, November 10, 2008 5:29 PM
- Marked As Answer byBen42 Monday, November 10, 2008 5:31 PM
All Replies
- Ben - sorry for delayed response.
Please provide us with more details:
a) can you post the full code into this thread? Remove your username/password from the code
b) Are you running against Live Framework Client or in uploaded in Developer Sandbox
thanks!
This posting is provided "AS IS" with no warranties, and confers no rights. - Thanks for looking,
This is my first two lines of code on this. I created a new Silverlight Mesh project and in
void meshAppLoaded(object sender, EventArgs e)
I start by creating MeshObject, Is there other suff I must do first? It just looks like below
MeshApplicationService meshApp = Application.Current.GetMeshApplicationService(); LiveOperatingEnvironment liveOperatingEnviroment = meshApp.LiveOperatingEnvironment; MeshObject m = new MeshObject("Ancestry News");liveOperatingEnviroment.Mesh.MeshObjects.Add(
ref m);
I do not have any of my own login code, but when I run it does successfully connect via Live ID and I do see I successfully added app to my mesh, so it appers to be connecting...
? Are you running against Live Framework Client or in uploaded in Developer Sandbox
This is the URL
https://developer.mesh-ctp.com/Web/Desktop.aspx?AppInstUrl=Mesh/InstalledApplications/VONMRF5WYMYUPE322APSFHL27E-MQRVTF5MAVDUFMIPY623UYQQ64/ApplicationInstances/RMZ25FGAINTUHJCLTZ3QKEPFUY - I talked to Ori as well to confirm this. I believe Ori is demo is
a) using WPF
b) .NET API Kit (not Silverlight API Kit)
c) is an application that utilizes Live Framework, connects to Live Services and is not hosted into developer sandbox
You app is an Mesh-enabled web application i.e. application that is hosted inside developer sandbox and using Silverlight API Kit. In Mesh-enabled web applications we don't allow creation of mesh objects for security reasons. You can access Mesh Object but not create one from Mesh-enabled web application.
This posting is provided "AS IS" with no warranties, and confers no rights. - I thought I needed MeshObject as root object and so it can be shared?
Can I really do anything with out MeshObject?
--Ben - Ben,
A Mesh-enabled Silverlight application can create and manipulate objects within the application's data feeds. The application itself is a Mesh Object, so you already have one to play with. A desktop .NET app doesn't have its own Mesh Object, so it has to create one or get access to somebody else's object.
Try something like this in your meshAppLoaded event:
var myfeed = new DataFeed("myfeed");meshApp.DataFeeds.Add(
ref myfeed);
You can then play around with creating and adding DataEntries to that DataFeed.
You can use the LivefxResourceBrowser (at C:\Program Files\Microsoft SDKs\Live Framework SDK\v0.9\Tools) to view the results of your feed manipulations. Look for your application name in the Mesh Objects list, then click on the LiveFX/DataFeeds link in your application mesh object. You should see an entry in there with a title of "myfeed" (or whatever you called your feed in the sample code above). Click on the "LiveFX/DataEntries" link to see the data entries you've added to your feed.
You probably don't want to create a new data feed every time you run the app, so you'll need to add some code to the sample above to scan your app's data feeds (use meshApp.DataFeeds.Entries) to see if your data feed has already been created, and if it has not, create it.
-Danny
http://dannythorpe.com- Proposed As Answer byVikas-AhujaMSFT, ModeratorMonday, November 10, 2008 5:29 PM
- Marked As Answer byBen42 Monday, November 10, 2008 5:31 PM
Ben42:
I would love to hear what is your scenario; in addition i would love to undertand if the data feed approach solve your issue
thanks
Andres Sanabria
Senior Program Manager
Live Framework team
AndresS- I was only trying to create new MeshObject because I thought that was the first step (from demo I saw), using the existing MeshObject works fine.
In the end it was the data feed I was trying to get to.
I am now adding to data feed and it is working.
thanks,
Ben - Thanks for your feedback.. I just open a bug to track this issue..
AndresS


