I don't think this is duplicate of System.Net.WebRequest not respecting hosts file since I do not believe my issues to be proxy related (and it's making the request to localhost essentially).
So I've got a C# ASP page that makes an HttpWebRequest. Now, on this server I've done some custom mapping of some dev domains to the server's IP address.
HttpWebRequest request = (HttpWebRequest)WebRequest.Create( "http://someproject.dev" );
ERROR:
The remote name could not be resolved: 'someproject.dev' at System.Net.HttpWebRequest.GetResponse()
My Hosts file on the server (and my client) has 10.0.1.115 someproject.dev I've also tried it with 127.0.0.1 on the server
Another note, both .net apps are running under hosts file/IIS mappings, i.e. one app is making a x-domain request to the other (which is permitted, i know that's not the cause because this works in our production environment).
Also, I'd like to avoid System.Net.Dns, unless you guys agree that's the only way it will work.