Microsoft IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationMicrosoft IIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old November 19th, 2004, 05:38 AM
IcarusBicarus IcarusBicarus is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 115 IcarusBicarus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 57 m 9 sec
Reputation Power: 5
Problem running IIS

Hi everyone,

I am trying to get my ASP pages running in IIS on windows 2000. I have a HTML form that calls an ASP file, demo_add.asp.

However when I try to submit the information on my browser, the demo_add.asp code appears in the browser window.

I was told that means that Windows doesn't know that it's supposed to process the ASP code and is just displaying it.
In IIS under "Web Service Extensions" you should have an entry for "Active Server Pages" and it should be set to "Allowed", not to mention your configuration for the extension.

Is this correct? I dont see any option like this in "Server Extensions" inside the IIS.

Reply With Quote
  #2  
Old November 19th, 2004, 05:45 AM
Lafinboy's Avatar
Lafinboy Lafinboy is offline
The Laughing Moderator
ASP Free Loyal (3000 - 3499 posts)
 
Join Date: Apr 2004
Location: Sydney, Australia
Posts: 3,267 Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)Lafinboy User rank is Sergeant (500 - 2000 Reputation Level)  Folding Points: 29199 Folding Title: Starter FolderFolding Points: 29199 Folding Title: Starter Folder
Time spent in forums: 2 Weeks 1 Day 10 h 48 m 12 sec
Reputation Power: 15
Send a message via ICQ to Lafinboy Send a message via AIM to Lafinboy Send a message via MSN to Lafinboy Send a message via Yahoo to Lafinboy Send a message via Skype to Lafinboy
Sounds like a load of hokey to me
It's more likely that your pages are not being run through IIS. Make sure that your pages are stored under the wwwroot folder, or that you have set up a virtual directory from IIS to your web folder.

Reply With Quote
  #3  
Old November 19th, 2004, 06:07 AM
IcarusBicarus IcarusBicarus is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 115 IcarusBicarus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 57 m 9 sec
Reputation Power: 5
Quote:
Originally Posted by Lafinboy
Sounds like a load of hokey to me
It's more likely that your pages are not being run through IIS. Make sure that your pages are stored under the wwwroot folder, or that you have set up a virtual directory from IIS to your web folder.

Thanks for replying.

Yes I have created a folder called MyWeb under wwwroot. What do you mean by a virtual directory?

When I am initially accessing the registration form i type http://cg303-22/MyWeb/index.htm. cg303-22 is my local host. It loads up without any probs. Its when I submit the page that the demo_add.asp code appears. Im stumped.

Reply With Quote
  #4  
Old November 19th, 2004, 08:45 AM
IcarusBicarus IcarusBicarus is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 115 IcarusBicarus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 57 m 9 sec
Reputation Power: 5
Hi again,

I figured out how to create a virtual directory and put all my files in there.

However, once again once I press submit on the registration form, the demo_add.asp code is appearing in the browser window.

What the hell is going on? Il stick my code below in case it is that but i dont see how.


RegisterTest.htm

Code:
 
<html>
<head>
<title>Kosy Cinema</title>
</head>
<body bgcolor="000066" link="#151b8d" vlink="#657383">
<center>
<A HREF="Main.htm"><img border="0" src="purple.gif" width="650" height="55"></a><br>
<A HREF="index.sc.html">
<img border="0" src="Register.gif" width="100" height="30"></a><a href="Login.htm"><img border="0" src="Login.gif" width="100" height="30"></a><a href="Order.htm"><img border="0" src="Booktickets.gif" width="100" height="30"></a><a href="helpindex.html"><img border="0" src="Filmreviews.gif" width="100" height="30"></a><a href="Aboutus.htm"><img border="0" src="Aboutus.gif" width="100" height="30"></a>
<p>
<font size="6" color="white">Registration</font></center>
<p color="white">
<FORM METHOD="POST" ACTION="demo_add.asp">
<TABLE BORDER="0">
	<TR>
<TD CLASS="nicetext" COLSPAN=2><font size=+1 color="white"><b>Personal Details</b></font><BR>
<font color="white">(Fields marked with an asterix (<font color="red">*</font>) are compulsory)</font></TD>
</TR>
<TR>
<TD><b><font color="red">*</font><font color="white"> First Name</font></b></TD>
<TD><input type="text" name="CustomerFirstname" value="" size="20" maxlength="24"></TD>
</TR>
<TR>
<TD><b><font color="red">*</font><font color="white"> Surname</font></b></TD>
<TD><input type="text" name="CustomerSurname" value="" size="20" maxlength="24"></TD>
</TR> 
<TR>
<TD><b><font color="red">*</font><font color="white"> Address</font></b></TD>
<TD><input type="text" name="Address1" value="" size="20" maxlength="24"></TD>
</TR>
<TR>
	 <TD><b></b></TD>
<TD><input type="text" name="Address2" value="" size="20" maxlength="24"></TD>
</TR>
<TR>
<TD><b></b></TD>
<TD><input type="text" name="Address3" value="" size="20" maxlength="24"></TD>
</TR>
<TR>
<TD><b></b></TD>
<TD><input type="text" name="Address4" value="" size="20" maxlength="24"></TD>
</TR>
 
<TR>
<TD><b><font color="red">*</font><font color="white"> Enter a password</font></b></TD>
<TD><input type="password" name="CustomerPassword" value="" size="20" maxlength="24"></TD>
</TR>
<TR>
<TD><b><font color="red">*</font><font color="white"> Verify password</font></b></TD>
<TD><input type="password" name="CustomerPasswordverified" value="" size="20" maxlength="24"></TD>
</TR>
<TR>
<TD VALIGN=TOP><b><font color="red">*</font><font color="white"> Email address</font></b></TD>
<TD><input type="Text" name="CustomerEmail" value="" size="20" maxlength="50">
</TD>
</TR>
 
<TR>
<TD><b><font color="white">Mobile No.</font></b></TD>
<TD><select name="CustomerMobilePrefix">
<option value="087" >087
<option value="086" >086
<option value="085" >085
</select>
<input type="Text" name="CustomerMobileMumber" value="" size="10" maxlength="20">
</TD>
</TR>
<TR>
<TD><b><font color="white">Gender</font></b></TD>
<TD><select name="CustomerGender">
<option value="3"></option>
	 <option value="1" >Male</option><option value="2" >Female</option>
	</select>
</TD>
</TR>
<TR>
<TD><b><font color="red">*</font><font color="white">Date of Birth</font></b></TD>
<TD><select name="CustomerBirthdate">
<option value="32"></option>
<option value="1" >1
<option value="2" >2
<option value="3" >3
<option value="4" >4
<option value="5" >5
<option value="6" >6
<option value="7" >7
<option value="8" >8
<option value="9" >9
<option value="10" >10
<option value="11" >11
<option value="12" >12
<option value="13" >13
<option value="14" >14
<option value="15" >15
<option value="16" >16
<option value="17" >17
<option value="18" >18
<option value="19" >19
<option value="20" >20
<option value="21" >21
<option value="22" >22
<option value="23" >23
<option value="24" >24
<option value="25" >25
<option value="26" >26
<option value="27" >27
<option value="28" >28
<option value="29" >29
<option value="30" >30
<option value="31" >31
</select>
<select name="CustomerBirthmonth">
<option value="13"></option>
<option value="Jan" >Jan
<option value="Feb" >Feb
<option value="Mar" >Mar
<option value="Apr" >Apr
<option value="May" >May
<option value="June" >June
<option value="July" >July
<option value="Aug" >Aug
<option value="Sept" >Sept
<option value="Oct" >Oct
<option value="Nov" >Nov
<option value="Dec" >Dec
</select>
<input type="Text" name="CustomerBirthyear" value="" size="4" maxlength="4">
</TD>
</TR>
 
</TABLE>
<P><INPUT TYPE="SUBMIT" VALUE="Register" NAME="B1"></P>
</FORM>
 
<blockquote>
<br><br><br><br>
<!--------------------Start of Standard Footer------------------------>
<p>
<small>
<center>
<a href="index.sc.html">Back to Main Help Page</a> |
<a href="search.html">Search</a> |
<a href="feedback.html">Give Feedback</a>
<br>
If you are not finding the help you need, please give detailed feedback.
</center>
</small>
<!---------------------End of Standard Footer------------------------>
</blockquote>
</body>
</html>




demo_add.asp



PHP Code:
<html><body><%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "C:\Documents and Settings\0128457\Desktop\MyKosy Midiplex.Kosy.mdb"sql="INSERT INTO Customer (CustomerFirstname,CustomerSurname,"sql=sql "Address1,Address2,Address3,Address4,CustomerPasswo  rd,CustomerPasswordverified,)"sql=sql "CustomerEmail,CustomerMobileMumber,CustomerGender,  CustomerBirthdate,CustomerBirthmonth,CustomerBirth  year)"sql=sql " VALUES "sql=sql "('" Request.Form("Firstname") & "',"sql=sql "'" Request.Form("Surname") & "',"sql=sql "'" Request.Form("Add1") & "',"sql=sql "'" Request.Form("Add2") & "',"sql=sql "'" Request.Form("Add3") & "',"sql=sql "'" Request.Form("Add4") & "',"sql=sql "'" Request.Form("CusPassword") & "',"sql=sql "('" Request.Form("CusPasswordverified") & "',"sql=sql "('" Request.Form("cusEmail") & "',"sql=sql "('" Request.Form("cusMobileNumber") & "',"sql=sql "('" Request.Form("cusGender") & "',"sql=sql "('" Request.Form("cusBirthdate") & "',"sql=sql "('" Request.Form("cusBirthmonth") & "',"sql=sql "('" Request.Form("cusBirthyear") & "')"on error resume nextconn.Execute sql,recaffectedif err<>0 then  Response.Write("No update permissions!")else   Response.Write("<h3>" recaffected " record added</h3>")end ifconn.close%></body></html

Reply With Quote
  #5  
Old November 19th, 2004, 10:05 AM
tboss132 tboss132 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 10 tboss132 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 46 sec
Reputation Power: 0
Send a message via MSN to tboss132 Send a message via Yahoo to tboss132
Quote:
Originally Posted by IcarusBicarus
Hi again,


What the hell is going on? Il stick my code below in case it is that but i dont see how.


Code:
<html><body><%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "C:\Documents and Settings\0128457\Desktop\MyKosy Midiplex.Kosy.mdb"sql="INSERT INTO Customer (CustomerFirstname,CustomerSurname,"sql=sql & "Address1,Address2,Address3,Address4,CustomerPasswo  rd,CustomerPasswordverified,)"sql=sql & "CustomerEmail,CustomerMobileMumber,CustomerGender,  CustomerBirthdate,CustomerBirthmonth,CustomerBirth  year)"sql=sql & " VALUES "sql=sql & "('" & Request.Form("Firstname") & "',"sql=sql & "'" & Request.Form("Surname") & "',"sql=sql & "'" & Request.Form("Add1") & "',"sql=sql & "'" & Request.Form("Add2") & "',"sql=sql & "'" & Request.Form("Add3") & "',"sql=sql & "'" & Request.Form("Add4") & "',"sql=sql & "'" & Request.Form("CusPassword") & "',"sql=sql & "('" & Request.Form("CusPasswordverified") & "',"sql=sql & "('" & Request.Form("cusEmail") & "',"sql=sql & "('" & Request.Form("cusMobileNumber") & "',"sql=sql & "('" & Request.Form("cusGender") & "',"sql=sql & "('" & Request.Form("cusBirthdate") & "',"sql=sql & "('" & Request.Form("cusBirthmonth") & "',"sql=sql & "('" & Request.Form("cusBirthyear") & "')"on error resume nextconn.Execute sql,recaffectedif err<>0 then Response.Write("No update permissions!")else Response.Write("<h3>" & recaffected & " record added</h3>")end ifconn.close%></body></html>


Sure buddy, that page is not an asp page. All asp pages should begin with
Code:
%@LANGUAGE = {your language here - vbscript or javascript } %


You'll find this link useful. http://www.w3schools.com/asp/default.asp

Reply With Quote
  #6  
Old November 19th, 2004, 11:29 AM
IcarusBicarus IcarusBicarus is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 115 IcarusBicarus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 57 m 9 sec
Reputation Power: 5
Quote:
Originally Posted by tboss132
Sure buddy, that page is not an asp page. All asp pages should begin with
Code:
%@LANGUAGE = {your language here - vbscript or javascript } %


You'll find this link useful. http://www.w3schools.com/asp/default.asp

Thanks but I thought Vbscript was default and didnt have to be dec;ared? thats what im using

Reply With Quote
  #7  
Old November 20th, 2004, 01:35 AM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 19 m 36 sec
Reputation Power: 181
Quote:
Originally Posted by IcarusBicarus
Thanks but I thought Vbscript was default and didnt have to be dec;ared? thats what im using

Whatever you configured in IIS is the default scripting language, and although you don't have to the @LANGUAGE= tag it's a good idea to do so.

If your asp code is coming to the browser, it's not being executed, just treated as html. You should check your IIS and make sure the .asp extension is mapped properly. Also verify you have allowed script execute to any folders in your virtual directory that has asp pages.

Create a file with <% response.write "testing" %> as the only line, save it as testing.asp and then navigate to that page with your browser. If asp is working you should get the string "testing" in your browser.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #8  
Old November 22nd, 2004, 05:09 AM
IcarusBicarus IcarusBicarus is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 115 IcarusBicarus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 57 m 9 sec
Reputation Power: 5
Doug,

Apologies for my ignorance!!!

I dont really know how to check the .asp extension is mapped properly.
What i did was go into my virtual dirsctories(Kosy) properties/Virtal Directory/Configuration/App Mappings.
The .asp extension is here.

Regarding the allowance of script execute to any folders in my virtual directory that has asp pages, within
properties/Virtal Directory i set the Execute Permissions to "scripts only".

I created that test file, ran it, and way hay(!) "testing" appeared. So this means ASP is working.

However when I tried to run my form, the ASP code is appearing. What the hell!?? Must it be my code so?

thanks

Reply With Quote
  #9  
Old November 22nd, 2004, 10:27 AM
IcarusBicarus IcarusBicarus is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 115 IcarusBicarus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 57 m 9 sec
Reputation Power: 5
Talking

Thanks for the help guys, i finally got the damn thing going!

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationMicrosoft IIS > Problem running IIS


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |