Connecting Tech Pros Worldwide Forums | Help | Site Map

ASP code is not running

vikas251074's Avatar
Familiar Sight
 
Join Date: Dec 2007
Location: Patna
Posts: 198
#1: Oct 2 '09
I have been expert in running asp code. Now I am trying to work at my home. I have installed (OS-Windows XP SP2.0), Oracle9i, IIS. Now I try to run following simple program. Only 'Hello' is displayed but the data in asp code is not displayed. I don't know why.
Expand|Select|Wrap|Line Numbers
  1. <%@language="vbscript"%>
  2. <HTML>
  3. <HEAD>
  4. <TITLE>DSN CONNECTION TO ORACLE</TITLE>
  5. </HEAD>
  6. <BODY>
  7. Hello
  8. <% 
  9. Response.Write("<P>Connecting to Oracle the ASP way</P>")
  10. %>
  11. </BODY>
  12. </HTML>
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,083
#2: Oct 2 '09

re: ASP code is not running


Is your IIS configured so that it allows ASP code to run/execute?
Make sure that the website is also configured to allow ASP code to run.

-Frinny
vikas251074's Avatar
Familiar Sight
 
Join Date: Dec 2007
Location: Patna
Posts: 198
#3: Oct 3 '09

re: ASP code is not running


Where it is configured? I have installed iis in default mode. In control panel IIS icon is not available
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,083
#4: Oct 3 '09

re: ASP code is not running


You need to go to control panel->administrative tools -> IIS

That should bring you to the IIS snap-in tool that you can use to configure IIS.
vikas251074's Avatar
Familiar Sight
 
Join Date: Dec 2007
Location: Patna
Posts: 198
#5: Oct 4 '09

re: ASP code is not running


Control Panel > Administrative Tool > Internet Information Services >

what setting should be done in IIS snap-in tool and where.
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,083
#6: Oct 5 '09

re: ASP code is not running


  • Open the IIS snap-in tool.
  • Expand the Computer name.
  • Expand the Web Sites folder
  • Right click on Default Web Site
  • Select Properties
  • Select the Home Directory tab in the Default Web Site Properties dialog box

Do you see .asp listed there??
In the Default Web Site Properties dialog box, are your Execute Permissions set to "Scripts only" or "Scripts and Executable"?

Right click on the Virtual directory for the website (under the Default Website) and select Properties. Under the "Virtual Directory" tab, check that the Execute Permissions is set to either "Scripts only" or "Scripts and Executables"....

-Frinny
vikas251074's Avatar
Familiar Sight
 
Join Date: Dec 2007
Location: Patna
Posts: 198
#7: Oct 6 '09

re: ASP code is not running


I go to the following
  • Open the IIS snap-in tool.
  • Expand the Computer name.
  • Expand the Web Sites folder
  • Right click on Default Web Site
  • Select Properties
  • Select the Home Directory tab in the Default Web Site Properties dialog box

Then I click on 'Configuration' tab where I see many extension list like
.asa
.asp
.cdx
.cer
.idc
.shtm
.shtml
.stm

This is the list where should I need?

Every thing is OK , but still asp code is not running,

Should I reinstall OS ?? Or any other solution ...?
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,083
#8: Oct 6 '09

re: ASP code is not running


No you don't need to re-install the OS.
You just need to configure IIS correctly to allow the website to execute ASP code.
Go through the properties for the default website and for the virtual directory that the website is in to make sure that it allows ASP scripts to be executed.
vikas251074's Avatar
Familiar Sight
 
Join Date: Dec 2007
Location: Patna
Posts: 198
#9: Oct 6 '09

re: ASP code is not running


OK sir I should try for it..........?@#$%^
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,083
#10: Oct 6 '09

re: ASP code is not running


So that we can actually have a conversation about your set up you have to tell me what it looks like.

All IIS5 set ups have a Web Sites folder and a Default Web Site in it.

I gather that you have a virtual director in the Default Web Site that is going to host your ASP driven website.

What is the name of that folder?

You need to right click on that folder and make sure that the executing scripts is allowed. The Execute Permissions should at least be set to "Scripts Only"....otherwise your website won't execute ASP code.

Is this set?

-Frinny
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,083
#11: Oct 6 '09

re: ASP code is not running


If this doesn't work let's try recreating the site.
  • Right click on the Default Web Site.
  • Hover over "New" and click "Virtual Directory..."
  • Click the Next button in the Virtual Directory Creation Wizard to dismiss the intro page
  • Provide the alias for the website and click the Next button
  • Browse to the directory that contains your asp website and click the Next button
  • Make sure that "Read" and "Run scripts (such as ASP)" are checked on the Access Permissions page of the Virtual Directory Creation Wizard and click the Next button to complete the wizard.
  • Try connecting to your ASP page by going to "http://localhost/websitealias/theAspPage.asp"


I tested this (using XP with IIS 5.0) by creating a test.asp file that contained the following:
Expand|Select|Wrap|Line Numbers
  1. <html>
  2.   <head>
  3.     <title>test asp</title>
  4.   </head>
  5.   <body>
  6.     Hi....<br />
  7.     <% Response.Write("Hello World from ASP!") %>
  8.   </body>
  9. </html>
It works fine...
vikas251074's Avatar
Familiar Sight
 
Join Date: Dec 2007
Location: Patna
Posts: 198
#12: Oct 8 '09

re: ASP code is not running


Yes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!


It is working !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!


Great!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !



Thankyou very much !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

:-)
Reply