Hi, there.
Would it be possible to provide the exact exception information including stack trace? Also, does the exception occur when you register the application or when you access it? If it's when you access it, then it may have to do with the "index" parameter not being "index.htm" or "index.aspx". Otherwise your code looks alright. Please also check Windows Event Log to see if you have any error entries there related to Cassini and/or your application.
Please note that final release of Cassini has a capability of registering and unregistering applications from setup project custom actions, without having to write any code at all.
All the best,
UltiDev Team.
Please donate at
http://www.ultidev.com/products/Donate.aspx to help us improve our products.