http://www.ccs.neu.edu/teaching/web/The .NET web pages and web services that you will write must be served on the college IIS server whose network address is:
development.ccs.neu.edu
In order to have a home directory on this server, you must go through a startup process in which you validate yourself, answer some questions on acceptable use policy, and then direct the startup program to set up your home directory and also set up your SQL login. To do this, go to the following link:
http://www.development.ccs.neu.edu/
You will see the following form that will guide you through the startup process in a step-by-step fashion. Be sure to run all steps and be sure to write down the SQL password that you will receive. You will need this password to access the SQL Server database and set up the necessary connection strings.
As of January 2008, we have upgraded the IIS server to not only serve the existing pages under ASP.NET 3.0 but also to serve all newly created pages using ASP.NET 3.5. Although ASP.NET 3.5 is backward compatible with ASP.NET 3.0, we decided that it would be convenient to start fresh because ASP.NET 3.5 allows many tasks to be done in a much simpler fashion than in ASP.NET 3.0.
The consequence of these decisions is that ASP.NET 3.5 sites
will be served from the directory v3.5 in your
home directory on the server. If you had an account on the
server in the past, you will also have have a v2.0
directory which was the common directory for both ASP.NET 2.0
and its upgrade to ASP.NET 3.0. If you have just created your
account, you will not have a v2.0 directory.
The bottom line is:
Put all new files in the v3.5
directory.
Once you do this, users will reach your site using a URL of the form:
http://net35.ccs.neu.edu/home/yourusername/
Here yourusername is your CCIS login username.
In particular, all students must have a CCIS login.
Note that the form of your web URL assumes that your v3.5
directory on the server has a file whose name is Default.aspx
plus its “code behind” file Default.aspx.cs. When
you create a new web site in Visual Studio 2008 with C#
as the default language, you will see that two such files are created
for the local home folder. For testing purposes, you should add a bit of
simple content to the Default.aspx file that states:
This is the site of so-and-so.
Here is a sample of what the placeholder Default.aspx
might then look like for Richard Rasala:
<%@ Page
Language="C#"
AutoEventWireup="true"
CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>This is the site of Richard Rasala</h1>
</div>
</form>
</body>
</html>
There is no need to change Default.aspx.cs since you will
not yet write “code behind”.
You will notice that Visual Studio 2008 also creates a file with the
name web.config. You will later need to make additions
to this file but for the moment its default XML content is fine.
To deploy your first site to the server, you must upload the following 3 files:
Default.aspxDefault.aspx.csweb.configHow to upload is the topic of the next section.
The first step to accessing your site is to create a profile in Secure Shell (SSH) that creates a connection to the Secure FTP server that is associated with the IIS server. The network address of the Secure FTP server is now:
sftp.development.ccs.neu.edu
Below is a screen snapshot of the screen that shows a profile except
that since the snapshot is old it does not show the sftp.
prefix that is now required. You should imitate this in creating
your profile.
Notice that the user name has the special form:
ccis-windows\yourusername
This form is required because SSH is validating you through Windows authentication but is not smart enough to add the prefix automatically.
Once your SSH profile is set up, you can invoke the profile from the Profiles menu in SSH and log into your site on the IIS server. When you login, you will get the following message:
Shell access has been disabled by the system administrator.
Do not be disturbed since this is normal. The CCIS systems staff will permit you to login but for security reasons will not permit you to execute any commands from the login shell you have just opened. You may only execute available commands from the SSH menus. The two most common commands that you will execute are:
The New File Transfer command will open a file transfer window so you can drag-and-drop files from the machine you are working on to the IIS server or vice versa. You may also do other file operations using SSH menu options.
The Disconnect command will close your connection to the IIS server. You must close the connection in this manner since you have no shell access and therefore cannot type a logout command directly.
Here is a screen snapshot taken from Rasala’s File Transfer window:
Again, since this snapshot is old, it shows the home directory with
the v2.0 directory. You will have a v3.5
directory which you should use instead. Unless you have set up an
ASP.NET site before this term, you will not have a v2.0
or www directory. You will certainly not have a folder
called teachingfiles since that is a private data
directory for Rasala’s site.
The files that are served using ASP.NET 3.5 will be the files that you
place inside the v3.5 directory.
Before beginning file transfer, you should normally go into the
v3.5 directory or one of its subdirectories as your needs
dictate. You may then drag-and-drop files from corresponding folders
on your Windows machine.
After any file transfer, you will get an informative message
listing the number of files and the bytes transferred.
DONE - ... Files ... Total
Encountered 1 errors.
For some reason, you will also be told that there was an error but this is in fact not true so ignore it.
The server does not serve files at top level in your home directory
or from subdirectories other than v3.5 and the legacy folders
v2.0 and www. This is really helpful.
As you can see from the teachingfiles example above,
you are permitted to create data directories within your home that you
can access from your web site but which cannot be served under any
circumstances. This provides very good security for data that you may
not want to be visible to hackers or to be shown via Sources Server.
It is easy to access your home directory on the IIS server if you are logged into a CCIS Lab PC. It is also problematic as we will explain below.
Step 1: Open the Windows Explorer program.
Step 2: Type in \\development\net\home\yourusername
as the directory location in the URL bar.
This is illustrated in the following screen snapshot of Rasala’s directory on the IIS server.
You may now drag-and-drop or manipulate files at will. However, here is the problem. Sometimes, when you drag files from your lab PC to the the IIS server, Windows does not set the target file permissions right. Then, you have problems downstream. This is such an annoyance that we recommend using SSH for file transfers even when on a CCIS lab PC.
Warning: You may even use Visual Studio 2008 to edit files on the server directly if you are on a CCIS lab PC but this is discouraged in the strongest possible terms. Editing files on the server live may lead to having mangled or incomplete files served to users. In the worst case, after a live edit, a site may fail to serve at all. A few years back, one student who insisted on live edit as a strategy took 5 weeks to get a site working. This was simply insane.
From a software engineering viewpoint, the only appropriate behavior is to write and thoroughly test all files locally and then to upload only when you believe the files will work. After upload, you must test to confirm or refute your belief that everything is fine.
Keep in mind the mantra of all software develoment: Backup! You should always have copies of your files in at least 2 places. If you are logged in on a lab machine in the college, then you should save your files on the Z: directory which is directly tied to your UNIX login directory and is therefore backed up by Systems. If you are using your own machine, make a backup strategy and live by it. In either case, if you are about to make dangerous changes to your local site, make a temporary copy of the local site somewhere so you can fall back if needed. You can always delete the temporary copy once you know that all is well.