DIGIT-ARC read-only archive · snapshot: July 23, 2026

Code displayed on opening ASP page in browser

22 posts · originally from https://geek.digit.in/community/threads/code-displayed-on-opening-asp-page-in-browser.164863/

Siddharth_1
Siddharth_1 Original post #1
Oct 17, 2012 at 8:23 PM
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
Siddharth_1
Oct 19, 2012 at 3:30 PM
No reply till now:cry:

PLS ANYONE HELP!!!
prabhu.wali
Oct 19, 2012 at 8:34 PM
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.
Siddharth_1
Oct 20, 2012 at 12:43 PM
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.
prabhu.wali
Oct 21, 2012 at 7:31 PM
what editor are u using,i highly recommend using the VS2012 90 day trial
Siddharth_1
Oct 22, 2012 at 3:41 PM
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
Vyom #7
Oct 22, 2012 at 8:29 PM
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.
prabhu.wali
Oct 22, 2012 at 11:32 PM
arent u supposed write the code in the ***.aspx.cs file?
Siddharth_1
Oct 23, 2012 at 10:57 AM
^ .aspx.cs is related with VS. I am using notepad to create asp pages.
RCuber
RCuber #10
Oct 23, 2012 at 12:00 PM
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
Zangetsu #11
Oct 23, 2012 at 1:20 PM
@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 ;)
Siddharth_1
Oct 23, 2012 at 7:33 PM
@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
RCuber #13
Oct 23, 2012 at 7:42 PM
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.
Siddharth_1
Oct 23, 2012 at 7:46 PM
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.
RCuber
RCuber #15
Oct 23, 2012 at 7:51 PM
when ever it stops working again .. check if the status of the services.
Zangetsu
Zangetsu #16
Oct 23, 2012 at 8:40 PM
@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...
Siddharth_1
Oct 24, 2012 at 1:57 PM
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
RCuber #18
Oct 24, 2012 at 3:45 PM
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.
Zangetsu
Zangetsu #19
Oct 24, 2012 at 4:19 PM
can u change it to C:/inetpub/wwwroot/website and check?
Siddharth_1
Oct 27, 2012 at 5:58 PM
will reinstalling IIS help. my current version if iis is IIS7. thinking of installing IIS7.5 Express.
Siddharth_1
Oct 28, 2012 at 2:54 PM
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.

oct 27-
The listing doesnt show iis service, so i guess it isnt working!

oct 28-
Now ASP is working again, but the services.msc application still doesnt show the iis service.