Tuesday, June 23, 2009

Register an assembly as a safe control in the Web.config file ”To deploy the Web Part to your WSS Site, you must then register the control as safe in web.config’s SafeControls node, as described in Chapter 3. Assuming the project name LitwareWebParts, the following entry in the SafeControls node in web.config will register the assembly and namespace as safe. <SafeControl Assembly="LitwareWebParts" Namespace="LitwareWebParts" TypeName="*" Safe="True" /> Note that for this example, we are not strong-naming the assembly, and therefore we can use the simple name of the assembly. When you strong-name the assembly, you should always register the SafeControl entry using the full four-part assembly name.” [1]