Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

SPS v2 Object Model Permission problem

  Asked By: Kody    Date: Jan 09    Category: Sharepoint    Views: 971

I have build a webpart and imported it into SPS v2, and it works
just fine.

But when I try to use the SPS ObjectModel, I get this error:

Request for the permission of type
Microsoft.SharePoint.Security, Version=, Culture=neutral,
PublicKeyToken=71e9bce111e9429c failed.

Here's a sample of my code:

using Microsoft.SharePoint;
SPWeb web = SPControl.GetContextWeb(Context);
SPList list = web.Lists[0]; //The exception is thrown here
output.Write("List name : "+list.Title);

What is the problem?



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on SPS v2 Object Model Permission problem Or get search suggestion and latest updates.