• CONTEST ALERT - Experience the power of DDR5 memory with Kingston Click for details

Code displayed on opening ASP page in browser

Siddharth_1

EXTREME
I dont know why but ASP isnt working properly in web browsers(IE, Firefox, Safari).
ASP code is displayed in the browser instead of the output.
I didnt do anything to any ASP settings since last time it was working.
Even a simple code like this isnt woking:
UP.JPG

Tried clearing cache using ctrl+f5 in firefox, but that also isnt working.
Pls Help.

Guys pls reply. Pls help
 

prabhu.wali

prabhu.wali
i havent used asp in a long while from what i can confer you havent used any asp tags to indicate thats its an asp page apart from the file extension.
 
OP
Siddharth_1

Siddharth_1

EXTREME
do you mean using this command before the html tag-
<%@ language="vbscript" %>
i've tried using this but no help.

If you maen something else pls tell.
 
OP
Siddharth_1

Siddharth_1

EXTREME
I am using notepad. I will try VS2012

12:09pm(22 oct)
I do not know why, but asp suddenly started working again!!!

3:39pm(22 oct)
ASP stoped working again. PC rebooted only once after last time it was working. No changes were done. STRANGE!!!
 

Vyom

The Power of x480
Staff member
Admin
I wrote the following code in notepad++ and saved it as .asp file. Opened it in browser. Still I get the following output not the complete html code. (I have Visual Studio 2010 installed though).

My Code:
<html>
<head>
<title>Hello World</title>
</head>
<body>
<%
Response.Write("Hello World")
%>
</body>
</html>

Output:
<% Response.Write("Hello World") %>

Which means only one thing. It's not the fault of Visual Studio. Maybe some service of windows or something.
 

RCuber

The Mighty Unkel!!!
Staff member
are you using classic ASP or ASP.NET? there is difference in this. EDIT: I see from the syntax that its ASP.NET

The issue seems to be in IIS . Which version of IIS are you using?
 

Zangetsu

I am the master of my Fate.
@Siddharth_1 : are u directly opening the .asp file in browser..it will not work that way...your code is perfect though.

@Vyom: I suppose u also opened directly in a browser.


Solution: Create a folder inside C:\inetpub\wwwroot\ for e.g: Test
now open IIS Manager & navigate from there & select your .asp file & click browse...

if u directly open the .asp file in browser it will show u only the code & not the output bcoz of IIS Engine missing functionality ;)
 
OP
Siddharth_1

Siddharth_1

EXTREME
@Zangetu: EXCUSE ME I AM NOT USING ASP FIRST TIME AND I AM USING THE LOCALHOST COMMAND TO OPEN ASP WEB PAGES. You can see this in the pic i uploaded in the first post. I am already using asp for connecting web pages to databases and you tell me that i dont know how to open asp pages!!!

@RCuber: Its only ASP and not ASP.NET. I am using IIS 7.

At the moment i only need a way to see the output of the ASP code that i am writing. Any software which could show the output could do the work. Pls tell if you know something which could fulfill my needs.
 

RCuber

The Mighty Unkel!!!
Staff member
open Programs and Features from Control Panel and select "Turn Windows Features on or off", navigate to "Internet Information Services" > "World Wide Web Services" > "Application Development Features" > Enable ASP . Also in "Web Management Tools" Check everything under "IIS6 Management Compatibility"

then host your files and test. I will be able to reply only after 10 PM or tomorrow regarding this.
 
OP
Siddharth_1

Siddharth_1

EXTREME
7:41pm(23 oct)-
ASP is again working. No changes to settings were made since it wasnt working. Something WIERD is going on!!!

@RCuber: ASP was already enabled. I told that ASP was working fine earlier and stooped working suddenly. I will enable the options under IIS6 Management Compatibility later when ASP stops working again.
 

Zangetsu

I am the master of my Fate.
@Zangetu: EXCUSE ME I AM NOT USING ASP FIRST TIME AND I AM USING THE LOCALHOST COMMAND TO OPEN ASP WEB PAGES. You can see this in the pic i uploaded in the first post. I am already using asp for connecting web pages to databases and you tell me that i dont know how to open asp pages!!!
where is your .asp page saved?

and if there is any problem with IIS then re-install it again...
 
Last edited:
OP
Siddharth_1

Siddharth_1

EXTREME
ASP is again not working. Whenever it is working, it stops after a reboot and again starts working after a few reboots, although no changes have been made to settings.

@RCuber: Plz explain how can i check the status when it stops working?

@Zangetsu: i changed the root file from 'C:/inetpub/wwwroot' to 'C:/Website'. But it was working fine then also.
 

RCuber

The Mighty Unkel!!!
Staff member
ASP is again not working. Whenever it is working, it stops after a reboot and again starts working after a few reboots, although no changes have been made to settings.

@RCuber: Plz explain how can i check the status when it stops working?

@Zangetsu: i changed the root file from 'C:/inetpub/wwwroot' to 'C:/Website'. But it was working fine then also.

I am away from comp.
Open services.msc and check if the iis service is working or not. This is really a weird issue i have come across.
 
Top Bottom