Page view counter
Problem with the latest tutorial (WCF WebService + LINQ + SQL) Subscribe to this thread
Last post 04-09-2008 5:49 PM by Maciek. 1 replies.
Sort Posts:
04-09-2008 1:24 PM
Problem with the latest tutorial (WCF WebService + LINQ + SQL)

 Hi all,

I believe I've managed to follow everything that has been said in the tutorial. When I've run the application, I've a single character in teh textbox and pressed the "Search" button. After that the browser's window went white. I've restarted the whole thing in debug mode and it turned out that the problem came from here :
 

void Search_Click(object sender, RoutedEventArgs e)
{
   ServiceReference1.Service1Client webService =
    new SQLData.ServiceReference1.Service1Client();
  webService.GetCustomersByLastNameCompleted +=
    new EventHandler<SQLData.ServiceReference1.
    GetCustomersByLastNameCompletedEventArgs>
    (webService_GetCustomersByLastNameCompleted);
    webService.GetCustomersByLastNameAsync(LastName.Text);
}
 
The bolded line of code returns a null  for some reason and thus is unable to run further. Can anyone suggest a solution to this ?
PS. As Jesse wrote in the tutorial, I've enabled the serialisation on the *.dbml's datacontext and I've modified the entry in web.config to use "basicHttpBinding" . Have I missed something ?
 
Sincirely 
Maciek

Loading...
Joined on 02-11-2008
Posts 103
04-09-2008 5:49 PM
Marked as Answer
Re: Problem with the latest tutorial (WCF WebService + LINQ + SQL)

 Weird, I've compiled the whole thing again and it worked. Can anyone tell me what could be the reason to the ServiceClient() constructor returning a null in the first place ?

Maciek

Loading...
Joined on 02-11-2008
Posts 103
Microsoft Communities