.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Cannot create unknown type when loading WF Service from loose Xaml with ActivityXamlServices

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :Windows Application

I am trying to host a WF4 (RC) Service dynamically. I have a test solution with two projects. The first is a declarative workflow service library with one root Flowchart activity in it, and a simple custom code activity. The workflow service library does not depend on any other custom assemblies or references. The second is my host app, which in my test solution is just a console application.

In my host app, I am attempting to the use ActivityXamlServices to load the Xaml for the workflow service into an activity, and then use the WorkflowServiceHost to fire up a workflow instance using that activity.

As soon as I try to new up the WorkflowServiceHost object, I get this exception...

Cannot create unknown type '{clr-namespace:DeclarativeServiceLibrary1}CodeActivity1'.

If I remove CodeActivity1 from my Flowchart designer, everything runs fine. If I add a direct reference to the workflow service project from my host project and then create a WorkflowServiceHost using an instance of my Flowchart activity instead of the activity created from the Xaml, it also works fine.

It seems to not like using my CodeActivity for some reason when loaded dynamically.

More Related Resource Links

Cannot create unknown type '{clr-namespace:Blog.LongRunningWorkflow.Example.Activities}WaitForReques

Hi, I am facing problem in loading XAML at runtime. Below is the code please help me. public void ProcessRequest(Request request) { // Get the workflow instance id to use Guid instanceId = this.requestToInstanceMapping[request.Id];         // Setup the arguments that are passed to the workflow          IDictionary<string, object> input = new Dictionary<string, object>();              input.Add("Request", request);            using (FileStream fs = new FileStream(@"ProcessRequest.xaml", FileMode.Open))          {             // Load the ProcessRequest workflow           Activity wf = ActivityXamlServices.Load(fs) as Activity;                            // Create the workflow instance specifying the arguments and instance id                      WorkflowApplication wapp = new WorkflowApplication(wf, input);          string persistenceConnectionString = "Data Source=Dev1;Initial Catalog=InstanceStore;User id=sa;password=xxxxxxx;Asynchronous Processing=True";          &nbs

Web Service ParserError Could not create type

Getting error message with our web service: Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not create type 'ATGIntegration.B2CBlueprintOMSIntegrationWSBinding'. Source Error: Line 1: <%@ WebService Language="vb" CodeBehind="Service.asmx.vb" Class="ATGIntegration.B2CBlueprintOMSIntegrationWSBinding" %>   Two versions of this web service installed on a server (one for development) with the only difference being the web.config file. Web service worked without error for over a year. Recently made some changes to the code, compiled and copy and pasted bin files to the bin folder for the development web service. Then this error appeared. Then I put back the original bin files but same error. At this time the live web service was still working. Later I copied bin folder from live to dev and that broke live. I can fix this error by rebooting the machine, accessing the web service in error, making any change to the web.config file and finally accessing the web service again. The problem is that this error re-appears after a random period of time for no obvious reason. I follow the process again to fix. I have done this process 8 times now. Both dev

Parser Error Message: Could not create type 'Service'.


My web service works fine on my local machine but when i put it on the server it throw this error:

Parser Error Message: Could not create type 'Service'.

I don't know how to fix this.

"Cannot create unknown type" error when invoking a dynamic activity

I am trying to use WF 4 to create business rule policy activities that I can store as XAML files and execute dynamically so the rules can be changed without recompiling.  I have created an ExecuteActivityFromXAML activity that takes the path to the XAML file and a dictionary of inputs and loads a dynamic activity from the XAML and then uses workflow invoker to invoke the activity passing in the input parameter dictionary.  In another assembly, I have created rule executor activites that wrap each of the xaml rule activities and build the input parameter dictionary and specify the XAML file path.  For example, I have a parent-child object with three rule activities stored as xaml files on disk (they are in my project with a build action of "None") -  ValidateParent, ValidateChildren, and ValidateChild.  I then have 3 activities compiled into my assembly that build the input parameter collection and use the common ExecuteActivityFromXAML activity to invoke the 3 XAML files - ExecuteValidateParent, ExecuteValidateChildren, ExecuteValidateChild.  The ValidateChildren activity is supposed to validate rules on the collection and then loop through each child object and call ValidateChild.  I can call ExecuteValidateParent with no error if it does not reference the other activities, but when I try callt he ExecuteVal

SQL Tracking Service XAML only (Type, Workflow and Activity db tables)


Ok, we've implemented workflow completely into our system now and I've starting to see the tracking database grow fairly quickly, which was expected


I am now working on a purge routine and or partitioning.


What I have noticed is that the Workflow and Type db tables will constantly grow no matter what.  They are not considered "partitioned" tables.


My main question is the architectural decision around this XAML only approach of tracking versus the code behind\beside approach.  I have a hypothesis I will present below.


In code behind\beside.


Silverlight: Create Animations with XAML and Expression Blend


In this excerpt from his upcoming book, Laurence Moroney explains the basics of Silverlight animation and the animation tools available in Expression Blend.

Lawrence Moroney

MSDN Magazine August 2008

To create a custom control and type while creating a column


HI All,

i am creating a column in the list while creating a column i will have an option for choice field on selecting choice i can see dropdown, radiobutton, Checkbox to select and  can enter list of values. and on clicking ok i will get a column with radiobutton. in newform.aspx and also in editform.aspx

so i need to create the similar functionality with my custom radio button, so on create column i need to show my custom choce on selecting this i need to show my custom radiobutton  and  can enter list of values then on selecting it then click ok to create a column, in edit form and new form i need to show a radio buttons with values.

Thanks in advance




how to create gmail type login?



For my project, i have designed a login page like gmail.

According to the  credentials given by the  users the application should send to the corresponding pages asigned to them.

Please give me the answer.

Thanks in advance.

When create a suvery using type Rating Scale, is it possible to create 5 range text?


When create a suvery using type Rating Scale, is it possible to create 5 range text?

Default range text only show 3 fields

VS 2010 XAML Design View Load always fail with a Type Load Exception

Create a new WPF project in VS and change nothing. The Design View will fail to load with the error below. Error    1    Could not load type 'Microsoft.Expression.DesignModel.Core.ISharedInstanceBuilder' from assembly 'Microsoft.Expression.DesignModel, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Microsoft.Expression.DesignModel is an assembly from Expression Blend. I ever installed Blend 4 RC and uninstall and install Blend 4. I Reflector the assembly I have under Blend 4 bin folder. And cannot find a interface named ISharedInstanceBuilder. But the WPF project is a Template project without any changes. How it get related with Blend 4? And how to fix it? Thanks.  

Is this same as SQL server Reporting Service or else what can we say for these type of report genera

Hi      In my windows application I am generating reports using this steps          1) Creates a stored procedure in the sql server for the required report output          2) In the .Net application add new Item adds a DataSet1.xsd binds the stored procedure to the DataSet1           3) Adds a Report1.rdlc to the application and places the requred fields in the Report1.rdlc          4) Adds a ReportViewer control to a form and binds the Report1.rdlc to the ReportViewer contol and shows the report Is this same as SQL server Reporting Service or else what can we say for these type of report generation 

Cannot register a service type without attaching the source assembly to the host process

I'm wondering if there is any way I can register a service type without attaching the source assembly to the host process. When I register the service type, the source assembly (which has the type) cannot be written.   I appreciate your attention.. 

What type of backups create a LSN No.?

What type of backups create a LSN No.?"SQLSERVER DBA" "INDIA"

Error Build: Type or namespace could not be found, when referencing a web service

Hello, I'm new in writing C# application in Visual Studio 2008. I'm currently writing a web application for CRM 4.0 Reporting Service rendering. I reference my web application to our Reporting Service web service http://reportservername /ReportServer/ReportExecution2005.asmx and name it 'RSWebReference'. Then I want to reference it in my code: Using RSWebReference; Not sure why, but I cannot build my solution, saying "The type or namespace name 'RSWebReference' could not be found (are you missing a using directive or an assembly reference?)". I read this thread in http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/74f70e30-83e8-4817-b5e0-7729450730a1 that the website probably is using .net 1.1, and I should change it to .net 2.0. However, I think the website is already using 2.0. Is it probably because I'm using VS 2008? How can I tell and change if the website is using 1.1 or 2.0? Or could I be doing something wrong? Thanks in advanced for your help! -Elizabeth K.

How to create simple web service in VS2010, NOT WCF service

How to create simple web service in VS2010 Professional (trial version). There is no template to do this.  I am not trying to create WCF service here.

Get the error 'The Workstation service has not been started' when trying to create a new content d

I am running SharePoint on a standalone machine, and the workstation service is up and running. Restarting the service makes no difference. Rebooting the machine hasn't helped either. No errors are being written to the event log.

Create buttons for "new item" which create a new page of a specific content type

We have a Pages library (wiki) which supports a few content types (and page layout associated). We want to enable users to click a button for example of "new custom enterprise wiki page" - so a new page of content type article will be open in edit mode. Can someone help how to develop? (it has to mimic the behavior that happens when user creates new page from the Ribbon or Site actions and has to choose the content type, it also has to keep the new page in edit mode and not just create it).  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend