Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Problem with the latest tutorial (WCF WebService + LINQ + SQL)
1 replies. Latest Post by Maciek on April 9, 2008.
(0)
Maciek
Member
123 points
108 Posts
04-09-2008 1:24 PM |
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
04-09-2008 5:49 PM |
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 ?