定制卡西尼网络服务器
目前本地网络服务器在 http://localhost:51377 执行
是否有任何选项可以自定义网络服务器以便在下执行http://192.168.1.2:51377 (其中 192.168.1.2 是我的静态内网 IP 地址)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
如果您有兴趣,我刚刚发布了 CassiniDev 3.5.1/4.0.1 beta 和一个简单的测试夹具示例。
支持任意 IP 和主机名
Cassini 供开发人员和测试人员使用:http://cassinidev.codeplex.com
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
卡西尼号将仅满足本地请求。 如果您想要一个轻量级网络服务器,您可能需要看看 UltiDev
Cassini will only serve local requests. If you want a lightweight webserver you may want to take a look at UltiDev
如果目的是允许网络上的其他人连接到您的开发服务器,那么答案是否定的。 卡西尼号是专门为拒绝任何外部连接而设计的。
如果由于某种原因您需要重新路由它,您可以在主机文件中添加别名以将“localhost”重定向到 192.168.1.2 而不是 127.0.0.1。 我从来没有尝试过这个,而且由于上述原因,它可能不起作用 - 卡西尼号可能会将其解释为外部连接。
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.
如果需要,您可以轻松地使用 Fiddler (www.fiddler2.com) 将请求从任意地址重定向到 Cassini 环回地址。
If you want, you can easily just use Fiddler (www.fiddler2.com) to redirect requests from an arbitrary address to the Cassini loopback address.
您可以修补 cassini(WebDev.WebServer.exe) 以解锁本地主机环回限制 -->
http://eeichinger.blogspot.com/2009/ 12/sniff-http-traffic-with-aspnet.html
换句话说,允许外部连接并在 Visual Stuido 中调试它们:-)
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 :-)