Service Reference Added, but cant access it :(

Aug 10, 2007 at 12:09 PM
Hi All,

I have successfully added my Service as reference to the Client Project thats there by default in the WCF Guidance Package Solution

I have exposed my service as Advanced Web Services Interoperability (Duplex Communication)

I hosted in my local IIS (IIS version 7) and added it as reference to the TestClient

But I get this error when I try to create object of my service and use it,

Here is the error,

Error 4 Invalid token '(' in class, struct, or interface member declaration F:\Microsoft Patterns and Practices\WCF Hands On Lab\EducatorService\Tests\EducatorService.Client\MainForm.cs 14 17 EducatorService.Client

And the source is ,

   namespace EducatorService.Client
   {
        public partial class MainForm : Form
        {
           Educator.EducatorClient ec = new EducatorService.Client.Educator.EducatorClient();
           ec.Close();
 
           public MainForm()
           {
               InitializeComponent();
            }
 
            private void ExecuteButton_Click(object sender, EventArgs e)
            {
                //TODO: Call proxy method
            }
         }
     }

Any ideas ? What mistake am I doing here ?

Thanks,

----
Regards,
Chaks
Aug 12, 2007 at 7:25 PM
Hi All,

Not sure what was the mistake, but i redid the app and everything is working....

----
Regards,
Chaks