ASP newbie

I have downloaded MS personal web server in my PC,and I want to test ASP. Can someone tell me which directory I need to put .html file and where I place .asp file?
Who is Participating?
herikConnect With a Mentor Commented:
Just put your ASP pages in any of the directories that are registered with PWS. Remember that asp-pages are just HTML pages with another extension. (.asp) . Inside this pages you can use ASP code between normal HTML tags as long as you put them between <% %>

To get going you can put it in wwwroot (typically on C unless you have specified a different place during installation.
Right Click on the PWS Icon in your taskbar. Select Properties from the menu that pops up. IN the window that appears, select advanced. You will be presented with a directory list of directories registered for access via PWS. Right click on any of the directories and select properties to see what permissions are afforded to files in that directory. Check the checkbox marked script to enable asp support for that directory.
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Now all you need is a test script, try this;

In whatever directory you allow script permission place a file called test.asp, in the file write this;

<%@ language="vbscript" %>
<title>A test ASP Page</title>
<%=date() %>

Running this script will output the date set on your PC, assuming everything is set-up correctly.


Wait a minute there Herik, ASP pages are not "just HTML pages with another extension".  They are in essence scripts.  And just what is "ASP code"?
It depends on the way you look at them. You could consider them scripts just like CGI, but you can also considers ASP-pages to be HTML pages with added scripts. In essence ASP pages can be seen as 'unfinished' HTML pages. In most cases ASP pages already contain a lot of HTML (mainly the structure and layout of the page) and ASP-code is used to fill the page a bit more with calculated content or content from a database.

ASP Code: Just like a wrote above I concider ASP as HTML-pages with added functionality. In this regard I use the term 'ASP code'. Just meaning: VBScript or Javascript that can be enbedded into HTML pages by means of the ASP tag (<% ... %>).

Oh, one more word about me writing "just HTML pages with another extension". Although you can use the ASP extension for pages that contain just plain HTML, it's not advisible to do so. Using the ASP extension results in the fact that the page is proceced by the ASP precompiler every time the page is visited. Meaning more workload for your server.
So essentially any file I write that can be processed by the asp.dll should be concidered an asp file???  What is preventing me from creating all my files with the .FTN extension?  Providing I map the extension to the browser as a script and use the asp.dll to process, right?
You are free to do so. Maby you can also pipe all you images files to you word processor while you are at it :-)

The only thing I wanted to clarify was that, for me, asp is like a scripting aid that can be used inside HTML to change their content at the very last moment (this is: at the moment that a user requests the page from the server)
herik: A couple of points.

Firstly ASP is the script not an 'aid' and they are distinctly different to a plain HTML page in that the rules applied to a an HTML page are not the same as an ASP page. For example META tags within an ASP page aren't processed by the server whereas they are within an HTML page. You might like to think of them in a particular way but that doesn't mean that that way is correct.
Secondly did you have to lock this question particularly when you added nothing to answer apart from possible confusion.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.