web services - c# webservice class response -
i have class:
public class loginresponse { public string sessionid { get; private set; } public datetime? activeto { get; private set; } public loginresponse() { } public loginresponse(string sessionid, datetime? activeto) { this.sessionid = sessionid; this.activeto = activeto; } }
and want return class webservice response:
[webmethod] public loginresponse login(string login, string password) { return new loginresponse("a", null); }
the class loginresponse in other dll. must do, because got error??
the errors told must using attribute webmethodattribute or change root type using xmlrootattribute, because loginresponse refers method or type
i have solution:
i must change function name login :) it's name servicelogin , works fine :)
regards
Comments
Post a Comment