Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 03, 2012 05:54 PM by dkirk
Apr 26, 2012 12:35 AM|LINK
Hi there I am using CassiniDev server (one which is used by VS2010 as a local ASP.NET development server ).
I have a class MyCassiniDevUtil which has following method:
public CassiniDevServer launchWebsite(string path, string navigate, int _portNo)
CassiniDevServer _server = new CassiniDevServer(); ///server
_server.StartServer(path, _portNo, "/", "localhost");
portNo = _portNo;
System.Diagnostics.Process.Start("http://localhost:" + portNo +
"/" + navigate);
But because I am not setting the TimeOut option of the server, after some time when I refresh the webpage. the browser says Cannot connect. How can I set the TimeOut option of the CassiniDev server?
May 02, 2012 01:30 AM|LINK
Hi, hope this helps:
May 02, 2012 02:09 PM|LINK
I did some research on this. To be honest, I haven't use this. But try by playing a bit with the StartServer method. There may be an overloaded version of that method which take TimeOut as a parameter. Not sure whether this will help or not, but see the
second answer of the following StackOverFlow thread
Please 'Mark as Answer' if this post helps you.
May 03, 2012 05:54 PM|LINK
I am hosting the cassinidev server from within a winform app and ran into the same problem earlier. Instead of creating the CassiniDevServer object as you are in your example, use the Server object as shown below, it is overloaded and in the example below
86400000 is the timeout. This is working fine for me.
private readonly Server _server;
_server = new Server(81, "/", Path.Combine(Environment.CurrentDirectory, "WebContent"), IPAddress.Parse("220.127.116.11"), "localhost", 86400000);
and then to shutdown the sever use: