Use it like this
url:"@Url.Content("~/")"+'xx.asmx' in your jquery
and if you are using external js File then in View add this
<script type="text/javascript" language="javascript">
window.rootUrl = "@Url.Content("~/")";
</script>
and in js file use it like thi
url: window.rootUrl +'xx.asmx'