无法以编程方式创建实时平滑流式发布点

时间:2012-07-12 19:44:23

标签: rest iis live smooth-streaming

我正在尝试使用REST API for IIS Media Services以编程方式创建Live Publishing点。为此,我正在向此URL发送POST调用:

http://127.0.0.1/services/smoothstreaming/publishingpoints.isml/settings 

我在请求中包含了两个自定义标头:

Content-Type: application/atom+xml
Slug: /test.isml

这是请求的主体:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <entry xmlns="http://www.w3.org/2005/Atom">
    <id>http://127.0.0.1/test.isml/settings</id>
    <title>Test</title>
    <updated>2012-07-12T19:13:25Z</updated>
    <content type="application/xml">
      <SmoothStreaming xmlns="http://schemas.microsoft.com/iis/media/2011/03/streaming/management">
        <Settings>
          <Title>Test</Title>
          <SourceType>Push</SourceType>
          <AutoStart>false</AutoStart>
          <AutoRestartOnEncoderReconnect>false</AutoRestartOnEncoderReconnect>
          <LookAheadChunks>2</LookAheadChunks>
          <Archive enabled="false">
            <Path useEventIdOnPath="false" />
          </Archive>
          <ClientConnections enabled="true">
            <ClientManifestVersion>2.0</ClientManifestVersion>
          </ClientConnections>
          <ServerConnections enabled="false">
            <SendEndOfStreamOnStop>false</SendEndOfStreamOnStop>
          </ServerConnections>
        </Settings>
      </SmoothStreaming>
    </content>
  </entry>

IIS正在向我发出405 /错误请求错误:

<?xml version="1.0" encoding="UTF-8"?>
<SmoothStreaming xmlns="http://schemas.microsoft.com/iis/media/2011/03/streaming/management">
  <Error>
    <ErrorCode>0x80880026</ErrorCode>
    <ErrorMessage>The resource contains one or more elements that contain invalid data. For information about valid resource representations, please see the documentation for the supported schemas.</ErrorMessage>
  </Error>
</SmoothStreaming>

任何人都知道我在这里做错了什么?

1 个答案:

答案 0 :(得分:0)

忽略“Archive”和“ServerConnections”节点修复它。不确定它们中是否有任何错误,或者如果在启用= true时它们应该被包括在内。