locked
The type name 'ServiceReference1' does not exist in the type 'Test.ServiceReference1.Test' RRS feed

  • General discussion

  • Hi,

    I am trying to consume the WCF Service in my Silverlight, I have added a service reference. But I am getting the error message: The type name 'ServiceReference1' does not exist in the type 'Test.ServiceReference1.Test'

    Find My Code below:-

    using Test1 =Test.ServiceReference1.Service1Client;

    namespace Test

    {

    public partial class MainPage: UserControl

    {

    public MainPage()

    {

    InitializeComponent();

    label1.Content ="Welcome";

     }

    protected void obj_ITestCompleted(object sender, ServiceReference1.ITestCompletedEventArgs e)

    {

    }

    public void NewServicetest()

    {

    Test1 obj = new Test1();

    obj.ITestAsync(1);

    obj.ITestCompleted +=new EventHandler<ServiceReference1.ITestCompletedEventArgs>(obj_ITestCompleted);

    }

    private void button1_Click(object sender, RoutedEventArgs e)

    {

    NewServicetest();

    }

    }

    }

    Thursday, October 13, 2011 11:01 AM

All replies

  • Hi Rahul_agg11,

    The code you post above should work.

    Please post in which row the above exception is thrown and post code of that row.

     

    Best Regards,

    Monday, October 17, 2011 6:00 AM