Web Service login (demo application phonebook)


I’m trying to consume WebService from demo application named phonebook using C#.NET Windows Forms

Just adding Web reference and then:

        ws.SiteControllerService scs = new ws.SiteControllerService();

        ws.Contact[] contacts = new ws.Contact[10];

        contacts = scs.getContacts(); //ok, all contacts received

        ws.Contact update = new ws.Contact();

        scs.login("demo", "demo"); //ok, returning "true"

        update.name = "New Contact";

        update.phone = "77-66-88";

        scs.saveContact(update); //exception - Login required.

I think this is .NET issue, not Yii, but however, can someone help to make Yii interoperable to .NET

Thank you.

I attached a CookieContainer in a similar case (testing interoperability).

ws.CookieContainer = new System.Net.CookieContainer();


Great, that works. Thank You, Tommy