asp.net - service reference wont update when I add a radtreeView? -


i have web service project referenced project. in web service have function want use populate telerik radtreeview. webservice builds if try update/add web service main project error:

metadata contains reference cannot resolved: 'http://localhost:49304/service1.asmx'.  there error downloading 'http://localhost:49304/service1.asmx/_vti_bin/listdata.svc/$metadata'. 

the request failed error message:

request format unrecognized url unexpectedly ending in '/_vti_bin/listdata.svc/$metadata'.

this simplified version of web service class i'm writing:

  namespace mcmwebservice {`   [webservice(namespace = "http://tempuri.org/")] [webservicebinding(conformsto = wsiprofiles.basicprofile1_1)] [system.componentmodel.toolboxitem(false)]    [scriptservice] public class service1 : system.web.services.webservice {   [webmethod]     public bool getbool(radtreeview treesites, string demogs) {  //dummy method         return true;     } } 

if remove telerik radtreeview parameter update, know that's issue. main project has telerik.web.ui , skins dll. there reference or tag need add main project or in web.config? please help!

thanks

will

it looks wcf doesn't know how serialize telerik control, either pass wcf simple type variable or create own serializer it.

you should create own tree class can pass between wcf service , client data contract in wcf , expose client,

also can't create same class both in client , service side. wcf creates it's own proxy when reference , therefore needs declares datacontract in wcf.

that's how usually:

[datacontract] public class youtelerikdata {     // apply datamemberattribute property.     [datamember]     public string somedata {get; set; }     [datamember]     public int someint {get; set;} } 

and pass above class wcf service, serialize correctly

[operationcontract] bool senddata(yourtelerikdata somedata); 

however, hard assume need pass tree (as control name suggests).

i have found solution problem here:

passing recursive collection through wcf


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -