Why to use the Web API when there is web service?

Please tell me what is cross-site scripting and how is it harmful for your application?

How To call async Web API through Controller in MVC 6

Despite no request tempdata[] getting wiped