I created a simple API via ASP.NET MVC 4:

public class ActionController : ApiController
    {
        [WebMethod]
        public string getCommunities()
        {
            try
            {
                MethodClass method = new MethodClass();
                return method.getCommunities();
            }
            catch(Exception ex)
            {
                return ex.Message.ToString();
            }
        }
}

which is trying to call this method in the Method class:

public string getCommunities()
        {
            return "bbb";
        }

but for whatever reason, I get this error:

<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">cannot parse xml! Check file path</string>

I tried Googling for the error, but came up with nothing, has anyone seen this error before? and how do I fix it?

Related posts

Recent Viewed