Running Cassini


Launch the CassiniWebServer controller executable from the command prompt by typing CassiniWebServer.exe or by double-clicking on the file in Windows Explorer. Next you see the dialog box shown in Figure B-2, which you use to configure and start the Web server.

click to expand
Figure B-2: Cassini controller program

In the first text box, enter the physical directory in which the .ASPX pages exist. The directory must exist before you click the Start button. In the second text box, enter the port that should be used to listen for requests. By default, this is port 80, as it is for IIS, so if you are running side by side with another Web server, you will need to pick a different unused port. Note that the port number, when not the default of port 80, must be specified after the machine name in the address bar of your browser. For example, if you chose port 8080, the address for a request to SomePage.aspx on the local machine would be http://localhost:8080/SomePage.aspx.

The third text box accepts a virtual path for the application. The default is a single slash, corresponding to the top level. You can add nesting levels that mimic the structure of nested virtual directories, but be aware that Cassini supports just a single application, and no configuration data from root paths is applied. Remember that only a single directory was given, and Cassini does not know about any other virtual directories.

When you click the Start button, the Web server begins listening on the specified port. Also, in the CassiniWebServer dialog box, a link appears for browsing the application. When you click the link, your browser will launch and take you to the application root. When no page is specified, as in this case, the sample Web server generates a listing of links corresponding to the pages contained in the application directory. Figure B-3 is an example of the directory listing produced by Cassini.

click to expand
Figure B-3: Directory Listing produced by Cassini




Microsoft ASP. NET Coding Strategies with the Microsoft ASP. NET Team
Microsoft ASP.NET Coding Strategies with the Microsoft ASP.NET Team (Pro-Developer)
ISBN: 073561900X
EAN: 2147483647
Year: 2005
Pages: 144

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net