Click here to Skip to main content
16,016,088 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a smart device project in VS 2008 c#.
This project invoke wcf services, which return json data.

I am desrializing json data and added reference as System.Web.Extensions.dll 3.5
Here is a my code...

===========
HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse();
StreamReader loResponseStream = new StreamReader(webresponse.GetResponseStream(), enc);
string strResult = loResponseStream.ReadToEnd();
RootObject ss = new JavaScriptSerializer().Deserialize<rootobject>(strResult);
foreach (var item in ss.IsValidStatus)
{
sRetMessage = item.RtnMessage;
}
===========
However this code working properly, if i execute exe file from \bin\debug\SmartAppl.exe
But, if i deploy and run in device, it throws error as "could not load the assembly from .net framework".
I have set System.Web.Extensions.dll to LocalCopy=True also.

Why this is happening?
Is there any dll to deserialize json data for smart device ?

Please help me.

Thanks
Posted

1 solution

You need to install .net framework on device only WM 6.1 or 6.5 has built in
the framework location its at C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE depends on device which .CAB have to install

and to deserialize JSON download library from here http://json.codeplex.com/releases/view/50552
Unzipped and use the Newtonsoft.Json.Compact.dll on the Json35r8/Bin/Compact Folder

i hope this be helpfull
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900