2012-07-12 22 views
0

我試圖使用REST API爲IIS媒體服務以編程方式創建實時發佈點。對於這一點,我將送一個POST調用此URL:無法以編程方式創建實時平滑流發佈點

我已經包含了兩個自定義頁眉請求:

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> 

任何人都知道我在這裏做錯了嗎?

回答

0

完成「歸檔」和「服務器連接」節點修復它。不確定它們中是否有任何錯誤,或者它們是否只有在啓用= true時才被包含。

相關問題