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


Top 5 Contributors of the Month
abhays
satyapriyanayak
SP
Ashutosh Jha
Mahesh

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

What are safe controls, and what type of information, is placed in that element in a SharePoint web.config file?

Posted By :Zakeer     Posted Date :October 14, 2011    Points :40   Category :SharePoint 
When you deploy a WebPart to SharePoint, you must first make it as a safe control to use within SharePoint in the web.config file. Entries made in the safe controls element of SharePoint are encountered by the SharePointHandler object and will be loaded in the SharePoint environment properly, those not will not be loaded and will throw an error.
In the generic safe control entry (this is general, there could be more), there is generally the Assembly name, the namespace, the public key token numeric, the typename, and the safe declaration (whether it is safe or not). There are other optional elements.

You can also find related Interview Question to What are safe controls, and what type of information, is placed in that element in a SharePoint web.config file?  below: 

What are safe controls and what type of information is placed in that element in a SharePoint web.config file?

  
When you deploy a WebPart to SharePoint, you must first make it as a safe control to use within SharePoint in the web.config file. Entries made in the safe controls element of SharePoint are encountered by the SharePointHandler object and will be loaded in the SharePoint environment properly, those not will not be loaded and will throw an error.

In the generic safe control entry (this is general, there could be more), there is generally the Assembly name, the namespace, the public key token numeric, the typename, and the safe declaration (whether it is safe or not). There are other optional elements. (More...)

What is type safe?

  
Type safety is about increasing the opportunities for the compiler to detect your coding errors. If you use interfaces instead of delegates the compiler will have more opportunities to detect your coding errors. (More...)

what is the use of using web.config file

  
By using this web.config file we can store sqlconnection string.This SqlConnection String can be accessed any where in your application.for security purpose of connection string also we can use web.config. (More...)

Can we have more than one web.config file in our application?

  
Yes,we can create or use more than one web.config file in our application. (More...)

if we remove a web.config file from the application , is this application will work?

  
It Depends on coding if we used something that is required to pioc values from configuration file then its required otherwise we can run our application without web.config. (More...)

Can i add more than 1 web.config file in a single application?

  
Yes, it is possible to add more than 1 web.config file in a single application. (More...)

Is it possible to add multiple Machine.config file?

  
No, it is not possible to add more than 1 machine.config file. if we want to overwrite any setting than that can be achieve with the help of web.config. (More...)

Is it possible to update a connection string stored in the Web.config file programatically? If Yes, then how?

  
Yes.

Create a Configuration object. Then, update the connection string using the ConnectionStrings collection. Finally, call Configuration.Save. (More...)

How do you retrieve the customized properties of a .NET application from XML .config file?

  
Initialize an instance of AppSettingsReader class. Call the GetValue method of AppSettingsReader class, passing in the name of the property and the type expected. Assign the result to the appropriate variable. (More...)

Why .NET delegates are called type safe?

  
.NET delegates are type safe. If you will attempt to pass a delegate, a method that does not "match the pattern", you will receive a compile time error "Method does not match delegate pattern!". (More...)

difference between backup file and .stp file in sharepoint site

  
A backup file is more like a DB snapshot (if you are talking about the backup operation of STSADM)

You can save a site with our without content as template and can create other sites based upon that site template. For that first you have to save your site as a template which will be saved with extension .STP, OOB there is limitation of 10MB in size but u can increase the size upto 2 GB using STSADM command. (More...)

can asp.net website runs without web.config file?

  
Yes, and it will take the default setting from machine.config file from the machine. so web.config file is not necessary or must for running or publishing website or web application. (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