2011-03-13 29 views
1

我正在嘗試使用Word Automation Services進行服務器端doc/docx到pdf的轉換。我正在使用MSDN的基本示例鏈接:http://msdn.microsoft.com/en-us/library/ff742315.aspx,並且每次調用ConversionJob的Start()方法時都會遇到一個模糊的錯誤。這是例外;Sharepoint Word自動化服務異常

來源:mscorlib程序

消息:An不安全或不正確地擔保故障從另一方接收。查看故障代碼和細節的內部FaultException。

InnerException:System.ServiceModel.FaultException:驗證消息的安全性時發生錯誤。

堆棧跟蹤:服務器堆棧跟蹤:在System.ServiceModel.Channels.SecurityChannelFactory 1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout) at System.ServiceModel.Channels.SecurityChannelFactory 1.SecurityRequestChannel.Request(消息消息,時間跨度超時)在System.ServiceModel.Dispatcher.RequestChannelBinder.Request(消息消息,時間跨度超時)在系統System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime操作)上System.ServiceModel.Channels.ServiceChannel.Call(字符串操作,布爾oneway,ProxyOperationRuntime操作,Object [] ins,Object []出,TimeSpan超時) .ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage消息)異常rethrown在[0]:在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (MessageDataMicrosoft.IdentityModel.Protocols.WSTrust.IWSTrustContract.Issue(Message message)at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst,RequestSecurityTokenResponse & rstr)at Microsoft.IdentityModel.Protocols.WSTrust(msgData,Int32 type) .WSTrustChannel.Issue(RequestSecurityToken rst)在Microsoft.SharePoint.SPSecurityContext.SecurityTokenForContext(Uri上下文,布爾bearerToken,SecurityToken onBehalfOf,SecurityToken actAs,SecurityToken委託)在Microsoft.SharePoint.SPSecurityContext。 <> c_ DisplayClass7.b _6()at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)at Microsoft.SharePoint.SPSecurityContext.GetProcessSecurityTokenForServiceContext()at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForServiceContext(Uri contextUri)at Microsoft。 Microsoft.Office.Word.Server上的Microsoft.Office.Word.Server.Service.ConfigChannelFactory上的SharePoint.SPChannelFactoryOperations.InternalCreateChannelActingAsLoggedOnUser [TChannel](ChannelFactory 1 factory, EndpointAddress address, Uri via) at Microsoft.SharePoint.SPChannelFactoryOperations.CreateChannelActingAsLoggedOnUser[TChannel](ChannelFactory 1 factory,EndpointAddress address)1.CreateChannel() at Microsoft.Office.Word.Server.Service.WordServiceApplicationProxy.AddJob(Ucid ucid, Nullable 1 subscriptionId,SPUserToken userToken,ConversionJobSettings settings,String name) .Conversions.ConversionJob.Start()at VisualWebPartProject1.VisualWebPart1.VisualWebPart1UserControl.Page_Load(Object sender,EventArgs e)

我在我們的一個SharePoint站點中嘗試了相同的代碼,仍然遇到同樣的錯誤。在Wcf服務中嘗試這個結果相同。我爲這個和相同的錯誤做了一個可視化的Web部件。更改用戶帳戶或RunWithElevatedPrivileges也沒有幫助。

由於樣品需要和Microsoft.SharePoint程序命名空間Microsoft.Office.Word.Server.Conversions,我要跑上安裝一些有服務器的SharePoint驗證碼。所以恕我直言,時間偏差問題是不相關的,因爲代碼是通過Word Automation Services所在的同一臺服務器運行的。我期望在SharePoint服務器端有一些配置問題,但我不知道要檢查什麼。

讓我知道是否需要其他細節,謝謝。

回答