标签:
我的系统是win2008,iis7.部署webapi后,应用池只能用经典模式。且要添加一个映射:
api/* 指向: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
那为什么集成模式不行呢,微软这么说:
http://www.asp.net/mvc/overview/older-versions-1/deployment/using-asp-net-mvc-with-different-versions-of-iis-cs
它提供两个方案,1、使用文件后缀名,比如 /Product.mvc/Details/3 添加.mvc 或 .aspx等后缀。
2、添加对 * 的映射到asp.net。 (还不知道会不会对静态文件有影响)
总之,我没有测试上面的方法。退一步,还是改成经典模式算了。
SingalR呢,直接要求IIS8.0才支持websocket. 而IIS7不能升级,除非升级系统。
微软说:"Note that for SignalR to use WebSockets, Windows Server 2012 or Windows 8 is required"
for SignalR to use WebSocket, IIS 8 or IIS 8 Express must be used, the server must be using Windows 8, Windows Server 2012, or later, and WebSocket must be enabled in IIS. For information on how to enable WebSocket in IIS
IIS 8 or IIS 8 Express.
IIS 7 and 7.5. Support for extensionless URLs is required.
IIS must be running in integrated mode; classic mode is not supported. Message delays of up to 30 seconds may be experienced if IIS is run in classic mode using the Server-Sent Events transport.
The hosting application must be running in full trust mode.
看到啦,不仅是IIS8,并且是集成模式才行。否则只能用其它方式进行连接了。
彻底打消了我的念头,实在想添加websocket的应用时,还是用socket.io等其它办法吧!
标签:
原文地址:http://my.oschina.net/u/1540190/blog/377989