Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

HOW RAISE THE SECURITY LEVEL FOR WEB PART

  Asked By: Harshad Chatnis         Date: Aug 25, 2009      Category: Sharepoint      Views: 161
 

how raise the security level for the weba part .
which one is better location to deploy the webpart
bindirectory or GAC AND WHY ..PLZ HELP ME IN THIS ISSUE.

Tagged:                

 

3 Answers Found

 
Answer #1       Answered By: Jaferry Khan          Answered On: Aug 25, 2009       

Bin is always the prefferred over GAC (as in GAC the code runs under FULL TRUST) and when deployed in Bin folder (of the web-app) it also needs CAS policies to be set in web.config (if special permissions are required).

Best is deploy  the code in Bin folder, apply the required CAS policies in web.config and you would be safe, as the code will not run with Full Trust and will have only the permissions set in the CAS Policy.

 
Answer #2       Answered By: Davin Knapp          Answered On: Aug 25, 2009       

I believe location  selection depends on the web  part.

It this is webpart  , you have created , you know its safe...then there is no harm in putting the webpart assembly to GAC. it removes overhead of changing web.config!

If the web part  is taken from internet, or some other source (not trusted)..better to go with BIN approach as mentioned above.

 
Answer #3       Answered By: Deidra Best          Answered On: Aug 25, 2009       

All The information are great , i would like to add something ,
if u want that ur webpart  to available across the site then put it in The GAC ,if not then BIN is the best place .
and if u want to perform some code level  Security Rise , then user the SPSecurity to run ur code with elevated privillage

 
Didn't find what you were looking for? Find more on HOW RAISE THE SECURITY LEVEL FOR WEB PART Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].