Heim > Datenbank > MySQL-Tutorial > Hauptteil

Understand Code Access Security of SPS

WBOY
Freigeben: 2016-06-07 15:44:21
Original
877 Leute haben es durchsucht

Code access security is implemented by a series of configuration files. 1. The first configuratin file of concern is machine.config located in C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG. This file specifies master settings that wi

Code access security is implemented by a series of configuration files.

1. The first configuratin file of concern is machine.config located in C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG. This file specifies master settings that will be inherited by all SharePoint Services sites that run on the server.
    The following code shows the div of machine.config file associated with an installation of SPS.
   
       
       
       
       
       
   

   
2. In addition, web.config file has a div that defines two additional levels of trust known as WSS_Medium and WSS_Minimal. The following code shows a default settings.
   
     
     
   

   
Web parts running under WSS_Minimal can not access any database server nor can they access the objects contained in the SharePoint object model.

3. Customize Policy Files
(1) Raise the trust level for all SharePoint Services sites by modifying the web.config file. Change the default settings of web.config from to

 Now you set the trust level to WSS_Medium.

(2) The GAC grants the Full level of trust to web parts. So the second option is to deploy all of web parts into the GAC.
As a side note, you'll also have to restart IIS each time you recompile a web part into the GAC.
  gacutil -i [assembly.dll], this command line is used to deploy a web part into the GAC.
 
(3) To Create your own custom policy file is the recommended best practice for production environments. However, this approach requires the most effort. You can refer to other documents if you are insterested in this method.

Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!