views:

27

answers:

1

Hi

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 i want to return this class as webservice response:

[WebMethod]
        public LoginResponse Login(String login, String password)
        {
            return new LoginResponse("a", null);
        }

The class LoginResponse is in other dll. What must i do, because i got an error??

The errors told that i must using attribute WebMethodAttribute or change root type using XmlRootAttribute, because LoginResponse refers to method or type

A: 

I have a solution:

I must change function name from login :) Now it's name is servicelogin and works fine :)

regards

dzajdol