.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

How to access properties in spworkflowproperties in the task?

Posted By:      Posted Date: September 19, 2010    Points: 0   Category :SharePoint

In my task of a work flow, I need to access the original ItemUrl value.  this is a property in the spworkflowproperties class, but I cant seem to access it in my task (using aspx form for the task).  Is this jsut me missing something easy here?

(SP 2010 environment)



Rocky Sanders

View Complete Post

More Related Resource Links

Programmatic access to Assembly Version in Product Properties?

Using VS2008 and would like to get programmatic access to the Assembly Version property in my Project Properties but I can't seem to find a way to do this. Any suggestions? The project is a .dll and I want to expose this version information to the caller in my interface section as a string.

Task assignment to user without read access in 2007 results in no email to assignee, no warning to a

It appears (from observation and searching) that SP 2007 will not send a task assignment email when the assignee does not have read access for the assigned task and there is no warning when assigning a task to someone who will be unable to read it. I have not been able to find any mentions of attempting to address this quirk by either an item event listener or a workflow that would either prevent the assignment or task the originating user to fix the issue by either changing the assignment or having them added to the appropriate group.  I could see one done badly causing a cascade of tasks. The approaches that I've thought about are: Attempt to block assignment by hooking ItemAdding and ItemUpdating on the task content type.  In ItemUpdating, you could use SPListItem.DoesUserHavePermissions since the SPListItem should be there, but you'd may have check the list since I don't think SPListItem is available at that time.  I could see this causing problems when the assignment is via workflow or something that doesn't like other code interfering with its task creation. Hooking ItemAdded and ItemUpdated to assign a new task to the assigning user to either change the assignment or have the assignee added to the users with access to the site. Define a workflow which could be enabled for a list that would check if any new or modified task is assigned to users with

C# newbie stuck - trying to access column data in a SharePoint list in an SSIS script task

Hello, I'm sure this is the simplest question but I can't figure it out, even with Google's help. I am trying to stumble through some C# code in an SSIS script task and I am frustrated that I can't figure out how to do the easiest things.  I eventually want to find data in a column,and then use another list as a lookup to replace that value with another where the existing value matches a value in the lookup list.  So, the data in my (multiple choice) column might be "apples; bananas" and in another list I have a row that contains two columns, the first holding the value "Apples" and the second containing "Red Delicious" and my original column should read: "Red Delicious; bananas." But, alas, I can't even figure out how to see the data that is in a column. Here is my code: /*<br/> Microsoft SQL Server Integration Services Script Task<br/> Write scripts using Microsoft Visual C# 2008.<br/> The ScriptMain is the entry point class of the script.<br/> */<br/> <br/> using System;<br/> using System.Data;<br/> using Microsoft.SharePoint;<br/> using Microsoft.SqlServer.Dts.Runtime;<br/> using System.Windows.Forms;<br/> using Microsoft.SharePoint.Utilities;<br/> <br/> namespace ST_08becda4c05c49cd9f30ea76110076cd.csproj<br/> {<br/> [

Access the SQL Command Query Value Property from the OLEDB Container within a Script Task

Hello, I'd like to Access the SQL Command Query Value Property from the OLEDB Container within a Script Task so I can audit the queries which are executing. What is the syntax for this or does anyone have a sample on how to do this? Thank you

SSIS Execute Process Task Give "Access is Denied" error but it is not related to access control.

Hello All - I have a very weired SSIS problem. I am using BIDS in two machines - Windows 7 Professional Edition x64 bit (development workstation) and Windows 2003 Standard Edition x32 bit SP2 (server) . The visual studio version on both the machines are Version 2.0.50727 SP2. I found that my package's ExecuteProcessTask fails with "Access is denied" error in Windows2003 but runs ok in Windows 7 dev box. I then tried to debug the package in the Windows 2003 environment itself. The package failed in debug mode too with the same message. After looking for a while I found that when I shorten the Argument length of the failing ExecuteProcessTask the task did seem to work. So in Windows2003 environment if my argument exceeds 1846 characters the ExecuteProcessTask fails with message "Access is Denied". If the argument string is less than 1846 it works ok. In Windows 7 environment there is no problem at all. It does not seem like access problem but I may be wrong. Has anyone seen this? I will appreciate any reply. Thanks, Niben  

SharePoint - Item - Edit Properties - Access Denied Error

I have a SharePoint 2007 EE Site  (with patches up to version running on Windows Server 2008 & SQL Server 2008.
I ported an existing site from a different domain to this server by backing up/restoring the content database. The site is running fine.

I added a new sub-site and here is where I have the issue. If I create a document library, add a document, and then use the drop-down on the item to pick "edit properties" I bounce to the SP Error: Access Denied screen. My account is a site admin and has full access to the sub-site.
I can view the properties fine.

When I try to upload a document I get the access denied error message if some of the meta data properties are marked "required". The document is still uploaded. I also get the same error when I try to edit an item in a list.

I can view/edit the properties in Data sheet view fine. The libraries on the existing sites work fine. It only seems to be an issue on new sub-sites.

It almost seems like a permission problem generating the property edit forms. There is nothing in the SP log files.

"Access Denied" Error for WMI Reader Task Query


I am using SSIS to query all servers for their disk space from a remote machine using the WMI Reader Task by providing the Administrator user credentials to access all servers. The package execution fails and I get the following error in the Execution Results pane:

[WMI Data Reader Task] Error: An error occurred with the following error message: "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))".

However, I do get the results for the Development and Staging servers but the Production servers come back with an Access Denied message. The user credentials for the Dev and Staging servers belong to the "Administrator" group whereas for the Production, the user belongs to the "Administrator" and the "User" group as well.

I am pretty much sure that it has something to do with access to running WMI queries on the servers but I could not find a forum that discussed this issue elsewhere. I even checked for the DCOM Security settings after a few searches led me to a post about "Connecting to WMI on a Remote Computer" on an msdn forum but they seem to be enabled for all environments.

My production database sits on a cluster, so does that make any difference? I have not used the WMI ta

WQL - WMI Event Watcher Task - Access Denied


I have a WMI Event Watcher Task for watching a directory on the local machine.
The query is

SELECT * FROM __instancecreationevent WITHIN 10 WHERE TargetInstance ISA 'Cim_DirectoryContainsFile' AND TargetInstance.GroupComponent='Win32_Directory.Name=\"C:\\\\\"'


We are using SQL Server 2008 on Windows 2008 R2 64-bit machine.

This package works fine when run from an account in the Administrators group.

If the account running the package is not in the administrator's group, the package fails with


   Code: 0xC0029261
   Source: WMI Event Watch directory for drop file WMI Event Watcher Task
   Description: Watching for the Wql query caused the following system exception: "Access denied". Check the query for errors or WMI connection for access rights/permissions.


We turned autditing on for the directory in question and it appears that the package hasn't event attempted to access the directory. I also tried giving d

SummaryLinkWebPart : Access Denied saving Web Part properties after migration to Moss 2010


Hi everyone,

i got the error below when i access pages containing a SummaryLinkWebPart. The error occured only with user having non-administrative privilege.

The curious thing is that after an administrator access one of this pages, it starts to work for non-administrative users too.

The site collections containing these pages has been migrated from Moss 2007 to Moss 2010.

I'd like to find a better solution than navigate through all my pages with site collection administrator account.

Any suggestion would be very appreciate

Access Denied saving Web Part properties: either the Web Part is embedded directly in the page, or you do not have sufficient permissions to save properties

Can't access master page properties in Visual Studio


I have created a Master Page and exposed a Literal control on it by way of a public property.

    Public Property PageTitle() As Literal
            Return ltlTitle
        End Get
        Set(ByVal value As Literal)
            ltlTitle = value
        End Set
    End Property

In my content page I have referenced the Master Page like so :

<%@ Page Language="VB" MasterPageFile="~/Tools.master" AutoEventWireup="false" CodeFile="NewsletterUpload.aspx.vb" Inherits="NewsletterUpload" %>
<%@ MasterType VirtualPath="~/Tools.master" %>

However in my content page code behind I cannot see the custom properties of the master page in Visual Studio.

Update Task properties in updatetask1_MethodInvoking


        public Guid updateTask1_TaskId1 = default(System.Guid);
        public SPWorkflowTaskProperties updateTask1_TaskProperties1 = new Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties();   
        private void updateTask1_MethodInvoking(object sender, EventArgs e)
            updateTask1.TaskProperties.Title = "New Title";
            updateTask1.TaskProperties.Description = "New Description";

I've searched and searched and heard a lot about things such as OnTaskChanged.AfterProperties" and "UpdateTask.TaskProperties" bind to the same object, but have no idea how to change that.

In my sequential workflow's design view (VS 2010), I have a onWorkflowActivated1, followed by onTaskChanged1, and then an UpdateTask activity. My goal is to update the task title and description to a specific text whenever a task is added or updated. There's no practical purpose in doing this, but I just want to see it working. 

No access to SPEmailMessage Properties



Hi all,


I have a curious error by accessing Properties of SPEmailMessage.


For example:


public override void EmailReceived( SPList list, SPEmailMessage emailMessage, string receiverData)

// receiverData ='''';


User Controls : load and access properties from code behind



I created a User Control :

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UCSousMenuPrincipal.ascx.cs"
    Inherits="view_usercontrols_UCSousMenuPrincipal" %>
<asp:DataList ID="dataListSousMenuPrincipal" runat="server" RepeatDirection="Horizontal" >
        <asp:HyperLink ID="HyperLink1" runat="server"><%# Container.DataItem %></asp:HyperLink>

to which I added a property, so I can bind the DataList :

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;

public partial class view_usercontrols_UCSousMenuPrincipal : System.Web.UI.UserControl
    //Private Member    
    private object dataSource = null;
    protected void Page_Load(object sender, EventArgs e)

Access Denied error on custom workflow task list item


We have created a two level custom approval workflow on (an InfoPath) form library using SharePoint Designer (SPD) with first and second approver. The workflow works fine as long as the approver is in the Site Collection Administrators group. The approvers who are not in the admin group can get to the custom Task form for approve/reject, but they can only view the form. When they click on the “Edit Item” button of the task list item, they receive “Access Denied” error. We have given these approvers “Approve”, “Contribute” permissions on the Form library and even Full Control on the task form list (all items). Note: The users use their domain account and the error they are getting is: Access Denied, You are currently signed as DomainName\LoginName, Sign in as a different user.

We have read through several forums and have found people having the same issue. We tried all of the suggestions described in the following links - but no success so far.

SharePoint Designer Workflows, Tasks, and the Annoying “Access Denied” Error

what is the task of properties.OpenWeb() function?



I am really newbie to share point.And i know i may ask some really simple questions but the fact is that i don't what that does.

and be sure that i have googled , but as you know the sharepoint references are not too much.So i apologize if asking stupid questions.

Brainstorm your Brain and find solution,if no result stuck to Brainstormer.

MVC architecture in ASP.Net using C# and Microsoft Data Access Application block

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]:

Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View. The view manages the display of information.

Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.

WCF Tip: Using Properties in Service Contracts

you'll notice all of the Service Contracts are implemented with interfaces containing only methods. For the longest time I thought that's all that was supported, until I thought about it a little more. In C# land, properties are simply wrappers around a get method and set method, so why wouldn't we be able to use properties in a service contract? Well the answer is we can.
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