Instructor
Notes |
|
After discussing
SafeControl entries, it's important to also mention that each web.config file
contains a trust element that configures a sandbox for Web Part DLLs running
inside the \bin directory. It's probably not a good idea in most classes to
go to deeply into the topic of Code Access Security (CAS) which is the
underlying technology used to enforce the sandbox. |
|
However students
should realize that Web Part DLLs in the bin directory run inside a very
restrictive sandbox by default because the trust level setting is either
WSS_Minimum or OSVR_Minimum depending on whether you have installed just WSS
or Microsoft Office SharePoint Server 2007. That means code inside a Web Part
cannot read files from the local files system, connect to SQL Server or
program against the WSS object model. You can change this by changing the
level setting to WSS_Medium, saving the web.config file and running a
IISRESET. |
|
To remove the
sandbox completely, change the level setting to Full. save the web.config
file and run IIS reset. |
|
Finally, point out
that the trust level only affect Web Part DLLs inside the \bin directory of
the hosting WSS Web application. Web Part DLLs loaded from the Global
Assembly Cache always run with full trust. |