problem with code (newbie)

B

barabba72

Hi All,

I have the following code:
Basically when I enter the server name and hit the "submit" button, IE
says "the page cannot be displayed.There is a problem with the page you
are trying to reach and it cannot be displayed.".

Further, how can I debug my code, is there a debugger I should use ?


<html>
<body>
<form action="homepage.asp" method="get">
Server to Manage: <input type="text" name="strComputer" size="20" />
<input type="submit" value="Submit" />
</form>

<%
dim strComputer
mServer=Request.QueryString("strComputer")

If mServer<>"" Then

strComputer = mServer
response.write mServer

Set objNetwork = Server.CreateObject("Wscript.Network")
Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\" & mServer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery ("SELECT * FROM
Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
response.write objOperatingSystem.Caption',
objOperatingSystem.Version
Next
End If
%>

</body>
</html>
 
B

Bob Barrows [MVP]

Hi All,

I have the following code:
Basically when I enter the server name and hit the "submit" button, IE
says "the page cannot be displayed.There is a problem with the page
you are trying to reach and it cannot be displayed.".

Further, how can I debug my code, is there a debugger I should use ?

Excuse me, but you already have an ongoing thread about this issue. Starting
a new thread about the same problem is not good practice. It makes it very
confusing to carry on multiple conversations about the same topic, and if
somebody wastes his time replying in one thread only to find the problem has
already been resolved in the other thread, how likely do you think it will
be that the time-waster will bother replying to any future threads started
by you?

If you need to provide more information about an issue, do it in the
original thread.

Bob Barrows
 
B

barabba72

Hey Bob, I didnt' mean not to follow the rules. I see what you are
saying.
However if you read this is a different issue, that why I started a new
thread.

Thanks so much.
 
B

Bob Barrows [MVP]

Hey Bob, I didnt' mean not to follow the rules.
Not "rules" - there can be no rules in usenet since there is nobody to
enforce them (unless you consider peer pressure to be enforcement).
I see what you are
saying.
However if you read this is a different issue, that why I started a
new thread.

Thanks so much.

OK, but, it seems like the same issue (how do I debug?) only with different
code to illustrate the problem. I think if you read my reply in the other
thread, you will get the idea.

Bob Barrows

PS. Read the entire reply, and make sure you read both of my replies in that
thread.
 
B

barabba72

Hey Bob,

I apologise, didn't see ALL of your replies to my post.
It's a little clearer.

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top