1
我有一個自己託管的WCF服務器設置,它提供了一個clientaccesspolicy.xml和一個index.htm,它只是指向我的xap(可通過app.xap訪問)。如何_properly_從自託管的WCF服務提供XAP文件?
我目前正在通過下面的代碼爲他們提供服務:
Public Function GetPolicy() As System.IO.Stream Implements IClientAccessPolicy.GetPolicy
WebOperationContext.Current.OutgoingResponse.ContentType = "application/xml"
Return New IO.MemoryStream(IO.File.ReadAllBytes("Server Files/ClientAccessPolicy.xml"))
End Function
Public Function GetIndex() As IO.Stream Implements ISilverlightServer.GetIndex
WebOperationContext.Current.OutgoingResponse.ContentType = "text/html"
Return New IO.MemoryStream(IO.File.ReadAllBytes("Server Files/index.htm"))
End Function
Public Function GetXap() As IO.Stream Implements ISilverlightServer.GetXap
WebOperationContext.Current.OutgoingResponse.ContentType = "application/x-silverlight-app"
Return New IO.MemoryStream(IO.File.ReadAllBytes("Server Files/app.xap"))
End Function
它的工作原理,其實我之後的工作。但是,我不認爲這適用於xap,我知道這是一種流式傳輸。如果這不是正確的流式傳輸,我應該如何傳輸它?
(在該XAP和index.htm的文件是通過未來端點具有的WebHttpBinding綁定)
它是否被正確傳輸的內容?或者我應該做一些改變?
謝謝,那麼什麼是'負載屏幕'東西的先天?只是下載進度? – 2011-06-14 04:02:03
SL頁面加載時出現的「盤旋點」?是的,我認爲這是一個下載進度指示器。 – carlosfigueira 2011-06-14 05:23:20