7

i using below code in my asp page of (www.test1.com)

url= "http://www.test1.com/test.asp"
    dim http, pxml, http_response
    set http = server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
    http.open "GET", url, 0
    http.setrequestheader "content-type", "text/xml; charset=utf-8"
    http.send ""

but i get error in my page like below

msxml3.dll error '80072ee7'

The server name or address could not be resolved 

But i send requet to same server (http://www.test1.com) only the problem. but i send request to any other server like (http://www.test2.com) is working fine

why the problem in same server?

user475464
  • 1,741
  • 10
  • 26
  • 38
  • Are you issuing this from behind an authenticated proxy server? If so, proxy server might be configured to require authentication for www.test1.com but not www.test2.com. – S.Krishna May 14 '15 at 09:50

1 Answers1

0

It could be that the DNS for your web server doesn't have its own name listed (true, it happens!), so try using either 'localhost' or '127.0.0.1' instead.

If you have PHP installed/enabled on this server, here's a quick way to check what server names it can resolve:

<?php

function test() {
    $hostname = isset($_POST['hostname']) ? trim($_POST['hostname']) : false;

    if ($hostname) {
        echo "<h2>Hostname: ", htmlspecialchars($hostname), "</h2>\n";

        if ($addrs = gethostbynamel($hostname)) {
            echo "<div>\n";
            var_dump($addrs);
            echo "</div>\n";
        }
        else {
            echo "<p>No records found.</p>\n";
        }
    }
}

?>
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>Test DNS record retrieval</title>
</head>

<body>
<h1>Test DNS record retrieval</h1>
<?php test(); ?>

<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
    <table>
        <tr>
            <th>host name:</th>
            <td><input type="text" tabindex="10" name="hostname" size="40" ></td>
        </tr>
        <tr>
            <td></td>
            <td><input type="submit" tabindex="99"></td>
        </tr>
    </table>
</form>

</body>
</html>
webaware
  • 2,795
  • 2
  • 30
  • 37