Pessoal,
Ao consumir o wcf na aplicação SilverLight está gerando o seguinte erro:
The remote server returned an error: NotFound
Alguem sabe o que pode ser?
Segue código:
private
void
button1_Click(object
sender, RoutedEventArgs
e)
{
//var proxy = new ServiceReference1.Service1Client("BasicHttpBinding_IService1");
//proxy.GetCustomersCompleted += new EventHandler<ServiceReference1.GetCustomersCompletedEventArgs>(proxy_GetCustomersCompleted);
//proxy.GetCustomersAsync(txtLogin.Text);
try
{
Service1Client
client = new
Service1Client();
client.GetCustomersCompleted +=
new
EventHandler<ServiceReference1.GetCustomersCompletedEventArgs>(client_GetCustomersCompleted);
client.GetCustomersAsync(txtLogin.Text);
}
catch
(Exception
ex)
{
throw
ex;
}
}
void
client_GetCustomersCompleted(object
sender, ServiceReference1.GetCustomersCompletedEventArgs
e)
{
try
{
dataGrid1.ItemsSource = e.Result;
}
catch
(Exception
ex)
{
throw
ex;
}
}
Abraços.
Leandro