I am trying to do a server side doc/docx to pdf conversion using Word Automation Services. I am using the basic sample from MSDN, Link: http://msdn.microsoft.com/en-us/library/ff742315.aspx and encounter an obscure error every time ConversionJob's Start() method is called. Here's the exception;
Source: mscorlib
Message: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
InnerException: System.ServiceModel.FaultException: An error occurred when verifying security for the message.
StackTrace: Server stack trace: at System.ServiceModel.Channels.SecurityChannelFactory1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout) at System.ServiceModel.Channels.SecurityChannelFactory1.SecurityRequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.IdentityModel.Protocols.WSTrust.IWSTrustContract.Issue(Message message) at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr) at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst) at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForContext(Uri context, Boolean bearerToken, SecurityToken onBehalfOf, SecurityToken actAs, SecurityToken delegateTo) at 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.SharePoint.SPChannelFactoryOperations.InternalCreateChannelActingAsLoggedOnUser[TChannel](ChannelFactory1 factory, EndpointAddress address, Uri via) at Microsoft.SharePoint.SPChannelFactoryOperations.CreateChannelActingAsLoggedOnUser[TChannel](ChannelFactory1 factory, EndpointAddress address) at Microsoft.Office.Word.Server.Service.ConfigChannelFactory1.CreateChannel() at Microsoft.Office.Word.Server.Service.WordServiceApplicationProxy.AddJob(Ucid ucid, Nullable1 subscriptionId, SPUserToken userToken, ConversionJobSettings settings, String name) at Microsoft.Office.Word.Server.Conversions.ConversionJob.Start() at VisualWebPartProject1.VisualWebPart1.VisualWebPart1UserControl.Page_Load(Object sender, EventArgs e)
I tried the same code inside one of our sharepoint sites, still got the same error. Trying this inside a Wcf Service has same result. I made a visual web part for this and same error. Changing user accounts or RunWithElevatedPrivileges didn't help either.
Since the sample requires Microsoft.Sharepoint and Microsoft.Office.Word.Server.Conversions namespaces, I have to run this code on some server having sharepoint installed. So IMHO, the time skew issue is not related as the code is ran over the same server where Word Automation Services are present. I expect some configuration problems on the sharepoint server side, but I don’t know what to check.
Let me know if any other details are required, thanks.
Without having more specifics around the code you're running it's hard to say. Take a look at the overall Word Automation Services content in the SDK.
Also, check out the topics under "Configuring Word Automation Services for Development" in the SDK in particular.
Related
A Windows Forms application using Contract SOAP to Acumatica works fine on a development machine.
soapClient.Login with exactly the same parameters on a production server (Windows 2008) crashes with an error message:
Error Message: An error occurred while making the HTTP request to https://XXX.acumatica.com/entity/Default/17.200.001. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.
Stack trace:
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at AcmtIntegrator.AcumaticaWSDL.DefaultSoap.Login(String name, String password, String company, String branch, String locale)
at AcmtIntegrator.AcumaticaWSDL.DefaultSoapClient.Login(String name, String password, String company, String branch, String locale) in D:\C2019\AcumaticaIntegrator\AcumaticaIntegrator\Connected Services\AcumaticaWSDL\Reference.cs:line 49298
at AcmtIntegrator.frmExtractLists.LoopAction(String lcAction, String lcExtractType, Boolean& llSuccess) in D:\C2019\AcumaticaIntegrator\AcumaticaIntegrator\frmExtractLists.cs:line 134, Source: mscorlib, InnerException: The underlying connection was closed: An unexpected error occurred on a send.,
Two fix were changed to make it work:
WSDL service reference was replaced to point to the Acumatica production URL, and
Security protocol was set to TLS 1.2:
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
Thanks to all who tried to help.
We have a single server development environment of Dynamics CRM 2011 with IFD + Claims Based Authentication setup.
Struggling to run the CrmSvcUtil command without getting the following 'Access is denied' error. We are running the util as an administrator, who is also a System Administrator in Dynamics CRM 2011.
Command we are running is:
CrmSvcUtil.exe /url:https://myorg.deepspace9.com:444/myorg/XRMServices/2011/Organization.svc /out:MyOutputFile.cs /username:"deepspace9\administrator" /password:password*1
And we end up getting the error:
CrmSvcUtil : CRM Service Utility [Version 5.0.9690.2165]
c 2011 Microsoft Corporation. All rights reserved.
CrmSvcUtil.exe Error: 0 : Exiting program with exit code 2 due to exception : System.ServiceModel.Security.SecurityAccessDeniedException: Access is denied.
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Xrm.Sdk.IOrganizationService.Execute(OrganizationRequest request)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.ExecuteCore(OrganizationRequest request)
at Microsoft.Crm.Services.Utility.SdkMetadataProviderService.RetrieveEntities(IOrganizationService service)
at Microsoft.Crm.Services.Utility.SdkMetadataProviderService.Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)
We've also tried running the instructions at: http://community.adxstudio.com/products/adxstudio-portals/developers-guide/knowledge-base/crmsvcutilexe/claims-based-authentication-workaround-for-sdk-ver/
Any ideas?
Managed to get it working. Followed the instructions at http://blog.thinketg.com/blog/ben-klopfer/strongly-typed-code-file-generation-with-crmsvcutilexe-for-crm-2011-ifd-configurations-code
I had to run HTML decoding to get rid of the HTML tags and I didn't bother creating the batch file - I just ran the command directly:
CrmSvcUtil.exe /metadataproviderservice:"MetadataProvider.IfdMetadataProviderService, MetadataProvider" /codecustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration" /url:"https://myorg.deepspace9.com:444/XRMServices/2011/Organization.svc" /out:"outputOrganizationXrm.cs" /namespace:OrganizationXrm /serviceContextName:XrmServiceContext /serviceContextPrefix:Xrm /u:"deepspace9\administrator" /p:password*1
My service was working fine and now I am getting this exception and service stop working:
System.ServiceModel.FaultException: An error occurred when processing the security tokens in the message
searching internet shows some code problem but my code was working find and now it just stop working, not sure what is the problem..
stacktrace
Exception thrown during execution: System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party.
See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: An error occurred when processing the security tokens in the message.
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.SecurityChannelFactory1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)
at System.ServiceModel.Channels.SecurityChannelFactory1.SecurityRequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at NewWcfService.IExternalStringService.Reverse(String value) at WcfWebClient._Default.Page_Load(Object sender, EventArgs e) in C:\projects\ACSSamples\Microsoft\WebServices\Acs2UsernameBindingSample\WcfWebClient\Default.aspx.cs:line 55
It mostly is is a security related problem with your Access Control service rather then platform specific because there is no code change.
Have you changed any certificate recently which cause this service to break? Check your certificates or anything that depend on security because if you haven't changed any code then changes in security setting could be the cause of your problem.
I have an application that connects to the CRM 2011 service. When I attach to the service without a CallerID I can grab the data without error. The hitch comes when I add the caller ID to the connection. I receive this error message (might seem familiar):
The server was unable to process the request due to an internal error.
For more information about the error, either turn on
IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute
or from the configuration behavior) on the server in order to send the
exception information back to the client, or turn on tracing as per
the Microsoft .NET Framework 3.0 SDK documentation and inspect the
server trace logs. Server stack trace: at
System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message
reply, MessageFault fault, String action, MessageVersion version,
FaultConverter faultConverter) at
System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime
operation, ProxyRpc& rpc) at
System.ServiceModel.Channels.ServiceChannel.Call(String action,
Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
Object[] outs, TimeSpan timeout) at
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage
methodCall, ProxyOperationRuntime operation) at
System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage
message) Exception rethrown at [0]: at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg) at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type) at
Microsoft.Xrm.Sdk.IOrganizationService.Retrieve(String entityName,
Guid id, ColumnSet columnSet) at
Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.RetrieveCore(String
entityName, Guid id, ColumnSet columnSet) at
Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Retrieve(String
entityName, Guid id, ColumnSet columnSet) at
Hanlon.Data.CRM.DataObjectBase.Retrieve(Guid identity) at
Hanlon.Data.CRM.Advisor.Fill(Guid advisor_identity) at
HypotheticalReportCrmSite.HypotheticalReport.AcceptanceWorkFlow()
Does anyone have any ideas on why this is happening or how I can find out what the error is more specifically? The application works on both Test and User Acceptance servers but blows up on Production.
Clearly there are a number of reasons why this may work differently on different servers, some places to start looking would be the setup/installation/permissions on the different servers including CRM, SQL, Active Directory (although I might assume AD would be the same).
Is there any difference in the proxy used for the Prod server compared to that on the Test/UAT systems?
Are all the relevant versions of the .NET framework available on the Prod server?
Are the same assemblies installed in the GAC?
Is SQL more locked down for the Prod server?
Were the CRM installations on the Prod server completed according to the same specifications as the Test and UAT servers? Were they installed by the same party?
Again, these are all just ideas, but it would seem that the differences between the servers would be the place to look and the installations of the key products would be a good place to start, followed perhaps by looking at the .NET framework etc.
Apologies if the answer is quite generic, but as you have found the specific error doesn't appear to have revealed a smoking gun.
I'd be interested to know what you find.
I have two servers (Server A and Server B) in one SharePoint 2010 farm. I am getting following error on SharePoint Dashboard page while using the custom PPS filter webpart on Dashboard.
I have used Microsoft PerformancePoint Services SDK sample as base and created a custom Rendered class to define in FilterEditor Class as
filter.RendererClassName = typeof(CustomFilter).AssemblyQualifiedName;
Critial Error:
0x0500 PerformancePoint Service PerformancePoint Services 4 Critical An unexpected error occurred. Error 20798. Exception details: System.ServiceModel.FaultException: An unknown error has occurred. If the problem persists contact an administrator. There may be additional information in the server application event log. Server stack trace: at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]:... c9c0a044-c18d-4374-ad6f-e99d2a2959cd
Critial Error:
PerformancePoint Services 4 Critical ... at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.PerformancePoint.Scorecards.IBIMonitoringServiceApplication.GetFilterDependencies(RepositoryLocation filterLocation) at Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplicationProxy.<>c_DisplayClassbb.b_ba(IBIMonitoringServiceApplication channel) at Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplicationProxy.ExecuteOnChannel(CodeBlock codeBlock) c9c0a044-c18d-4374-ad6f-e99d2a2959cd
And finally:
PerformancePoint Services ef8z Critical An exception occurred while rendering a Web control. The following diagnostic information might help to determine the cause of this problem: Microsoft.PerformancePoint.Scorecards.BpmException: There was a problem preparing the WebPart for display. PerformancePoint Services error code 20700. c9c0a044-c18d-4374-ad6f-e99d2a2959cd
Please advice what I should do to overcome this problem.
In the web.config file, how did you specifiy the assembly for the renderer? It should be in this format:
Namespace.Class name, DLL name, DLL version number, DLL culture, DLL public key token
And it should look something like the RendererClass in this example:
<CustomFCO type="Filter" subType="SampleFilter">
<Resources FCOName="Custom Filter" FCODescription="This is my custom filter." />
<RendererClass name="Microsoft.PerformancePoint.Scorecards.ServerRendering.MultiSelectTreeViewControl,
Microsoft.PerformancePoint.Scorecards.ServerRendering, Version=14.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<EditorURI uri="/_layouts/SampleFilterEditor.aspx" />
</CustomFCO>
(http://msdn.microsoft.com/en-us/library/ee556434.aspx)