locked
CRM 2011 Custom Workflow Error RRS feed

  • Question

  • I have CRM 2011 IFD and Make Custom Workflow for Opportunity Entity which run the report using RerportExeution Service and Attach the report as PDF and Send Email to User.

    The Error is Coming during Workflow run is

    Plugin Trace:


    [BLFWorkflow: BLFWorkflow.SendBikeQuote]

    [BLFWorkflow (1.0.0.0): BLFWorkflow.SendBikeQuote]





    Error Message:


    Unhandled Exception: Microsoft.Crm.CrmException: Unexpected exception from plug-in (Execute): BLFWorkflow.SendBikeQuote: System.Exception:
    System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
       
    at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
       
    at System.Security.CodeAccessPermission.Demand()
       
    at System.Net.HttpWebRequest.CheckConnectPermission(Uri uri, Boolean needExecutionContext)
       
    at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
       
    at System.Net.HttpRequestCreator.Create(Uri Uri)
       
    at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
       
    at System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
       
    at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri)
       
    at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri)
       
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
      at BLFWorkflow.SSRS.ReportExecutionService.LoadReport(String Report, String HistoryID)
       
    at BLFWorkflow.SendBikeQuote.Execute(CodeActivityContext executionContext)

    The action that failed was:

    Demand

    The type of the first permission that failed was:

    System.Net.WebPermission
    The Zone of the assembly that failed was:

    MyComputer
       
    at Microsoft.Crm.Sandbox.SandboxCodeUnit.Execute(IExecutionContext context)
       
    at Microsoft.Crm.Workflow.Services.ProxyCustomActivity.Execute(CodeActivityContext executionContext)


    Muhammad Sohail

    Friday, May 30, 2014 7:20 AM

All replies

  • Anyone ever figure this out?
    Tuesday, December 23, 2014 8:14 PM
  • Hi all,

    Was it resolved?

    I have the Same issue too, while running the Report from Plugin

    Monday, February 16, 2015 10:06 AM
  • You would get this error if the custom workflow assembly is registered in the Sandbox. Try reregistering the assembly so that it is not in the sandbox

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    • Proposed as answer by Mayank Pujara Monday, February 16, 2015 3:35 PM
    Monday, February 16, 2015 3:29 PM
    Moderator