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