Answered by:
CRM 2011: Sandbox plug-in execution failed

Question
-
I'm getting the following error when a plugin running in the sandbox executes in my environment:
The plug-in execution failed because no Sandbox Hosts are currently available. Please check that you have a Sandbox server configured and that it is running.
I look at the trace log and I see one for the HostService with the following entry:
[2011-04-22 11:34:45.781] Process:Microsoft.Crm.Sandbox.HostService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 77 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error | CrmException..ctor
at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException)
at CrmException..ctor(String message, Int32 errorCode)
at SandboxAssemblyManager.CheckAssembly(Guid pluginAssemblyId, Int32 pluginAssemblyHashCode, String pluginAssemblyContents, Guid organizationId)
at SandboxHost.Execute(SandboxCallInfo callInfo, SandboxPluginExecutionContext requestContext, Guid pluginAssemblyId, Int32 sourceHash, String assemblyName, Guid pluginTypeId, String pluginTypeName, String pluginConfiguration, String pluginSecureConfig, String assemblyContents)
at
at SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at MessageRpc.Process(Boolean isOperationContextSet)
at ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
at ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
at ChannelHandler.AsyncMessagePump(IAsyncResult result)
at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at AsyncResult.Complete(Boolean completedSynchronously)
at TryReceiveAsyncResult.OnReceive(IAsyncResult result)
at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at AsyncResult.Complete(Boolean completedSynchronously)
at ReceiveAsyncResult.OnReceiveComplete(Object state)
at SessionConnectionReader.OnAsyncReadComplete(Object state)
at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at LazyAsyncResult.Complete(IntPtr userToken)
at NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest)
at FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
at FixedSizeReader.ReadCallback(IAsyncResult transportResult)
at AsyncResult.Complete(Boolean completedSynchronously)
at ReadAsyncResult.OnAsyncReadComplete(Object state)
at PipeConnection.OnAsyncReadComplete(Boolean haveResult, Int32 error, Int32 numBytes)
at IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
at _IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
>Crm Exception: Message: Assembly should be provided, ErrorCode: -2147204719Any hints as to what is going on? The plugin works just fine outside of the sandbox, and isn't doing anything that violates sandbox constraints...
- Edited by KTurbyfill Wednesday, April 27, 2011 7:18 PM
Friday, April 22, 2011 4:03 PM
Answers
-
This turned out to be a bug that was quickly resolved by Microsoft in UR 2 and already rolled out to CRM Online. If you see this issue, make sure you are up to date on rollups!
- Marked as answer by KTurbyfill Wednesday, June 8, 2011 8:50 PM
Wednesday, June 8, 2011 8:50 PM
All replies
-
open a command prompt on the appropriate server as an administrator and enter:
net start mscrmsandboxservice
Let me know if this does not fix
- Proposed as answer by Bob Hatcher - Intellinet Wednesday, February 8, 2012 6:58 PM
Friday, April 22, 2011 9:24 PM -
I get a message that the service has already been started. So, just for kicks, I stop and start it again. When a plugin executes, I again get the error message, and the trace log has another entry saying "Assembly should be provided".Monday, April 25, 2011 12:54 PM
-
Hi,
Check this it may help you
http://erikpool.blogspot.com/2011/02/crm-2011-plug-in-tips-and-tricks-part-1.html
NarSrMonday, April 25, 2011 1:06 PM -
Researching this further, it appears to be a problem when the plugin assembly is greater than 6750KB. If I remove enough code to bring the assembly under that limit, things work great. It has nothing to do with the code I removed, because if I add that code back, and then remove other code to get the assembly size back down, it continues to work.
Anyone seen anything like this? Or can anyone disprove my theory by saying they are successfully executing sandbox plugins in an assembly larger than 6750KB?
- Marked as answer by KTurbyfill Wednesday, June 8, 2011 8:29 PM
- Unmarked as answer by KTurbyfill Wednesday, June 8, 2011 8:30 PM
Wednesday, April 27, 2011 7:20 PM -
This turned out to be a bug that was quickly resolved by Microsoft in UR 2 and already rolled out to CRM Online. If you see this issue, make sure you are up to date on rollups!
- Marked as answer by KTurbyfill Wednesday, June 8, 2011 8:50 PM
Wednesday, June 8, 2011 8:50 PM -
We are on rollup 2 (on prem) and face this issue. Also, my assembly size is just 40 kb so the theory KTurbyfill posted on April 27 2011 is disproven.
There was no change to the plugin code. It suddenly stopped working. My hunch was that there was something wrong with the sandbox service but I can't find what.
Thursday, August 4, 2011 5:13 PM