wcf communication error
-
Hi, I am using silverlight 4 in vs 2010 I have created a solution with the following projects. Web project to host the silverlight app Silverlight project with silverlight pages. wcf project. All compiles. I have added the wcf as service references to the silverlight application. There is a clientaccesspolicy.xml folder inside the wcf project Do you see why the following error occurs please? Thanks The error I get is: CommunicationException was unhandled by user code The remote server returned an error: NotFound. This is the code in the silverlight page: private void UserControl_Loaded(object sender, RoutedEventArgs e) { myService.myClient client = new myService.myClient(); client.GetAllDataCompleted += new EventHandler<myService.GetAllDataCompletedEventArgs>(client_GetAlldataCompleted); client.GetAlldataAsync(); } private void client_GetAllDataCompleted(object sender, myService.GetAllDataCompletedEventArgs e) { grid.DataContext = e.Result; }
-
Hi, I am using silverlight 4 in vs 2010 I have created a solution with the following projects. Web project to host the silverlight app Silverlight project with silverlight pages. wcf project. All compiles. I have added the wcf as service references to the silverlight application. There is a clientaccesspolicy.xml folder inside the wcf project Do you see why the following error occurs please? Thanks The error I get is: CommunicationException was unhandled by user code The remote server returned an error: NotFound. This is the code in the silverlight page: private void UserControl_Loaded(object sender, RoutedEventArgs e) { myService.myClient client = new myService.myClient(); client.GetAllDataCompleted += new EventHandler<myService.GetAllDataCompletedEventArgs>(client_GetAlldataCompleted); client.GetAlldataAsync(); } private void client_GetAllDataCompleted(object sender, myService.GetAllDataCompletedEventArgs e) { grid.DataContext = e.Result; }
Have you got the service URL correctly confugured? Check the config file.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick Visit the Hindi forum here.
-
Have you got the service URL correctly confugured? Check the config file.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick Visit the Hindi forum here.
-
Which config file do you mean? web.config in the WCF ? How do I know it is properly configured? Thanks
No the config file on the client side - serviceclient.config.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick Visit the Hindi forum here.
-
Hi, I am using silverlight 4 in vs 2010 I have created a solution with the following projects. Web project to host the silverlight app Silverlight project with silverlight pages. wcf project. All compiles. I have added the wcf as service references to the silverlight application. There is a clientaccesspolicy.xml folder inside the wcf project Do you see why the following error occurs please? Thanks The error I get is: CommunicationException was unhandled by user code The remote server returned an error: NotFound. This is the code in the silverlight page: private void UserControl_Loaded(object sender, RoutedEventArgs e) { myService.myClient client = new myService.myClient(); client.GetAllDataCompleted += new EventHandler<myService.GetAllDataCompletedEventArgs>(client_GetAlldataCompleted); client.GetAlldataAsync(); } private void client_GetAllDataCompleted(object sender, myService.GetAllDataCompletedEventArgs e) { grid.DataContext = e.Result; }
One tool I always find useful in diagnosing any network application, is wireshark. With this, you can see what exactly the client is asking for, and what exactly is being returned... Once you know whats going on 'over the wire' you can work back through your code & configuration to figure out what the problem is...