SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

private void createTask1_MethodInvoking(object sender, EventArgs e) { createTask1.TaskId = Guid.NewGuid(); approvalTask_TaskProperties = new SPWorkflowTaskProperties();

        **approvalTask_TaskProperties.AssignedTo = workflowProperties.Web.SiteAdministrators[0].LoginName;**

        approvalTask_TaskProperties.DueDate = DateTime.Now.AddDays(1.0F);
        approvalTask_TaskProperties.Title = "Approval Required for " + twInfo.Title;
        approvalTask_TaskProperties.Description = "Specify the approval result here .";
        createTask1.TaskProperties = approvalTask_TaskProperties;

In the highlighted line I have a problem, It gets Value cannot be null. Parameter name: uriString

share|improve this question
I fixed this by placing the following code. private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e) { XmlSerializer serializer = new XmlSerializer(typeof(TrainingInfo)); XmlTextReader reader = new XmlTextReader(new System.IO.StringReader(workflowProperties.InitiationData)); twInfo = (TrainingInfo)serializer.Deserialize(reader); createTrainingSiteName = twInfo.Code; createTrainingSiteUrl = workflowProperties.WebUrl; } however I get another error, the InitiationData is NULL] Any idea? – Luis Valencia Sep 3 '10 at 3:07!E8A06D5F2F585013!972.entry - See step 7, I think that might help solve your issue. – James Love Sep 3 '10 at 7:56
The problem was with the onworkflowactivated, it didnt have the properties well binded. – Luis Valencia Sep 3 '10 at 15:54
up vote 0 down vote accepted

The problem was with the onworkflowactivated, it didnt have the properties well binded, after I binded them, I got the initiationData not null

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.