2
votes
2answers
81 views

How to check username/accountname under which the code runs?

We want piece of code which we can paste in the code behind and get the username under which code runs for:- (usually .NET code runs under account of application pool) Timer job. Event receiver. ...
2
votes
3answers
96 views

Application page in layouts folder accessing web application object

There is an application page, deployed to the layouts folder. The URL of the app page is: http://server:port/sc2/_layouts/test/mypage.aspx Now, there is a user with read only permissions (added ...
2
votes
2answers
42 views

Under what permissions/priviledge does the runwithelevatedprivileges code run?

SPSecurity.RunWithElevatedPrivileges Method Executes the specified method with Full Control rights even if the user does not otherwise have Full Control. 1) But which under which account does this ...
4
votes
3answers
509 views

How to programmatically modify item level permissions prior to first save?

I've got a situation where there are strict permissions requirements on an a list of which I already have written a custom form. The requirement is that upon creation, based on metadata, only certain ...
2
votes
1answer
452 views

SPWeb.GetUserToken(x) vs SPWeb.Users[x].UserToken

I'm working in code to elevate an account with the Read role to a specific account with the Contribute role in order to create a list item. I currently get the SPUserToken for the contribution ...
0
votes
1answer
148 views

I loss the listitem which was added to list using Item Added Event Receiver

I am using this code to break the permission.But i loss the listitem after refresh the page.Plz help me.. public override void ItemAdded(SPItemEventProperties properties) { ...
0
votes
1answer
212 views

MOSS 2007 Permission error iterating users in group

The following code, though run with elevated privildges, redirects to an access denied error page saying "You are currently signed in as: (my non-admin account)." What am I doing wrong? ...
0
votes
2answers
78 views

Run With Elevated Priv

Will RWEP add a file to a folder it has "Read" permissions for know sharepoint groups (but no sharepoint\system group added)?