TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Yasine LAKHDARI
NA
71
47.6k
SharePoint Permissions
Mar 12 2009 5:53 AM
Hello,
I have an other problem with SharePointPermission
I added the following simple code whitch triggers the list Associated Workflow:
SPSite site = new SPSite("http://intersticedev/hr");
SPWeb web = site.OpenWeb();
SPList list = web.Lists["Quitus"];
SPListItem item = list.Items.Add();
//
item.Update();
list.Update();
SPWorkflowManager wkfManager = item.Web.Site.WorkflowManager;
SPWorkflowAssociation myWkrAssociation = list.WorkflowAssociations[0];
wkfManager.StartWorkflow(item, myWkrAssociation, "", true);
//
This code snippet was tested on Windows Application on the server and it was successfully excuted.
When i created a WebPart and i inserted the same code for associated Workflow starting it generate the following exception:
Request for the permission of type :
'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.
the insertion of the ListItem is successful but the line of Workflow Starting cause problem.
notice that i have changed the WSS_Mini to WSS_Medium
please what's the problem ?
Best Regards.
Thanks !
Reply
Answers (
1
)
WebPart adding Error !!
MOSS - Document Management System