tags:

views:

15

answers:

1

Hello,

I have build one employee directory webpart that gets necessary information of user from sharepoint site. i have deployed in my testing server "Windows Server 2003 and Moss2007" and it's work fine.

When i tried to deploy on my production server "Windows Server 2008 R2 with Moss2007". It give me security error.

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

I have also created security policy file and added reference to web.config. Still i getting same error please help on this. i am stuck here and not able to find any way to get out of this.

Thanks in advance.

A: 

Do you install your DLL into GAC? You must either install it into GAC (the solution does it for you if you specify the assembly location as GAC) or provide a custom CAS policy and register that policy in the web.config file. We usually prefer the first way, unless a customer specifically requires a custom CAS policy. This is much easier and I really doubt the security-wise effectiveness of the custom policy approach (unless your IT department actually goes over your code and examines what it can and cannot do, haven't found a department that would know how to do that)

Vladi Gubler