Custom Workflow Activity & Web.Config

Hi,
I'm using a custom activity and I want to read some parameters from config.
Any way I read the appSettings I can´t find de keys. I tried diferent ways:
System.Web.Configuration.WebConfigurationManager.AppSettings["LogFilePath"];              
System.Configuration.ConfigurationSettings.AppSettings["LogFilePath"];
System.Configuration.ConfigurationManager.AppSettings["LogFilePath"];
and the configuration exists on the FIM Portal web.config like this:
<configuration>
   <appSettings>
      <add key="LogFilePath" value="D:\temp2"/>
   </appSettings>
</configuration>
What can be happening??
Many thanks,
DD

The condition is met. The activity runs and logs several data about the request.
The log path is obtained in the activity parameters from UI. Now, I'm trying to read it from config without success (allways get empty string when reading the configuration. WCF configuration is also not being readed.
Thanks,
DD

Similar Messages

  • Unable to register custom workflow activity on MS CRM 2015 Online

    Hi All,
    I am trying to register custom workflow activity using plugin registration tool on MS CRM 2015 Online.
    Error says that 'No Plugin have been selected from list. Please select atleast one and try again'
    In short my assembly is not considered as custom workflow activity.
    I am giving my code let me know, If any thing is wrong.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Activities;
    using Microsoft.Xrm.Sdk;
    using Microsoft.Xrm.Sdk.Workflow;
    namespace Training.SamplePlugin
        public class SampleCustomworkflow : CodeActivity
            [Input("Birthday")]
            public InArgument<DateTime> BirthDate { get; set; }
            [Output("NextBirthday")]
            public OutArgument<DateTime> NextBirthDay { get; set; }
            protected override void Execute(CodeActivityContext executionContext)
                //Create the tracing service
                ITracingService tracingService = executionContext.GetExtension<ITracingService>();
                //Create the context
                IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
                IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
                IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
                if (context.PrimaryEntityName.ToLowerInvariant() == "contact")
                    DateTime birthDate = BirthDate.Get<DateTime>(executionContext);
                    DateTime nextBirthDate = new DateTime(DateTime.Now.AddYears(1).Year, birthDate.Month, birthDate.Day);
                    //NextBirthDay.Set(executionContext, nextBirthDate);
                    Entity newContact = new Entity();
                    newContact.LogicalName = "contact";
                    newContact.Id = context.PrimaryEntityId;
                    newContact["new_nextbirthday"] = nextBirthDate;
                    service.Update(newContact);
    If code is correct then has somebody faced this kind of issue earlier, what is resolution.
    Thanks
    Apurv

    Have your signed your assembly ??
    Microsoft Dynamics CRM Training|Our Blog |
    Follow US |
    Our Facebook Page |
    Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

  • Highlight an invalid email address in a custom workflow activity in SharePoint Designer 2010

    Hi,
    I have created a custom workflow activity to send an email with the 'From' address being taken as input from the SharePoint Designer when this activity is used in a designer workflow. My requirement is to highlight an invalid email address(from address)
    on click of 'Check for Errors' button in SharePoint Designer like it is done for mandatory inputs by default where it highlights such inputs if left blank. Is it possible?
    Thanks in advance.

    Good work, catch so far Michael, does seem to be a "feature" of iCloud syncing, not sure what you could do to disable it.

  • Custom Workflow Activity not showing in Plugin Registration

    Could anybody suggest what I am doing wrong here?
    I have created a Custom Workflow Activity using this sample
    Create a custom workflow activity. But this is not showing up as a plugin/activity type in Plugin Registration Tool. See image below:
    My sample code for the activity below:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Activities;
    using Microsoft.Xrm.Sdk;
    using Microsoft.Xrm.Sdk.Workflow;
    namespace TestCustomWorkflowActivity2
    public class SampleCustomActivity : CodeActivity
    protected override void Execute(CodeActivityContext executionContext)
    //Create the tracing service
    ITracingService tracingService = executionContext.GetExtension<ITracingService>();
    //Create the context
    IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
    IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
    IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
    Platform
    Dynamics CRM 2013 On Premises v 6.1.2.112 (SP1 UR2 installed)
    Dynamics CRM 2015 Online
    .NET Framework version
    4.0
    Thanks and Regards,
    blog: <a href="http://technologynotesforyou.wordpress.com">http://technologynotesforyou.wordpress.com</a> | skype: ali.net.pk

    Hi,
    I can see only one difference with my code:
    I placed using detectives in namespace:
    namespace Crm_RTB_NewAcc.Workflow
    using System;
    using System.Activities;
    using System.ServiceModel;
    using Microsoft.Xrm.Sdk;
    using Microsoft.Xrm.Sdk.Workflow;
    using Microsoft.Xrm.Sdk.Query;
    public sealed class GetOrgLicense : CodeActivity
    // Define Inputs/Outputs
    [Output("Count")]
    public OutArgument<int> Count { get; set; }
    protected override void Execute(CodeActivityContext executionContext)
    //My code here
    Count.Set(executionContext, 5);
    Try to make same code. It working well. 
    Hi xjomanx,
    I just tried your suggestion, but still the class is not appearing in the plugin registration. Btw, could you please confirm what version of PluginRegistration you are using?
    blog: <a href="http://technologynotesforyou.wordpress.com">http://technologynotesforyou.wordpress.com</a> | skype: ali.net.pk

  • How to call an Azure Web API (2.2) - from Dynamics Custom WorkFlow Activity of Plugin c#

    Hello,
    I am specifically trying to call a web api, that has a FromBody.
    However, I am trying to do it without having to use libraries (or nuget packages) that I cannot install on CRM of CRM Online.
    It seems JSON newtonsoft is big... or I guess I could use my own custom formatter...
    But I would love to see if someone has an example for posting to web API, versus an ASMX
    Thanks

    Wow I had this awesome thing typed up... and it wouldn't do it then wanted me to verify and then that messed up and I lost it all... Wow..
    Anyway
    [SOLVED]
    Works from Plugin or Workflow activity
    Use the Query string to pass things (not the body) or else you have to compress it and you can't use the libraries to DO that in the Sandbox... You CAN do that if you or on premise and do NOT isolate.. Then heck I did everything I wanted but for online
    this was it.
    You do NOT have to use WebClient, use HttpClient (follow the code below)
    WebApi 2.2 is what I used
    My signature for Webapi
    You do have to clean up the response.. as the string you get back is JSON.. and you cannot use the JSON desieralizer...
    Easy fix... just do a replacement of the \ and " to a " " space.. then Trim the result.. bingo a clean string response...
    [HttpGet]
    Public string MyMethod(string value1, string value2, string value3)
    This will parse the query string so USE these are your parameters in your query string or the API will NOT work. ?value1=ddd&&value2=ddd&&value3=aaa
    of course make up your own string names
    IIS and Apache etc work differently so the AMOUNT of data you can send will differ per platform, per version of platform AND usually you can configure it.. IIS used to be like 2048 by default.. anything beyond that (as a total URL incoming) was truncated..
    Not sure now. I know it was configurable
    I got it working.. all my points are gone... but it's possible
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Activities;
    using Microsoft.Xrm.Sdk;
    using Microsoft.Xrm.Sdk.Workflow;
    using Microsoft.Xrm.Sdk.Query;
    using Microsoft.Xrm;
    using System.Net.Http;
    using System.IO;
    using System.IO.Compression;
    using System.Net.Http.Headers;
    using System.Runtime.Serialization.Json;
    using System.ServiceModel;
    using System.Net;
    try
        string result = string.Empty;
        using (var client = new HttpClient())
            client.BaseAddress = new Uri(webapihost);
            client.DefaultRequestHeaders.Accept.Clear();
            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/x-www-form-urlencoded"));
            client.Timeout = new TimeSpan(0, 0, 30); ;
            client.MaxResponseContentBufferSize = 2000000;
            using (HttpResponseMessage response = client.GetAsync(webapihost + apimethod + querystring).Result)
                if (response.IsSuccessStatusCode)
                    result = Decompress(response);
                    tracingService.Trace("Call Data Value [{0}]", result.ToString());
    catch (Exception simple)
        throw new InvalidPluginExecutionException("Error with simple HTTPClient x-www-form-urlencoded" + simple.ToString());
    private string Decompress(HttpResponseMessage response)
        try
            switch (response.Content.Headers.ContentEncoding.ToString().ToLower())
                case "gzip":
                        return DecompressGzip(response.Content.ReadAsStreamAsync().Result);
                case "deflate":
                        return Inflate(response.Content.ReadAsStreamAsync().Result);
                default:
                        return response.Content.ReadAsStringAsync().Result;
        catch (Exception ex)
            throw new Exception("Error decompressing: " + ex.ToString());
    private string DecompressGzip(Stream datastream)
        try
            //Create a new stream
            //decompress the original
            //get back the string (JSON)
            if (datastream != null)
                Stream decompressedStream = null;
                decompressedStream = new GZipStream(datastream, CompressionMode.Decompress, true);
                var streamReader = new StreamReader(decompressedStream);
                string stringdata = streamReader.ReadToEnd();
                decompressedStream.Dispose();
                return stringdata;
            else
                return string.Empty;
        catch (Exception ex)
            throw new Exception("Gzip error: " + ex.ToString());
    private string Inflate(Stream datastream)
        try
            if (datastream != null)
                Stream decompressedStream = null;
                decompressedStream = new DeflateStream(datastream, CompressionMode.Decompress, true);
                var streamReader = new StreamReader(decompressedStream);
                string stringdata = streamReader.ReadToEnd();
                decompressedStream.Dispose();
                return stringdata;
            else
                return string.Empty;
        catch (Exception ex)
            throw new Exception("Inflate error: " + ex.ToString());

  • How do I add my Custom Workflow Activity to FIM 2010 R2 SP1 installed on Windows 2012 server?

    Hellos.
    I have tried and failed to add my custom.dll into the Windows Server 2012  GAC.
    We have a version of FIM 2010 R2 Sp1 running on Windows Server 2008 R2 and that was no problem. There seemed to be a gacutil.exe present on the system which added my assembly.
    I cannot find gacutil.exe on the Windows 2012 Server.
    I have downloaded and installed Windows SDK for Windows 8. However, when I try the gacutil.exe /i <myCustom.dll> nothing seems to happen.
    Are there any guidelines how to add custom workflow activities to FIM when installed on a Windows Server 2012 system?
    TIA
    *HH

    Well yes. It is fine when FIM is hosted on Windows Server 2008 R2.My difficulty is that I am using FIM 2010 R2 Sp1 and Windows Server 2012. No GACutility executable.
    However, the problem has been resolved. Powershell can be used to modify the assemblies.
    I opened a RunAs Administrator PS session. My assembly is in folder c:\Temp
    Using Windows Explorer I browsed the folder c:\windows\assembly and noted the System.EnterpriseServices entries: version (2.0.0.0) and public key token (b03f5f7f11d50a3a)
    (My version is 2.0.0.0 because when installing FIM and SharePoint 2013 the instructions I used suggested setting .Net version to be 2.0)
    These powershell commands got me going...
    PS C:\temp> [System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
    GAC    Version        Location
    True   v4.0.30319     C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50...
    PS C:\temp> $publish = New-Object System.EnterpriseServices.Internal.Publish
    PS C:\temp> $publish.GacInstall("c:\temp\RunPowershellLibrary.dll")
    PS C:\temp>
    PS C:\temp>
    PS C:\temp> iisreset
    Amazingly I can see the assembly RunPowershellLibrary in my Windows 2012 GAC. :-)
    Also, what is more cheering is that the custom activity actually works with FIM 2010 R2 Sp1.

  • Sharepoint 2013 designer workflow custom sendemail activity

    Does anybody know sharepoint 2013 designer workflow custom sendemail activity. Current OOB sendemail action from designer workflow cancels the entire workflow when sendemail fails.
    MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint Lead

    Hi Amit,
    What error did you meet when you used the OOB ‘Send Email’ action?
    I suggest you fix the error rather than creating a new workflow ‘Send Email’ activity.
    Of course, you can also customize a workflow activity to send email, there are two acticles about creating a custom workflow activity for your reference:
    http://msdn.microsoft.com/en-us/library/office/jj163911(v=office.15).aspx
    http://www.sharepoint-reference.com/Blog/Lists/Posts/Post.aspx?ID=37
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Issue with retrieveing the Manager of a System User in a Custom workflow - CRM 2013

    Issues with custom workflow activity in CRM 2013 On-prem
    I'm trying to pass the Manager of the System
    here is the code that I'm running, it gets to setting the MANAGER and stops
    I put the ran the FetchXML seperatly and it does return a value so I know what bit works
    public class CaseAccountManagerManagersLookup : CodeActivity
    // Inputs
    [Input("Enter Case")]
    [ReferenceTarget("incident")]
    public InArgument<EntityReference> CA { get; set; }
    // Outputs
    [Output("Manager Output")]
    [ReferenceTarget("systemuser")]
    public OutArgument<EntityReference> AMOUT { get; set; }
    protected override void Execute(CodeActivityContext executionContext)
    // Context
    IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
    IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
    IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
    //Create the tracing service
    ITracingService tracingService = executionContext.GetExtension<ITracingService>();
    // get the account and renewals manager ID's
    var CASE = CA.Get<EntityReference>(executionContext);
    tracingService.Trace("Case ID = " + CASE.Id);
    try
    // FETCH
    string fetchXml = string.Format(@"
    <fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
    <entity name='incident'>
    <attribute name='title' />
    <attribute name='incidentid' />
    <order attribute='title' descending='false' />
    <filter type='and'>
    <condition attribute='incidentid' operator='eq' value='{0}' />
    </filter>
    <link-entity name='contact' from='contactid' to='customerid' alias='ak'>
    <link-entity name='account' from='accountid' to='parentcustomerid' alias='al'>
    <link-entity name='systemuser' from='systemuserid' to='bc_dssalesperson' alias='am'>
    <attribute name='parentsystemuserid' />
    </link-entity>
    </link-entity>
    </link-entity>
    </entity>
    </fetch>", CASE.Id);
    EntityCollection case_results = service.RetrieveMultiple(new FetchExpression(fetchXml));
    //tracingService.Trace("fetch has run");
    if (case_results.Entities.Count != 0)
    foreach (var a in case_results.Entities)
    //if (a.Attributes.Contains("ai_parentsystemuserid"))
    tracingService.Trace("set manager id next");
    var MANAGERID = (EntityReference)a.Attributes["parentsystemuserid"];
    tracingService.Trace("manager id set");
    AMOUT.Set(executionContext, MANAGERID);
    throw new InvalidOperationException("Want to see trace");
    tracingService.Trace("end ");
    catch (Exception e)
    throw new InvalidPluginExecutionException("Plugin - CaseAccountManagerManagerLookup - " + e.Message);
    finally
    throw new InvalidOperationException("Want to see trace");
    Pete

    Hello,
    Try to use am.parentsystemuserid instead of just parentsystemuserid.
    Dynamics CRM MVP/ Technical Evangelist at
    SlickData LLC
    My blog

  • Custom workflow - How to go from single server to multiple?

    I have been working on a project that involves developing a custom workflow activity for SharePoint 2013. I am developing it in a single server environment working with http. My problem occurs when deploying to multi-server environment with https (WFE, APP).
    My question is how to deploy my solution to the new environment. 
    The steps:
    Create a project - c# activity library
    Add a workflow activity, add .xml
    Deploy the .dll and .xml of project to "C:\Program Files\Workflow Manager\1.0\Workflow\Artifacts" "C:\Program
    Files\Workflow Manager\1.0\Workflow\WFWebRoot\bin"
    net sotp "Workflow Manager Backend"
    net start "Workflow Manager Backend"
    gacutil to deploy the .dll to GAC
    iisrest
    Create a project - empty SharePoint 2013 project
    Add a workflow custom activity to project
    Edit .actions4 and .xaml (my custom code from previous project is in this project now that i can drag and drop in .xaml)
    Deploy to server, activate feature, open SharePoint Designer 2013 and choose the custom action that now appears when creating a 2013 workflow
    This all works fine and dandy on my single server environment. Workflow is working like a charm. How should I go about deploying this to a multi-server environment with https? Does that server need Visual Studio on it also? I have continued to deploy the
    .dll and .xml to the workflow manager backend folders. I have continued to deploy the .dll to the GAC also. When I upload the solution to the new site, it continues to work. When I open designer to create the workflow, it breaks and i cannot create or edit
    any of the workflows on that site. Do i need to be doing something different because i am going from a http environment to https?
    Let me know if this is unclear or if anyone needs more information. Thanks

    If I understand correctly, your workflow still working fine in multi-servers farm but having problem in SharePoint designer. As far as I understand your custom activities should be deployed in the server where your workflow manager is running. Good architecture
    would be to put the workflow in app server (or in it's separate server). But if you are also using HTTPs in multi-server farm whereas the workflow configured over HTTP, you might need to register the workflow (I'm not quite sure though, so you can try in some
    test environment first).
    I've worked with SharePoint 2013 workflow but I intentionally didn't develop custom activity. Rather I develop custom WCF service in SharePoint. And then used the service from workflow. This is how I could use a separate dedicated server for workflow (if
    needed ever) without having any reference to SharePoint DLLs from inside workflow.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • Custom workflow activities

    I need to write a custom workflow to get more opportunities in the list of opportunities and then generate invoice with details.. do you have an idea??
    thanks.

    After having registered the custom workflow activity, you should have to restart Asynchronous process service and IIS...
    My blog : http://mscrmtools.blogspot.com
    All my tools for Dynamics CRM 4.0 on my dedicated site:
    MSCRMTools Repository
    Upgraded tools for Dynamics CRM 2011!
    View Layout Replicator for Microsoft Dynamics CRM 2011
    Searchable Property Updater for Microsoft Dynamics CRM 2011

  • PublishWorkflow error when workflow contains custom code activity

    I've failed to get a custom code activity working within Workflow Manager 1.0 even though I believe I've performed all of the guidance steps provided.
    As other posts, I get the usual 'cannot create unknown type' error:
    client.PublishWorkflow( workflowName, @"..\..\TestWorkflow.xaml" );->
    Cannot create unknown type '{wf://workflow.windows.net/$Current/$Activities}SendMailActivity'.
    The activity is implemented as:
    namespace SharedActivities
    public sealed class SendMailActivity : CodeActivity
    I've created an AllowedTypes.xml file containing the following:
    <?xml version="1.0" encoding="utf-8" ?>
    <AllowedTypes>
    <Assembly Name="SharedActivities">
    <Namespace Name="SharedActivities">
    <Type>SendMailActivity</Type>
    </Namespace>
    </Assembly>
    </AllowedTypes>
    The SharedActivities assembly has the following Post Build event command line
    net stop "Workflow Manager Backend"
    %systemroot%\system32\inetsrv\appcmd stop apppool /apppool.name:"WorkflowMgmtPool"
    xcopy /y "$(TargetPath)" "C:\Program Files\Workflow Manager\1.0\Workflow\WFWebRoot\bin"
    xcopy /y "$(TargetPath)" "C:\Program Files\Workflow Manager\1.0\Workflow\Artifacts"
    copy /y $(ProjectDir)AllowedTypes.xml "C:\Program Files\Workflow Manager\1.0\Workflow\WFWebRoot\bin"
    copy /y $(ProjectDir)AllowedTypes.xml "C:\Program Files\Workflow Manager\1.0\Workflow\Artifacts"
    %systemroot%\system32\inetsrv\appcmd start apppool /apppool.name:"WorkflowMgmtPool"
    net start "Workflow Manager Backend"Execution output : 1>------ Rebuild All started: Project: SharedActivities, Configuration: Debug Any CPU ------
    1>  SharedActivities -> D:\Dev\Prototypes\WorkflowTest\SharedActivities\bin\Debug\SharedActivities.dll
    1>  The Workflow Manager Backend service is stopping.......
    1>  The Workflow Manager Backend service was stopped successfully.
    1>  
    1>  "WorkflowMgmtPool" successfully stopped
    1>  D:\Dev\Prototypes\WorkflowTest\SharedActivities\bin\Debug\SharedActivities.dll
    1>  1 File(s) copied
    1>  D:\Dev\Prototypes\WorkflowTest\SharedActivities\bin\Debug\SharedActivities.dll
    1>  1 File(s) copied
    1>          1 file(s) copied.
    1>          1 file(s) copied.
    1>  "WorkflowMgmtPool" successfully started.
    1>  The Workflow Manager Backend service is starting.
    1>  The Workflow Manager Backend service was started successfully.
    1>  
    ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
    The assembly containing the custom activity is loaded into the Workflow host process.
    I've configured my machine (development) to allow unsafe types.
    I've also
    uploaded my project so you can verify the implementation.
    Thanks in advance, Adam

    I did following step in your VS project.
    Remove SendMailActivity from TestWorkflow.Xaml
    Commented out "[assembly: XmlnsDefinition("wf://workflow.windows.net/$Current/$Activities", "SharedActivities")]
    " line from SharedActivities assemblyInfo.cs file
    build the project
    Added SendMailActivity activity in TestWorkflow.xaml
    run the program.
    Above steps seems to be working for me..

  • How to display the image while set custom header "x-content-type-options" as "nosniff" in web.config

    Hi,
    I am using Microsoft ASP.NET TreeView control where I have bound embedded images. Also I have set custom header “x-content-type-options” as
    “nosniff” in web.config file.
    On hosting the sample containing the above mentioned things in SERVER machine, the images are not visible but its working properly while running sample in local (development) machine. 
    Kindly provide a solution and find the sample in the below link.
    http://goo.gl/6uR2b0 
    Thanks,
    Alagarsamy D.

    Hi AlagarBala,
    Your issue is related to asp.net/web technology and for a better support on this please post your question to the asp.net forum below, this forum is for C# code issues in speicific:
    http://forums.asp.net/
    Regards,
    Fouad Roumieh

  • Error when publishing WF containing custom code activity to workflow manager 1.0

    Hello:
    Workflow manager sounds every exciting to me, I am trying it out to see if it will work for me.
    I downloaded "CustomCodeActivitySample" of workflow manager 1.0, and when I ran, I got following exception:
    Workflow XAML failed validation due to the following errors:
    Cannot create unknown type '{clr-namespace:HashActivity;assembly=HashActivity}ComputeHash'. HTTP headers received from the server - ActivityId: 2a1e4d9d-90bd-4f59-a1fc-d3673194dd54. NodeId: NDL0714. Scope: /CustomCodeActivitiesSample. Client ActivityId : 235d66c1-bbe6-4982-8242-833a6bc1f6b1.
    more details:
    Microsoft.Workflow.Client.ActivityValidationException was unhandled
      HResult=-2146233088
      Message=Workflow XAML failed validation due to the following errors:
    Cannot create unknown type '{clr-namespace:HashActivity;assembly=HashActivity}ComputeHash'. HTTP headers received from the server - ActivityId: efe2c3cb-e6fd-4124-88a1-6c8e72aecb06. NodeId: NDL0714. Scope: /CustomCodeActivitiesSample. Client ActivityId : 73d7b773-be53-4a7b-b2d8-ba687e60a4f4.
      Source=Microsoft.Workflow.Client
      ActivityName=ProcessMovies
      ScopePath=/CustomCodeActivitiesSample
      StackTrace:
           at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)
           at Microsoft.Workflow.Client.WorkflowManagementClient.SendRequest[T](HttpWebRequest request, T content)
           at Microsoft.Workflow.Client.ActivityManager.Publish(ActivityDescription description, Boolean overwriteXClassName, Boolean terminateDependentInstances)
           at Microsoft.Workflow.Client.ActivityManager.Publish(ActivityDescription description)
           at Microsoft.Workflow.Samples.Common.WorkflowManagementClientExtensions.PublishWorkflow(WorkflowManagementClient client, String workflowName, String xamlFilePath, Collection`1 externalVariables, IDictionary`2 configValues,
    SubscriptionFilter activationFilter) in c:\WFM_C\C\Microsoft.Workflow.Samples.Common\WorkflowManagementClientExtensions.cs:line 45
           at Microsoft.Workflow.Samples.Common.WorkflowManagementClientExtensions.PublishWorkflow(WorkflowManagementClient client, String workflowName, String xamlFilePath, SubscriptionFilter activationFilter) in c:\WFM_C\C\Microsoft.Workflow.Samples.Common\WorkflowManagementClientExtensions.cs:line
    29
           at CustomCodeActivitySample.Program.Main(String[] args) in c:\WFM_C\C\CustomCodeActivitySample\Program.cs:line 39
           at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException: System.Net.WebException
           HResult=-2146233079
           Message=The remote server returned an error: (400) Bad Request.
           Source=Microsoft.Workflow.Common
           StackTrace:
                at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
                at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result)
                at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)
           InnerException:
    Thanks
    ahorse

    Hi
    We had to update following in assemblyinfo.cs file.
    assembly: XmlnsDefinition("wf://workflow.windows.net/$Current/$Activities", "YourProjectNamespace")]
    to 
    assembly: XmlnsDefinition("wf://{WorkflowManagerServerName}:12291/$Current/$Activities", "YourProjectNamespace")]for e.g.assembly: XmlnsDefinition("wf://workflowmanagerserver:12291/$Current/$Activities", "YourProjectNamespace")]
    Only then custom code activity started working. However, this means, when we want to deploy in other environment with different URL, we need to re-build the assembly. 
    Is there any way by which we have this configurable?
    Regards,
    RK
    Radhakrishna

  • HTTP Unauthorized 401 Error when calling custom code Workflow-Activity (SharePoint 2013)

    Hi,
    from one day to the other the custom code activity within a SP2013 workflow gives me the following error:
    Activity in progress  Retrying last request.
    Next attempt scheduled in less than one minute.
    Details of last request:
    HTTP Unauthorized to
    http://server/subsite/_vti_bin/client.svc/sp.utilities.utility.ResolvePrincipalInCurrentcontext(input=@ParamUser,scopes='15',sources='15',inputIsEmailOnly='false',addToUserInfoList='False')?%40ParamUser='i%3A0%23.w%7Csp2013-dev%5Cadministrator'
    Correlation Id: 9d507c00-1e24-af73-fcea-faa4a0a61ae1
    Instance Id: 5c91916e-918b-453a-bf48-e61649afa3d0
    After some time the workflow gets cancelled automatically. The custom code activity ran many times before without any errors.
    Thanks a lot in advance!

    Hello,
    this KB could help also:
    HTTP Unauthorized to /_vti_bin/client.svc/sp.utilities.utility.SendEmail
    Regards,
    Alex
    Alex Pitulice, MICROSOFT 
    Bitte haben Sie Verständnis dafür, dass im Rahmen dieses Forums, welches auf dem Community-Prinzip
    „IT-Pros helfen IT-Pros“ beruht, kein technischer Support geleistet werden kann
    oder sonst welche garantierten Maßnahmen seitens Microsoft zugesichert werden können.

  • HttpBinding not working when HttpHandler tag is present in web.config file

    Hi,
    I tried to add a WCF service in WCF Test Client using HttpBinding. But I couldn't add the service. I got the below error.
    There was an error downloading 'http://localhost/Services/PostOffice.svc/_vti_bin/ListData.svc/$metadata'.
    The request failed with an empty response.
    Metadata contains a reference that cannot be resolved: 'http://localhost/Services/PostOffice.svc'.
    The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.
    If the service is defined in the current solution, try building the solution and adding the service reference again.
    I removed the below code in the Web.Config, later I was able to add the WCF service to the WCF test client.
    <httpHandlers>
    <add type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" path="Telerik.ReportViewer.axd" verb="*" validate="true" />
    </httpHandlers>
    I'm not sure with the above code. Could you please let me what is the reason behind it and what is the use of above code and if I remove it how does it affect my application.
    Thanks in advance.
    Sandeep

    Hi Sandeep Pinniti,
    Please try to add the following config in your config file:
    <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    The validateIntegratedModeConfiguration="false" will allow us to keep our httpHandlers section populated without throwing an error. And I have tested in my side,
    it works fine.
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • How to create PDF files in Arabic?

    Hello, I work with Adobe Acrobat 7.0 Professional to create PDF files, but I can not insert Arabic characters, could you help me please? Thank you! (see the attached file)

  • Changing SID

    Hello everyone, I use Oracle 10g R2 on Fedora Core 4. I was trying to change the SID of my test database. What I did was: 1- Shutting down the Instance 2- changing ORACLE_SID Environment Variable (I also changed the oracle user's .bash_profile, cause

  • Queries with variable input giving error

    Hello all, I have a query which asks for fiscal year and posting period at the start of query run. But when I run the query in Bex analyzer, it gives me this error all the time. "Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION System erro

  • Upgraded to Yosemite can I upgrade cs2 to cs5 and get it to work

    I just upgraded my computer not realizing cs2 would no longer run on Yosemite, can I upgrade my software and get it to work or do I need to buy the whole new software?  I am not looking to go to the cloud. Thanks.

  • SQL LOADER ;;; PLEASE HELP ME

    Hi EveryBody, I have useless lines in my file csv which I do not want to load in my Oracle table, 1- some one knows a means to leave the control file of SQL LOADER to load that the data which I want? 2- Another thing I want to insert my lines in the