Personal C Sharp                                                         By  famsoft.org
Home How To Start Examples-Desktop Examples-Web PC# Methods Reference-Desktop Reference-Web

CLICK TO SEE STARTUP PAGE, GENERAL

CLICK TO OPEN ACCOUNT WITH ALENTUS


                                   HOW TO START,
                                  WEB APPLICATION
                                  ===============

WHAT SHOULD YOU HAVE TO DEVELOP WEB APPLICATIONS OTHER THAN PC# SOFTWARE?
-------------------------------------------------------------------------

You need the microsoft Internet Information server (IIS). If you have 'Windows 2000' or
'Windows 3000" server, you have it.  If you have a computer with 'Windows 2000
professional' or 'Windows XP Professional', you can also develop and test web applications 
locally, except that you'll need to subscribe to a hosting service and send the pages
which you have developed there in order to allow other people to access them accross the
web.

If you have none of the above, you need to subscribe to a 'Web Hosting Service'. You'll be
developing each page into any directory of your computer, then sending it to your host 
before you can test it. This is not hard to do.

SUBSCRIBING TO A WEB HOSTING SERVICE:
-------------------------------------

There are many of them, some support ASP.NET version 2 which we are interested in, some
don't. Unfortunately, among the ones who do, only few have the tech support team who
understands ASP.NET enough to be able to help you. We only recommend one, which is:

          Alentus Internet Services (See the link at the top of this page)

Their tech support team is qualified and their prices are good.  Throughout this study, we
are going to assume that you are either using the IIS installed on a computer with
'Windows XP Professional' or you are using Alentus. If this was not what you'll be using,
you may need to apply our instructions with small modifications.

KNOW YOUR DOMAIN NAME:
======================

If you are using Windows XP professional operating system:
----------------------------------------------------------

(1) Click on [START], [Control Panel]. Double click on [Adminstrative Tools] then double
    click on [Internet Information Services].

(2) On the left panel, you'll see your computer name with a plus(+) sign. Click on the
    plus sign. Among the new items which should appear, you'll see "Web Sites" with also
    a plus sign.

(3) Click on that plus sign, you should see "Default Web Site". Right click on the
    "Default Web Site" then click on "Properties".

(4) Check two items: 
    a) The "TCP Port" must be 80. 
    b) The IP Address: If you see the phrase (All Unassigned), use the word 'localhost' as
       your Domain name (as will be explained later). If you see 4 numbers seperated with
       dots, use those numbers as your domain name. You can also change this selection to
       become either of the two choices by yourself.

(5) Click on [OK] to close the dialog.

If you are using Alentus web hosting:
------------------------------------

When you open a new account with Alentus or any other hosting service company, You'll be
asked to supply your domain name. If you don't have a domain, they'll get one for you. 

HOW TO CREATE A NEW APPLICATION FOLDER?
=======================================

If you are using Windows XP professional operating system:
----------------------------------------------------------

Your root directory is "c:\\inetpub\wwwroot" if "c" was your root drive. You need to
browse to this folder and create the new folder into it. Then, you must do the following
in order to register your application folder with the IIS:

(1) Click on [START], [Control Panel]. Double click on [Adminstrative Tools] then double
    click on [Internet Information Services].

(2) On the left panel, you'll see your computer name with a plus(+) sign. Click on the
    plus sign. Among the new items which should appear, you'll see "Web Sites" with also
    a plus sign.

(3) Click on that plus sign, you should see "Default Web Site" with a plus sign. Click on
    the plus sign. Locate your new folder and Right click on it then click on "Properties"

(4) You should see a text field labled "Application name" with a button labled "Create" by
    its side. Click on that button, then click on [Apply], [OK].

If you are using Alentus web hosting:
------------------------------------

You don't need to know where your root folder is inside their server. When you access 
your site using your "ftp address", the folder you get is your root folder. If you are
using the Internet Explorer to access your ftp site, you can create a new folder by
selecting [File], [New], [Folder], then naming the folder as you like.

To register your new application folder with IIS, click on 'Set Folder Permissions' on
the left side under the title 'Domains and Websites' then select 'IIS Application' from
the 'Permissions' droplist. Enter your folder name then click on "Submit". When Alentus
team get your message, they will do the job for you and inform you with an e-mail 
message.


WHICH FOLDERS ARE NECESSARY TO BE CREATED?
==========================================

(1) Application folders:
------------------------

Since we expect you to start by practicing with our first 10 examples which create pages
pg1:pg10 stored at our website under the folder name "WPDI", we suggest that you start by
creating an application folder named "WPDI" into your root folder. You must register the
application folder(s) with the IIS as explained above.

(2) Subfolders:
---------------

In your root folder, create 3 subfolders (unless already available) named "Bin", "Images" 
and "Docs" to store the binary files, the images and the document files which your pages
will need to access.

In each of your application folders you must create a "Bin" subfolder. You may also create
"Images" and "Docs" subfolders to store images and document files which are unique for each
application although this may not be necessary.

DO NOT register subfolders with IIS since they are not application folders.

WHERE TO INSTALL PERSONAL C SHARP FILES?
========================================

If you have done things as we have advised in the "General" section, you should have
Personal C Sharp files installed into a non-IIS folder. In that folder, you should see
the file "pcs.exe" and the two subfolders "Bin" and "images". Inside "Bin" you should
find the file "pasp.dll". Do the following:

(1) Using copy/paste, copy all contents of the "images" subfolder of the non-IIS folder
    and past them into the "images" subfolder of the IIS root folder.

(2) Copy the file "pcs.exe" and paste it into the IIS root folder and also into each
    new application folder which you have created.

(3) Copy the file "pasp.dll" and paste it into the "Bin" subfolder of the root and 
    the "Bin" subfolder of each application folder which you have created.

(4) The only files left are the tools files. You can generate them by running "pcs.exe"
    from Command mode at the root and all application folders as described in the
    "General" section or copy them from the non-IIS folder. The necessary tools for web
    applications are:

    pcw.bat, pcwm.bat, out.bat, ln.bat, pcl.bat, SDKVars.bat

If you are using Alentus web hosting:
------------------------------------

(1) Using ftp, create a "Bin" subfolder into the root and each application folder. 

(2) Using copy/paste install a copy of "pasp.dll" into each "Bin" subfolder.

(3) Copy the subfolder "images" with everything it contains to the root folder.

THE 'WEB.CONFIG' FILE:
======================

The IIS default configurations for both your home computer and 'Alentus' are good enough
for running all the PC# web page development examples. However, at your web hosting
service, you may (or may not) like to add this short 'web.config' file to your application
folders in order to allow debugging at the server:

IMPORTANT: In order to force your browser to display the following lines instead of
           executing them we had to replace all angled brackets with squared ones. You
           need to change them back to angled brackets when inserted into the WEB.CONFIG
           file.

[!-- Web.Config Configuration File --]
[configuration]
    [system.web]
        [customErrors mode="Off"/]
    [/system.web]
[/configuration]

WHAT TO DO TO CREATE A WEB PAGE?
================================

See 'Examples on Web Applications". Use Notepad to create each ".cs" file. Save the file
into your application folder. Use the tool "pcw" to create the ".aspx" file;

HOW TO RUN THE PAGE?
====================

If you are using Windows XP professional operating system:
----------------------------------------------------------

If you like to run the file 'pg1.aspx' which is located into the application folder
'WPDI' locally, start the Internet Explorer and type the following into its address line,
then hit [ENTER]:

http://localhost/WPDI/pg1.aspx       or       http://169.254.100.123/WPDI/pg1.aspx
 
depending on what your local domain name should be (see 'Know Your Domain Name' above)
Note that the 4 numbers are used as an example only. Your actual ones could be different. 

If you are using Alentus web hosting:
------------------------------------

If your domain name was 'domain.com', type the following into the browser's address line
followed with [Enter] to access the same page:

http://www.domain.com/WPDI/pg1.aspx

WHAT TO DO NEXT?
================

Now, you should read the "Demonstrative Examples, Web Applications". Good luck!