ASP code is not running

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vikas251074
    New Member
    • Dec 2007
    • 198

    ASP code is not running

    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.
    Code:
    <%@language="vbscript"%>
    <HTML>
    <HEAD>
    <TITLE>DSN CONNECTION TO ORACLE</TITLE>
    </HEAD>
    <BODY>
    Hello
    <% 
    Response.Write("<P>Connecting to Oracle the ASP way</P>")
    %>
    </BODY>
    </HTML>
    Last edited by Frinavale; Oct 2 '09, 03:38 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    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

    Comment

    • vikas251074
      New Member
      • Dec 2007
      • 198

      #3
      Where it is configured? I have installed iis in default mode. In control panel IIS icon is not available

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        You need to go to control panel->administrati ve tools -> IIS

        That should bring you to the IIS snap-in tool that you can use to configure IIS.

        Comment

        • vikas251074
          New Member
          • Dec 2007
          • 198

          #5
          Control Panel > Administrative Tool > Internet Information Services >

          what setting should be done in IIS snap-in tool and where.

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            • 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

            Comment

            • vikas251074
              New Member
              • Dec 2007
              • 198

              #7
              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 ...?

              Comment

              • Frinavale
                Recognized Expert Expert
                • Oct 2006
                • 9749

                #8
                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.

                Comment

                • vikas251074
                  New Member
                  • Dec 2007
                  • 198

                  #9
                  OK sir I should try for it..........?@# $%^

                  Comment

                  • Frinavale
                    Recognized Expert Expert
                    • Oct 2006
                    • 9749

                    #10
                    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"....otherw ise your website won't execute ASP code.

                    Is this set?

                    -Frinny

                    Comment

                    • Frinavale
                      Recognized Expert Expert
                      • Oct 2006
                      • 9749

                      #11
                      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:
                      Code:
                      <html>
                        <head>
                          <title>test asp</title>
                        </head>
                        <body>
                          Hi....<br />
                          <% Response.Write("Hello World from ASP!") %>
                        </body>
                      </html>
                      It works fine...

                      Comment

                      • vikas251074
                        New Member
                        • Dec 2007
                        • 198

                        #12
                        Yes !!!!!!!!!!!!!!! !!!!!!!!!!!!!!! !!!!!!!!!!!!!!! !!!!!!!!!!!!!!! !!!!


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


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



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

                        :-)

                        Comment

                        Working...