Your data object needs to be a JSON string. Try
var dataToSend = JSON.stringify({'path':'mydata'});
$.ajax({
type: 'POST',
url: 'ItemMaster.aspx/UploadFile',
contentType: 'application/json; charset=utf-8',
data: dataToSend,
dataType: 'json',
success: function (msg) {
alert(msg.d);
}
});
Be sure to include JSON.js if you are supporting older browsers.