问题
Currently the local webserver exectutes at http://localhost:51377
Is there any option of customizing the web server in order executing under http://192.168.1.2:51377 (where 192.168.1.2 is my static intranet ip address)
回答1:
Cassini will only serve local requests. If you want a lightweight webserver you may want to take a look at UltiDev
回答2:
I just released the CassiniDev 3.5.1/4.0.1 beta with a simple test fixture example if you are interested.
Supports arbitrary IP and Host name
Cassini for Developers and Testers: http://cassinidev.codeplex.com
回答3:
If the intention is for allowing other people on your network to connect to your development server, the answer is no. Cassini is specifically built to reject any outside connections.
If for some reason you need to reroute it, you could add an alias in your hosts file to redirect "localhost" to 192.168.1.2 instead of 127.0.0.1. I've never tried this, and it may not work anyway, due to the above mentioned reason - Cassini may interpret it as an outside connection.
回答4:
If you want, you can easily just use Fiddler (www.fiddler2.com) to redirect requests from an arbitrary address to the Cassini loopback address.
回答5:
you can patch cassini(WebDev.WebServer.exe) to unlock the localhost loopback restriction --> http://eeichinger.blogspot.com/2009/12/sniff-http-traffic-with-aspnet.html
In other words, allow outside connections and debug them inside Visual Stuido :-)
来源:https://stackoverflow.com/questions/1133615/customizing-the-cassini-webserver