Jusin

Hello,

I'm using Windows SharePoint Services 3 and SharePoint designer 2007. I've set up forms authentication and it works fine however, custom workflows fail now when attempting to set the "assigned to" field when creating a new task. For example, a user fills out a custom list and one of the fields is a person or group. When the user selects a person and submits the form it should create a new task and assign it to the person selected in the previous step. The error logged in the workflow history is "unexpected error". If I remove the "assigned to" field from the workflow then it completes successfully.

Here is the entry from the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12 log:

System.Workflow.Runtime.Hosting.PersistenceException: Invalid data has been used to update the list item. The field you are trying to update may be read only. ---> Microsoft.SharePoint.SPException: Invalid data has been used to update the list item. The field you are trying to update may be read only. ---> System.Runtime.InteropServices.COMException (0x80020005): Invalid data has been used to update the list item. The field you are trying to update may be read only. at....


I've confirmed that this problem only occurs when trying to assign the task to a person within the custom membership provider. If I modify the workflow to assign the task to a local user then it works fine. Additionally, if I pass the value to a single line text field then the workflow will complete and set the value to membershipprovider:[USER] where [USER] is the username of the correct person. If I edit the newly created task and set the Assigned to field to membershipprovider:[USER] it will assign the task to the correct person.

I googled the error and there was a hotfix released for wss2 that was then distributed with wss sp2. Perhaps the error has been reintroduced in wss3. I downloaded and installed all available patches from MS with no change.

Any help is greatly appreciated (please don't bash me for cross posting - the other post has gotten stale with no answer).

Thanks!

Justin


Re: SharePoint - Design and Customization Workflows and Forms Authentication

Anonymousn,nm,nm,

i think please have it check ..

when user creates a new item does it picks up user as membershipprovide:[username] or just user name

secondly when you try to push in data to a person or group field. its excepts parameter as 1;#abc@asdh.com . Pass this same value in assign to field..

it had happen with me and worked with above paramter..

thanks





Re: SharePoint - Design and Customization Workflows and Forms Authentication

Jusin

Thank you for your reply. Yes, the value is passed as membershipprovide:[username]. When you say "excepts parameter as 1;#abc@asdh.com" is the string literally 1;#abc@asdh.com It seems like it doesn't like the "1;#".

Thanks for your assistance

Justin





Re: SharePoint - Design and Customization Workflows and Forms Authentication

Jusin

Well, I found a solution (sort of). I'll post it here for future reference...

When using forms authentication, a workflow will pass only the username, not the entire string required to assign a task to someone. For example, if your Membership Provider is called "memprovider" and your username is "usera" then you could assign a task to yourself by entering memprovider:usera in the "Assigned To" field. A workflow will only pass "usera" which isn't enough in a workflow to assign a task. To work around the problem, I created a workflow in Visual Studio that concatenates the membership provider name and the username.

If someone else has the same problem and needs further information on resolving the issue please let me know.

On another note - also just for reference - I have never been able to successfully implement forms authentication without a reboot even though none of the tutorials I've seen mention this problem. The error in the SharePoint logs is always the same:

PermissionMask check failed. asking for 0x00000005, have 0x00000000

A reboot fixes it every time. There isn't much out there on the Internet yet so hopefully this

ll help someone once it's indexed by Google.