部署webapi,singalR的坑

我的系统是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等其它办法吧!

转载于:https://my.oschina.net/u/1540190/blog/377989

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值