Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIS as pws susbstitute in windows 2000 - not totally working

Status
Not open for further replies.

avivit

Technical User
Jul 5, 2000
456
IL
Hi
I recently installed IIS for WIN-2000 (I understand it's the susbstitute of PWS in win-98 so...).
Now, I want it to function as PWS in win-98.
********************************************
The problems:
1. I get "page can not be desplayed" when trying to run an asp page on IE ("BUT - when I AM connected to the Internet, it shows me the page (same "localhost" url).
Do I have to be connected to the internet in order to work with IIS? Isn't it like PWS in win-98?

2. When I try to run a page that includes database connections, the page still "can not be displayed", even when I am connected to the Internet.
I havn't defined the DSN in ODBC (DSN) yet. But...shouldn't it at least give me an informative error (odbc error etc.)???

Thanks

*******************************************
Following what I did:
1. I installed IIS from windows-component.

2.Restarted my pc, and then run the "personal web manager" from "Administrative tools" in Control pannel.
I didn't change anything there, just made sure it's working (shows "stop" not "start" there).

3. I activated the pwstray.exe and it showed an error msg "The procedure entry point LpkPresent could not be located in the synamic link library USP10.dll" but it was running (I have the icon on the taskbar, ans it says "IIS SERVICES R RUNNING").

4. I tried to run asp page from IE as follows:
" as I run when using PWS, but I got the "The page can not be desplayed" msg (shows when conncected to internet).
What have I done wrong???

Thanks
 
IIS does take a bit of getting used to. It did for me when I did the switch from PWS to IIS.

Here are a few things to check:

1. Is IIS turned on, and is the service running in the background?

2. Convert your web directory to a Virtual Directory in the IIS manager.

Those are the only two real issues that I can think of you could be facing. Let me know if you have any more questions, or if you need me to explain anything.
:)

Jack
 
Actually, I am not sure I unserstand how tp check those things since I don't know IIs.

1. What do u mean by "if IIS turned on"?.
Services R running if I understand what u mean:
I have this icon of the IIS at the tsakbar and when u mouseover it it says: "Internet Information Setvices R Running" (in win98 it was: "pws is running").

>>2. Convert your web directory to a Virtual Directory in >>the IIS manager."
Let me see if I got u correctly:
I entered the Personal Web Manager, there I clicked on "Advanced", and in the properties of "Home" virtual Directory, the content is c:/inetpub/The properties of the subdirectories of "Home" r different.

What shall I do?
Thanks very much...
 
heh, sorry, I should have explained all that further.
:)

K, you've already figured out that IIS is running, but just so you know: When you open the IIS manager and click on the Default Web Site in the tree view, you'll notice some buttons at the top of the IIS manager. They look like CD controls (play, stop, and pause). This is how you turn on/turn off your website, in case you ever have to do it.

On to the second one. In the IIS manager, expand your default web site. Under it, you should see all the folders that are in your folder. Most of them will look like a normal folder, but some will have a funky icon instead. For any folder that you want to be able to run as an asp app, you have to right click the folder, go to properties, and in properties there's a button called "Create". Click it, and voila: you've just created a virtual directory. Now, if you try and access your pages in a browser, they should display properly.
:)

Let me know if this works for ya, or if you need anything else.

Jack
 
Hi avivit!
Did you get your asp to connect to the database?
I am having EXACTLY the same problem as you.
I am able to run my asp successfully but when attempting to connect to the database, I get the 'page cannot be displayed' error message.
If you or anyone has found a solution, please let me know.
Thanks,
s
 
I haven't checked it yet. I promise to let u know when checked.
U can do the same.
:)
 
I finally succeeded in connecting to the database with this code:

<html>
<head>
<title><center>Add DataBase</center></title>
</head>
<body bgcolor=&quot;goldfade&quot;>

<%
Set connectionToDatabase=Server.CreateObject(&quot;ADODB.Connection&quot;)
Set rs=Server.CreateObject(&quot;ADODB.Recordset&quot;)
connectionToDatabase.Open &quot;DSN=samDB;UID=scott;PWD=tiger&quot;
rs.open &quot;SELECT * FROM EMP&quot;,connectionToDatabase
%>

<center><h3>Adding Records</h2></center>
<center><form method=&quot;post&quot; action=&quot;demo_db_new.asp&quot;>
<table>
<%
for each x in rs.Fields
if x.name <> &quot;no&quot; and x.name <> &quot;dateadded&quot; then%>
<tr>
<td><%=x.name%></td>
<td><input name=&quot;<%=x.name%>&quot; value=&quot;N/A&quot;></td>
<%
end if
next
rs.close
connectionToDatabase.close
%>
</tr></table>
<right><p><input type=&quot;submit&quot; name=&quot;action&quot; value=&quot;Add Record&quot;> </p></right>
</form></center>

<p><b>Note:</b> If you click on &quot;Add Record&quot; you will be

taken to a
new page. On that page you will be able to look at the

source code on how to add
a new record to a database table.</p>

</body>
</html>

But now, I cannot connect to database to insert records.
Can anyone help with this, please?
Below is the code I am struggling with now.

<html>
<head>
<title>Add Record to DataBase</title>
</head>
<body>
<h2>Add Record to Database</h2>

<%
on error resume next
Set connectionToDatabase=Server.CreateObject(&quot;ADODB.Connection&quot;)
Set rs=Server.CreateObject(&quot;ADODB.Recordset&quot;)
connectionToDatabase.Open &quot;DSN=samDB;UID=scott;PWD=tiger&quot;
connectionToDatabase=Server.open

empno=Request.Form(&quot;empno&quot;)
ename=Request.Form(&quot;ename&quot;)
job=Request.Form(&quot;job&quot;)
mgr=Request.Form(&quot;mgr&quot;)
hiredate=Request.Form(&quot;hiredate&quot;)
sal=Request.Form(&quot;sal&quot;)
comm=Request.Form(&quot;comm&quot;)
deptno=Request.Form(&quot;deptno&quot;)

sql=&quot;INSERT INTO EMP(empno,ename,job,mgr,hiredate,sal,comm,deptno)
VALUES &quot;
sql=sql & &quot;('&quot; & empno & &quot;','&quot; & ename & &quot;','&quot; & job & &quot;','&quot; & mgr & &quot;',&quot;
sql=sql & &quot;'&quot; & hiredate & &quot;','&quot; & sal & &quot;','&quot; & comm & &quot;'&quot; & deptno & &quot;')&quot;

connectionToDatabase.Execute sql,recordsaffected
if err <> 0 then
Response.Write(&quot;You do not have permission to update this database&quot;)
else
Response.Write(&quot; &quot; & Recordsaffected & &quot; record added&quot;)
end if

connectionToDatabase.close
%>

<p>
<a href=&quot;demo_db_new.asp&quot;>Return to previous page</a>
</p>
</body>
</html>
 
U mean it worked with PWS but u needed to change the code in order it to work with IIS?????????
I am not following this one.......

Or it was the code from the very beginning.
 
in my case, i needed to change the code.
for instance, one of the problems i was having was
when i coded this:
<form method=&quot;post&quot; action=&quot;demo_db_new.asp>, i needed to name my asp demo_db_new.asp. i named it something else.
yes, it sounds stupid, i am learning from my stupidity.
the other problem i had was, i was not closing the database connection i opened at the top.
there are a good number of reasons but we will get there with little practice.
follow my example and i am sure it will work for you.
 
in my case, i needed to change the code.
for instance, one of the problems i was having was
when i coded this:
<form method=&quot;post&quot; action=&quot;demo_db_new.asp>, i needed to name my asp demo_db_new.asp. i named it something else.
yes, it sounds stupid, i am learning from my stupidity.
the other problem i had was, i was not closing the database connection i opened at the top.
there are a good number of reasons but we will get there with little practice.
follow my example and i am sure it will work for you.

 
Jack. I tried your suggestion.
I did see how to activate the default web with the buttons. Thanks for explaining.
I also did as u said, &quot;created&quot; the folder I wanted in default web site, but.......
still no change, though now I also defined the DSN's.
1. I must be cobbected to the Internet in order the &quot;htp://localhost..&quot; to work.

2. In any case, when trying to load the asp index page in that folder (utl: I still get the msg of page can not be displayed, and also error number of 500.100
I tried to read about this error number in microsoft and other sites, but I'm confused since I have no knowledge regarding IIS, only PWS.

Do u have anymore ideas?
I think I am not doing a bsaic thing right.
Thanks very nuch anyway
 
And here's the important part from microsoft's site regarding the error I mentioned in my previous msg.
(
&quot;The error messages occur under both of the following conditions:

Anonymous authentication is enabled on the Directory Security tab for the Default Web Site properties, which causes the user to run the Localstart.asp file in the security context of the Anonymous User (IUSR_ ServerName , by default), who should never be made a member of the local Administrators group.


The user is logged on locally and is not a member of the local Administrators group.

RESOLUTION
To resolve this problem, disable Anonymous authentication for the Localstart.asp file (the Localstart.asp file usually uses Integrated Windows authentication), and then verify that the user who is logged on is a member of the local Administrators group. &quot;

------------------------------------------------------
I didn't quite understand. What shall I mark there in the &quot;Anonymous authentication&quot; of localstart.asp and what should not be checked?
Ans also, what do they mean by &quot;verify that the user who is logged on is a member of the local Administrators group. &quot;
and how do I check it?

And what does it have to do with teh fact that I need to be connected to the internet to get this error msg?

Thankkkkks very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top