Call webservice by javascript

GTEK IT DEV Team asked on May 10, 2018 08:44

Hi all,

I have function like this added in to WebService.asmx

[WebMethod(MessageName ="GetListEmployeeArrticle")]
[ScriptMethod]
public List<object> GetListEmployeeArrticle(string path)
{
    //some code

    return new List<object>();
}

But when i'm call this function like this it return Error: There was an error processing the request.Status Code: 500

How can i resolve this problem? Thanks

Recent Answers


Peter Mogilnitski answered on May 12, 2018 20:46

How do you call it? if you go to ~/CMSPages/WebService.asmx?op=GetListEmployeeArrticle and click invoke button will you get an error?

Take a look at How To Call the Kentico CMS WebService from a JavaScript method

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.