Command Line Reference

Both CassiniDev and CassiniDev-console can be started with command line arguments.

In the case of the GUI application, if a valid ApplicationPath is supplied and there are no conflicts with any supplied IP or Port arguments the server will automatically start upon show.

In the case of the console application, if an invalid application path is supplies or there is any conflict with any supplied IP or Port arguments an exception will be reported and the application will exit.

Argument Short Form Details
/help /? Display Usage
/ApplicationPath: /a: NOTE: Paths containing spaces must be quoted but be sure to omit trailing slash from quoted paths as the parse will interpret \" as an escaped quote and fail
/VirtualPath: /v: Default value: '/'
/HostName: /h: Is used to construct RootUrl for hosted application. HostName is optional unless AddHost is true. If null, 'localhost' or IP Address are used.
/AddHost{+|-} /ah: Default value: '-' Add temporary entry to hosts file to facilitate named DNS resolution. Entry is removed when server is stopped. Write permissions to the hosts file are required and process elevation via UAC required on Vista/Win7/Server2008.
/IPMode:{Loopback Any Specific} /im: Default value: 'Loopback'
/IPAddress: /i: Ignored unless IPMode = 'Specific'
/IPv6{+|-} /v6: Default value:'-' Ignored unless IPMode = 'Any' or 'Specific'
/PortMode:{FirstAvailable Specific} /pm: Default value:'FirstAvailable' If PortMode = 'FirstAvailable' the specified port range is scanned for the first available port.
/Port: /p: Ignored unless PortMode = 'Specific'
/PortRangeStart: /prs: Default value:'8080'
/PortRangeEnd: /pre: Default value:'9000'
/WaitForPort: /w: Default value:'0' Length of time, in ms, to wait for specific port to become available. 0 = no wait. Ignored in GUI mode.
/TimeOut: /t: Default value:'0' Length of time, in ms, to sit idle before stopping server. 0 = no timeout.

Command Line Examples

Unless otherwise stated, CassiniDev.exe and CassiniDev-console.exe behavior is similar.

CassiniDev.exe
Start GUI application idle.

CassiniDev.exe /a:c:\projects
or
CassiniDev-console.exe /a:c:\projects

Start GUI or console application auto hosting c:\projects on http://localhost and the first available port starting with 8080.

CassiniDev.exe /a:c:\projects /pm:Specific /p:8080
or
CassiniDev-console.exe /a:c:\projects /pm:Specific /p:8080

Start GUI or console application auto hosting c:\projects on http://localhost:8080/.

CassiniDev.exe /a:c:\projects /im:Specific /i:192.168.0.1 /pm:Specific /p:81 /v:/myapp /ah+ /h:mycomputer.com
or
CassiniDev-console.exe /a:c:\projects /im:Specific /i:192.168.0.1 /pm:Specific /p:81 /v:/myapp /ah+ /h:mycomputer.com

Start GUI or console application auto hosting c:\projects on http://mycomputer.com:81/myapp and add hosts file entry.

Last edited May 18, 2010 at 4:42 AM by Sky, version 9

Comments

rocketmonkeys Sep 21, 2011 at 4:31 PM 
Also,it's "/ip:" and not "/i:"

rocketmonkeys Sep 21, 2011 at 4:29 PM 
"IPMode" is a typo, it must be "ipMode" (case sensitive). Other params on this page may have the wrong case as well.