I am facing an issue while using CSOM in SharePoint 2013. I have configured an alternate access mapping for our site to run on
http://mycustomdoamin.net/ The site is running fine and I am able to see the pages.
Now I am trying to use CSOM to get the current SP context and execute a query. At that point, I am getting error:
Unexpected data from server
On investigating with Fiddler, I found that SharePoint is making a call to
Note that the above is NOT the FQDN that I have configured my site for. It is missing the .net domain extension. Consequently, I am getting a 502 DNS lookup failed error.
The same script works fine when running without the mapping (e.g. on
http://ServerName ). I have also tried setting up hosts file entry for the domain but that too doesn’t work.
What am I doing wrong here?