Getting Started

Send mail to Stefan if you run into difficulties when following the instructions below. Some glitches can be expected, because the lab configuration has changed since the bulk of the instructions were written.

  1. Select a machine to connect to

    See the main project resources page for the list of machines, and an explanation.

    The remaining steps of the instructions will be corrected shortly.

  2. Create your project

    Start MS .NET from the "start" menu. Click "Start -> All Programs -> Programming -> Microsoft Visual Studio .NET -> Microsoft Visual Studio .NET".

    Click "File -> New -> Project...". Choose C# in the left pane, then select "ASP .NET Web Application" in the right pane. You will be using the machine you logged onto as the development web server, so select it in the Location box. Append the same login name you used to access SQL server for homework 1 (say, "joeuser") and extend the path with the name of your project. The full location then becomes "http://<local server>/joeuser/bigproject/". To create multiple projects, just select a new project name, but always use your login names as a path prefix, please.

    Click "Ok" when ready - don't be surprised at the error message dialog box - if it appears then use frontpage extensions as mentioned below.

    The error messages says you can't connect to wwwroot$, this is fine. Select the 'use frontpage extensions' method instead, this should work. It takes a few seconds to establish the connection, but then your project is created.

    When everything is ready your project appears in Visual Studio and should look like this (the file/project names differ, of course):

    If you do not see the solution explorer or the toolbox (the crossed hammer and wrench), go to View on the toolbar, then select Solution Explorer and/or Toolbox.

     

  3. Open your project

    After you create your project, every time when you start Visual Studio, you can open it using "Open Project" Button. There is no need now, since you just created the project and it is still open.

  4. Make your first page

    In the solution explorer, right click on the name of the project (in the example it is lunadong). Select "add" and then "add web form."

    A new screen should pop up and ask you for a file name. Give your page a name--it should now show up in the solution explorer. To start working on this page, double click it.
    By default, you are presented with the Design view, but you can click on the tab at the bottom of the page to switch to HTML view and hand code whatever you wish.

    Let's add a "Hello World" message. 

    When you point to the tool-box icon on left-hand side, you can see a bunch of web form design tools. 

    Click on the label in the toolbox. Now drag a rectangle over the grid. A rectangle appears on the grid (says Label1 on it). Right click that rectangle and go to Properties. The properties box appears on your screen (most likely right under the solution explorer). Go to the Text Property and change it to Hello World (just type it).

    You are ready to view your page--one more step. In solution explorer, right click your page in Solution Explorer and click on "Set as a startup page". This way you designate your page as the first one to be served as a user accesses your site.

    To compile and deploy your project, go Debug -> Run without Debug.

  5. Debugging

    Debugging is no issue at all because you have local administrative privileges on the server you log onto, or are using as a terminal server. Just run your project in debugging mode as usual with Visual Studio.