Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. wcf communication error

wcf communication error

Scheduled Pinned Locked Moved WPF
csharpcssvisual-studiowcfsysadmin
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    arkiboys
    wrote on last edited by
    #1

    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; }

    A I 2 Replies Last reply
    0
    • A arkiboys

      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; }

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      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.

      A 1 Reply Last reply
      0
      • A Abhinav S

        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.

        A Offline
        A Offline
        arkiboys
        wrote on last edited by
        #3

        Which config file do you mean? web.config in the WCF ? How do I know it is properly configured? Thanks

        A 1 Reply Last reply
        0
        • A arkiboys

          Which config file do you mean? web.config in the WCF ? How do I know it is properly configured? Thanks

          A Offline
          A Offline
          Abhinav S
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • A arkiboys

            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; }

            I Offline
            I Offline
            InfRes
            wrote on last edited by
            #5

            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...

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups