I³M Server


This is the server part of the project. This project was born at University of Applied Sciences in Konstanz Germany.
Hier you can learn about the server and how to bring it to life.

Things you need

Things nice to have 

Setting up the envirement

If not already done, install the .NET Envirement. The needed things you can find at www.microsoft.com/downloads. At least you need the .NET-runtime (dotnetfx.exe about 20MB). If you are a developer it is advisible to install the .NET-SDK too (more then 100MB).

If you don't have any cvs-client you can try TortoiseCVS (http://www.tortoisecvs.org/). It's nice and simple in use.
As a none developer you would use the anonymous cvs access:
With a command line client:
    cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/i3m login
    cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/i3m co i3mserver
With TortoiseCVS:
    Use the windows explorer to choose the directory where the source code should be copied in, for example c:\MyProjects\.
    Right click in the explorer window should bring a usual popup menu with two two additional cvs entries: Choose "CVS Checkout".
    As protocol choose "Password server (:pserver)" without " "
    As server "cvs.sourceforge.net"
    As repository folder "/cvsroot/i3m"
    As User name "anonymous"
    And at least the Module "i3mserver"

Now in CVSROOT: line you should see ":pserver:anonymous@cvs.sourceforge.net:/cvsroot/i3m". Besides, it is enough to copy and paste this into CVSROOT: line to fill out all needed fields except module name ;-).
Click OK and wait. Now you should see a window with green file names that are downloaded. If ready, click OK.

NOW  you have all project files on your harddisk and need the SharpDevelop found at http://sourceforge.net/projects/sharpdevelop/. Take the latest release (at this time it's 0.98). Install if not already done.
Go into project directory as example above it would be c:\MyProjects\i3mserver
Doubleclick on I3MNamespace.cmbx. SharpDevelop should start. Sorry for german source code comments, someday they would be changed to english.
Go to menu Project/Project Options. Choose Configurations. Then Debug for debugging version (slow) or Release (faster). Next go to Output and set Output Path for the compiled assembly. It is usually the source code directory pluss bin/debug or bin/release, but you can set it to other destination.
Open I3M.cs at line 24 you would find this:
 If you are using IIS, than you should change this namespace to your lacation, for example [WebService(Namespace="")]. I've experienced some trouble to access the application if i did not changed it.
Open Dispatcher.cs and look for the line 82 in constructor
if it is true, change it to false (explanations for this you would find farther in text).

Compile the project :Run/Build Combine

Create a new directory for the web application, let's take for example c:\i3mserver. In there create two new subdirectories bin for web application and db for the database. The bin directory must have the name bin. For the database you can choose your own directory.
Now copy following files from c:\MyProjects\i3mserver\ASP:NET\gui into c:\i3mserver :
Copy the compiled assembly I3MNamespace.dll into c:\i3mserver\bin. If you want to debug the application, you should copy the symbol file I3MNamespace.pdb too.
The last file to copy is the database i3m.mdb from c:\MyProjects\i3mserver\ASP:NET\db into c:\i3mserver\db

Open I3MServer.config with a text editor and search for <Entry key="DBPath" value="D:\FH\Projekt\... i3m.mdb"/>. change value to your location of the i3m.mdb. Save.

Since I don't have IIS, I could not explain how to set it up. The only thing I remember is that you create a virtual directory and set it to location where i3m.asmx is in our example c:\i3mserver

Cassini is a Microsoft Web Server example. It is not a fully functioning web server! It has no support, no ftp, no cgi and no security options.
But it is able to run an ASP.NET application and it's for free. It is only for testing of your web applications and not for the real use.
But if you want/have to use Cassini, get source code from www.asp.net (http://www.asp.net/Projects/Cassini/Download/). It is easy to compile. The only thing to do is to start build.bat. Beware, Cassini is answering the requests only from the same PC. There is a restriction in the source code. If you wannt to change it, look in forum at www.asp.net.

If you are done, you can start Cassini. To make it easier, create a run.bat file in cassini directory. Open file and write

            CassiniWebServer c:\i3mserver 80 /

Save, and start it. Now you should see Cassini-window.

In the web browser type in "http://localhost". You should see the contents of c:\i3mserver. Click on i3m.asmx. At this moment asp.net creates a test for you, so it brings all methodes of the web service on the screen. Search for getVersion and click it. Next click on Invoke button, Then you should see following:

         <?xml version="1.0" encoding="utf-8" ?>
         <string xmlns="http://webserv2.fh-konstanz.de/i3m/">0.1a</string>

or something like that. The other methods would not work because that need login. Thats why you need the client to test if the web application realay works.