前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >部署webapi,singalR的坑

部署webapi,singalR的坑

作者头像
申君健
发布2018-09-21 15:44:42
1.1K0
发布2018-09-21 15:44:42
举报
文章被收录于专栏:前端侠2.0前端侠2.0

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

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2015/02/12 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档