Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi everyone
i created this method in me web service

[WebMethod]
public XmlReader fromxml()
{
XmlReader x;
cmd.Connection = conn;
cmd.CommandText = "selete* from test_emp";
conn.Open();
x = cmd.ExecuteXmlReader();
conn.Close();
x.Read();
return x;
}
and in silverlight

s.fromxmlCompleted +=new EventHandler<fromxmlCompletedEventArgs>(s_fromxmlCompleted);
s.fromxmlAsync();

}
void s_fromxmlCompleted(object sender, fromxmlCompletedEventArgs e)
{
if (e.Result != null)
{
SilverlightApplication34.ServiceReference1.XmlReader x;




}
}

and i want get this from web service to my silverlight apps
when try give me error
The remote server returned an error: NotFound.

and x not have any thing else this medthod
x.PropertyChanged

thanks for any help
Posted

Couple of suggestions:

1. Make sure that you can access clientaccesspolicy.xml & crossdomain.xml from the machine which is giving problem.

2. By default, WCF service adds wsHttpBinding. Change it to basicHttpBinding.

The highlighted error may go off.
 
Share this answer
 
Comments
Mostafa Elsadany 27-Oct-11 23:40pm    
thanks i added clientaccesspolicy.xml this
but not work
And when you fix the NotFound error...

You don't pass XmlReader objects. You'd pass Xml data and use Silverlight's XmlReader class to parse it....
 
Share this answer
 
v2
Comments
Mostafa Elsadany 27-Oct-11 23:44pm    
can you give me any example link for this

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