How do you Increase trust level for a single WebPart in the WebConfig file.

Ans. To list a Web Part with Full Permissions within your Web Application while still retaining a WSS_Minimal permission set for all other Web Parts, You need to create a Custom policy file. This file will be then referenced in SharePoint Web.config file and will allow your specific webpart to be of Full trust.Steps :1. Make a copy of the WSS_Minimal.Config file from the 12\Config folder and paste it into the same folder renaming it to Custom_WSS_Minimal.Config. Now, edit the Custom_WSS_Minimal.Config file using NotePad. Obtain the Public Key Token for the Web Part assembly that you want to deploy, using the following command: sn -Tp filename.dll. Create a new entry in your Custom_WSS_Minimal.Config file for your WebPart. Save the File.Finally, Create a new TrustLevel element for your config file in the Web.Config called Custom_WSS_Minimal that points to your custom file in the 12\config folder. Recycle the Application Pool and You're Done.

You can also find related Interview Question to
How do you Increase trust level for a single WebPart in the WebConfig file.
below:

ASP.NET's built-in parsers are used to remove code from ASPX files and create temporary files. Each parser understands only one language. Therefore mixing of languages in a single ASPX file is not possible. (More...)

A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is is that a solution:allows deployment to all WFE's in a farmis highly manageable from the interface allowing deployment, retraction, and versioningCan package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc.Can provide Code Access Security provisioning to avoid GAC deploymentsAnd much more.. (More...)

A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is is that a solution: allows deployment to all WFE's in a farm is highly manageable from the interface allowing deployment, retraction, and versioning Can package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc. Can provide Code Access Security provisioning to avoid GAC deployments Just to name a few things. (More...)

Signing an assembly with a strong name (a.k.a strong naming) uses a cryptographic key pair that gives a unique identity to a component that is being built. This identity can then be referred throughout the rest of the environment. In order to install assemblies into the GAC, they must be strongly named. After signing, the binary will have a public key token identifier which can be use to register the component in various other places on the server. (More...)

Windows SharePoint Services can use any of the following three options from ASP.NET and the CLR to provide assemblies installed in the BIN directory with sufficient permissions. The following table outlines the implications and requirements for eachoption.1.Option Pros Cons Increase the trust level for the entire virtual server.In a development environment,increasing the trust level allows you to test an assembly with increased permissions while allowing you to recompile assemblies directly into the BIN directory without resetting IIS. This option is least secure. This option affects all assemblies used by the virtual server.There is no guarantee the destination server has the required trust level. Therefore, Web Parts may not work once installed on the destinationserver.2.Create a custom policy file for your assemblies. For more information, see "How do I create acustom policy file?" Recommended approach.This option is most secure.An assembly can operate with a unique policy that meets the minimum permissionrequirementsfor the assembly.By creating a custom security policy, you can ensure the destination server can run your WebParts.3.Requires the most configuration of all three options.Install your assemblies in the GACEasy to implement.This grants Full trust to your assembly without affecting the trust level of assemblies installed inthe BIN directory.This option is less secure.Assembliesinstalled in the GAC are available to all virtual servers and applications on a serverrunning Windows SharePoint Services. This could represent a potential security risk as itpotentially grants a higher level of permission to your assembly across a larger scopethannecessaryIn a development environment, you must reset IIS every time you recompile assemblies.Licensing issues may arise due to the global availability of your assembly. (More...)

A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is that a solution:allows deployment to all WFE's in a farmis highly manageable from the interface allowing deployment, retraction, and versioningCan package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc.Can provide Code Access Security provisioning to avoid GAC deploymentsAnd much more..

Signing an assembly with a strong name (a.k.a strong naming) uses a cryptographic key pair that gives a unique identity to a component that is being built. This identity can then be referred throughout the rest of the environment. In order to install assemblies into the GAC, they must be strongly named. After signing, the binary will have a public key token identifier which can be use to register the component in various other places on the server. (More...)

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.