Reputation:
i have tried to run following asp code,which is written in html file
<!DOCTYPE html>
<html>
<body>
<%
response.write("hello world ");
%>
</body>
</html>
but when i run it,got following one
<% response.write("hello world "); %>
so i guessed,there is not running server or something like this,so what could i do?i have installed apache,mysql servers,what else do i need?sorry if my question is not so prffessional asked,because i am new in asp language,i have took this example from this site
http://w3schools.com/asp/showasp.asp?filename=demo_text
Upvotes: 1
Views: 14937
Reputation: 19
If you have IIS installed, you hit the nail on the head when you said:
i have tried to run following asp code,which is written in html file
Change your .html
file to .asp
ASP code will not execute unless in a .asp
file.
Upvotes: 0
Reputation: 2845
Html can be run on a browser.but for running an asp code, you need a server.So you must to write the code in .asp extension file,not in html and have to install IIS.
go to link http://www.w3schools.com/asp/asp_install.asp to install IIS.
create a folder in C:\Inetpub\wwwroot suppose your folde name is xxx put your .asp file there go to the folder properties you've created(xxx folder). click security option. then click edit and allow full control there.
run the folder in your browser as localhost/xxx/yourfilename.asp
Upvotes: 0
Reputation: 15314
In newer versions of IIS (like 7.5 on Win7), the ASP DLL is not installed by default. Even IIS might not be installed by default. You can add them using appwiz.cpl
(System Settings >> Add/Remove Software >> Windows Components). See Running Classic ASP Applications on IIS 7.0 and IIS 7.5 for a reference.
Then there's one additional bit you absolutely want to enable for development, and that is to set scriptErrorSentToBrowser = true
in inetmgr
(IIS manager). Alternatively you could enable Failed Request Tracing, which I haven't tried I have just tried following this MSDN doc (Enable Trace Logging for Failed Requests (IIS 7)) and it's really worth while enabling this!
Upvotes: 1