.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> SharePoint >> Post New Question Subscribe to Interview Questions

What does partial trust mean the Web Part developer?

Posted By :Gowthammanju     Posted Date :October 31, 2011    Points :40   Category :SharePoint 
If an assembly is installed into the BIN directory, the code must be ensured that provides errorhandling in the event that required permissions are not available.
Otherwise, unhandled securityexceptions may cause the Web Part to fail and may affect page rendering on the page where theWeb Part appears.

You can also find related Interview Question to What does partial trust mean the Web Part developer?  below: 

What is Partial Class?

  
Partial class:
---------------

Instead of defining an entire class, you can split the definition into multiple classes by using the partial keyword. When the application is complied, the C# complier will group all the partial classes together and treat them as a single class. There are a couple of good reasons to use partial classes. Programmers can work on different parts of a class without needing to share the same physical file. Also you can separate your application business logic from the designer-generated code.

C#

Public partial class Employee
{
public void Method1()
{}
}

Public partial class Employee
{
public void Method2()
{}
} (More...)

What is Full Trust?

  
Your code is allowed to do anything in the framework, meaning that all (.Net) permissions are
granted. The GAC has Full Trust because it's on the local HD, and that has Full Trust by default,
you can change that using caspol . (More...)

What is a web part zone in SharePoint?

  
Web part zones in SharePont are what your web parts reside in and help categorize your web parts when designing a page. (More...)

What are the differences between web part page gallery, site gallery,Virtual server gallery and online gallery in SharePoint?

  
Web Part Page Gallery in SharePoint is the default gallery provided by Microsoft that comes installed with SharePoint. Site Gallery is specific to one sharepoint website site. Virtual Server gallery is specific to that virtual server and online gallery is available for download web parts from MSDN. (More...)

When was c++ developed and who is the developer of C++ and where ?

  
C ++ was developed by Bjarne Stroustrup at Bell Laboratories in 1983.
Originally it was called as "C with class".

Thanks !!! (More...)

While creating a Web part, which is the ideal location to Initialize my new controls?

  
Override the CreateChildControls method to include your new controls. You can control the exact rendering of your controls by calling the .Render method in the web parts Render method.
(More...)

What is Partial Assembly References?

  
Full Assembly reference: A full assembly reference includes the assembly's text name, version, culture, and public key token (if the assembly has a strong name). A full assembly reference is required if you reference any assembly that is part of the common
language runtime or any assembly located in the global assembly cache.

Partial Assembly reference: We can dynamically reference an assembly by providing only partial information, such as specifying only the assembly name. When you specify a partial assembly reference, the runtime looks for the assembly only in the application
directory.
We can make partial references to an assembly in your code one of the following ways:
-> Use a method such as System.Reflection.Assembly.Load and specify only a partial reference. The runtime checks for the assembly in the application directory.
-> Use the System.Reflection.Assembly.LoadWithPartialName method and specify only a partial reference. The runtime checks for the assembly in the application directory and in the global assembly cache
(More...)

What is Partial Assembly reference

  
We can dynamically reference an assembly by providing only partial information, such as specifying only the assembly name. When you specify a partial assembly reference, the runtime looks for the assembly only in the application directory.
We can make partial references to an assembly in your code one of the following ways:
-> Use a method such as System.Reflection.Assembly.Load and specify only a partial reference. The runtime checks for the assembly in the application directory.
-> Use the System.Reflection.Assembly.LoadWithPartialName method and specify only a partial reference. The runtime checks for the assembly in the application directory and in the global assembly cache.
(More...)

Can we use two partial classes in different assemblies represent the same Class.

  
we cannot have two partial classes referring to the same class in two different assemblies (projects). Once the assembly is compiled, the meta-data is baked in, and your classes are no longer partial. Partial classes allows you to split the definition of the same class into two files.
partial classes is a compile-time phenomenon, not runtime. Classes in assemblies are by definition complete. (More...)

How do I assign full trust to an XBAP application ?

  
The application crashes due to insufficient access to registry even if you have a local intranet certificate. The issue is, you get access to the registry using the CLR in debug mode, whereas when hosted in local intranet, NT security restricts you from accessing the registry, giving full access to registry in the NT security to the administrators and power users group. (More...)

How do I assign full trust to an XBAP application ?

  
The application crashes due to insufficient access to registry even if you have a local intranet certificate. The issue is, you get access to the registry using the CLR in debug mode, whereas when hosted in local intranet, NT security restricts you from accessing the registry, giving full access to registry in the NT security to the administrators and power users group. (More...)

What is partial Class, Why do we use it?

  
Partial classes are one which can be defined in different files using partial keyword:


It is maily used for managing the code.Example: a windows form class is split into two files : Form1.cs and Form1.Designer.cs (More...)

How can I raise the trust level for assemblies installed in the BIN directory?

  
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 each
option.
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 destination
server.
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 permission
requirementsfor 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.Assemblies
installed 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 scope
thannecessaryIn 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...)

What are the differences between web part page gallery, site gallery,Virtual server galleryand online gallery?

  
Web Part Page Gallery is the default gallery that comes installed with SharePoint. Site Gallery is specific to one site. Virtual Server gallery is specific to that virtual server and online gallery are downloadable web parts from Microsoft. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

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.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend