惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
Help Net Security
Help Net Security
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
L
LINUX DO - 热门话题
Security Latest
Security Latest
A
Arctic Wolf
G
GRAHAM CLULEY
月光博客
月光博客
S
Securelist
D
Docker
J
Java Code Geeks
T
Troy Hunt's Blog
T
Tenable Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
SecWiki News
SecWiki News
S
Security @ Cisco Blogs
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 最新话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
aimingoo的专栏
aimingoo的专栏
博客园 - 【当耐特】
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
Netflix TechBlog - Medium
Vercel News
Vercel News
Forbes - Security
Forbes - Security
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
B
Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Check Point Blog
云风的 BLOG
云风的 BLOG
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Blog of Author Tim Ferriss
L
Lohrmann on Cybersecurity
F
Full Disclosure
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed

博客园 - LutzMark

charles4抓https请求的注意事项,补充iphone7(ios10系统)无法解密ssl问题 XCode设置自己windows习惯的快捷键(比如Home、End键) MVC项目中ExecutionTimeout不生效的解决方案 Delegate与Event的区别 坑爹的MSN登录错误80072745 Linq的sum函数InvalidOperationException异常解决办法 LINQ to SQL自定义映射表关系(1:N or 1:1) LINQ to SQL 外键约束的插入及获取主表标识列等问题 Flex中的 for in 与 for each in - LutzMark Flex的DataGrid将水平分隔线设为虚线 - LutzMark - 博客园 解决Flex的DataGrid控件中ItemRender随Scrollbar的滚动发生UI重绘问题 - LutzMark - 博客园 去除ColumnChart自带的阴影效果 - LutzMark - 博客园 使用DataAdpater自动批量更新DataSet中的数据到数据库 委托的Invoke 和 BeginInvoke 与Control的Invoke和BeginInvoke(转-因为写得很好) 控制台测试异步委托 一篇好文,以在迷茫时阅读 驳《IT开发工程师的悲哀》 钢板与表针 不用临时变量,只用11个字符交换两个变量的值——窥视C#编译原理的冰山一角
IIS7中配置WebOrb支持RTMPT
LutzMark · 2010-01-29 · via 博客园 - LutzMark

项目中用到WebOrb的Real-time messaging,考虑到rtmp协议需要配置服务器防火墙打开2037端口,最终选择rtmpt协议。配置中遇到一些麻烦,主要是iis7还是不熟悉,经过一番周折还是搞定了。以下是WebOrb官方的配置指导:

http://www.themidnightcoders.com/fileadmin/docs/dotnet/guide/index.htm

WebORB provides support for RTMPT thus enabling communication between real-time messaging clients and server applications, streams and remote shared objects over port 80. There are special configuration requirements for RTMPT:

  1. WebORB must be deployed in the root of a website.
  2. Special HTTP handler mappings must be added to web.config
  3. The website must be configured to route POST requests via ASP.NET

Follow the steps described below to configure IIS and WebORB to process RTMPT requests:

  1. Configure website root to run as an application.

    Open IIS Manager and select the root node for the website where RTMPT must be enabled. Open the Properties window and select the 'Home Directory' tab:

    In the Application Settings section, make sure there is an application associated with the website. If not, click the Create button to the right from the Application name field.

  2. Configure application to route requests through ASP.NET.
     

    Click the Configuration button in the Application Settings section of the Home Directory tab.

    Click "Insert..." to add a wildcard application map and enter the full path to aspnet_isapi.dll for your .NET installation.
    (path in our testing environment is c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll).
    Make sure to uncheck the "Verify that file exists" checkbox.

    Click OK to accept the values.

  3. Deploy WebORB in the website root.Create "bin" folder and copy the following assemblies from the default WebORB installation path (wwwroot/weborb30/bin):
    • weborb.dll
    • cpuinfo.dll
    • Npgsql.dll
    • NHibernate.dll
    • MySql.Data.dll
    • Mono.Security.dll
    • any assemblies with user application code

    Copy weborb.config into the website root folder.
     

  4. Deploy messaging applications.

    Create /Applications folder in the website root folder. Create subfolders corresponding to the messaging applications. A subfolder may contain application configuration file (app.config) with a reference to the application handler class
     
  5. Register WebORB RTMPT handler.

    If there is no web.config in the website root folder, copy it from the default WebORB installation directory (wwwroot/weborb30).

    Add the following configuration to the <httpHandlers> section:

    <add verb="*" path="/open/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler"/>
    <add verb="*" path="/send/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler"/>
    <add verb="*" path="/idle/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler"/>
    <add verb="*" path="/close/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler"/>
    <add verb="*" path="/open/*/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler"/>
    <add verb="*" path="/send/*/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler"/>
    <add verb="*" path="/idle/*/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler"/>
    <add verb="*" path="/close/*/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler"/>

     

IIS7中的设置

选择"Handler Mappings" -> "Add Wildcard Script Map..."

 

Choose aspnet_isapi.dll as an executable and give this script mapping some meaningful name, such as ASP.NET-ISAPI-2.0-Wildcard. After that click OK and then click Yes in the "Add Wildcard Script Map" dialog.

Next, switch to the ordered list view for the handler mappings by clicking on "View Ordered List..." action and move the newly created mapping to the bottom of the list just before the StaticFile handler mapping:

最关键的一点,对应官方给的II6中配置第五步,添加相应的托管HttpHandler(IIS7的Handler Mappings右侧 Add Managed Handler...)

 

根据官方第5步Register WebORB RTMPT handler.填写相应的请求路径

全部加好后:

比较一下IIS6和IIS7的Web.config不同之处

IIS6:

<system.web>

<httpHandlers>

      <add verb="*" path="/open/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" />
      <add verb="*" path="/send/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" />
      <add verb="*" path="/idle/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" />
      <add verb="*" path="/close/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" />
      <add verb="*" path="/open/*/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" />
      <add verb="*" path="/send/*/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" />
      <add verb="*" path="/idle/*/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" />
      <add verb="*" path="/close/*/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" />
      <add verb="*" path="weborb.aspx" type="Weborb.ORBHttpHandler" />
      <add verb="*" path="codegen.aspx" type="Weborb.Management.CodeGen.CodegeneratorHttpHandler" />
    </httpHandlers>

...

</system.web>

IIS7:(注意IIS7中会使用最下面的  <system.webServer>节点)

  <system.webServer>

    <handlers>

      <add name="rtmptHttpHandler1" verb="*" path="/open/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" resourceType="Unspecified" preCondition="integratedMode"/>

      <add name="rtmptHttpHandler2" verb="*" path="/send/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" resourceType="Unspecified" preCondition="integratedMode"/>

      <add name="rtmptHttpHandler3" verb="*" path="/idle/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" resourceType="Unspecified" preCondition="integratedMode"/>

      <add name="rtmptHttpHandler4" verb="*" path="/close/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" resourceType="Unspecified" preCondition="integratedMode"/>

      <add name="rtmptHttpHandler5" verb="*" path="/open/*/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" resourceType="Unspecified" preCondition="integratedMode"/>

      <add  name="rtmptHttpHandler6" verb="*" path="/send/*/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" resourceType="Unspecified" preCondition="integratedMode"/>

      <add name="rtmptHttpHandler7" verb="*" path="/idle/*/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" resourceType="Unspecified" preCondition="integratedMode"/>

      <add name="rtmptHttpHandler8" verb="*" path="/close/*/*" type="Weborb.Messaging.Net.RTMPT.RTMPTHttpHandler" resourceType="Unspecified" preCondition="integratedMode"/>

      <add name="codegen.aspx_*" path="codegen.aspx" verb="*" type="Weborb.Management.CodeGen.CodegeneratorHttpHandler" preCondition="integratedMode,runtimeVersionv2.0" />

      <add name="weborb.aspx_*" path="weborb.aspx" verb="*" type="Weborb.ORBHttpHandler" preCondition="integratedMode,runtimeVersionv2.0" />

    </handlers>

   ...

  </system.webServer> 

另外,值得一提的是flex代码中的NetConnection实例的uri要做相应修改

例如

原:"rtmp://192.168.1.123:2037/Chat/"

修改后::"rtmpt://192.168.1.123/Chat/"