Assemblies are the smallest units of versioning and deployment
in the .NET application. Assemblies are also the building blocks for programs
such as Web services, Windows
services, serviced components, and .NET remoting applications.
A strong name includes the
name of the assembly, version number, culture identity, and a public key token.
Use the directive in the XML .config file for a given
application.
<probing
privatePath="c:\mylibs; bin\debug” />
should
do the trick. Or you can add additional search paths in the Properties box of the deployed application.
Use publisher policy. To configure a publisher
policy, use the publisher policy configuration file, which uses a format similar app .config file. But unlike the app .config file, a publisher policy file needs to be compiled into an assembly and placed in the GAC.
Delay signing allows you to place a shared
assembly in the GAC by signing the assembly with just the public key. This allows the assembly to be signed with the private key at a later stage, when the development process is complete and the component or assembly is ready to be deployed. This process enables developers to work with shared assemblies as if they were strongly named, and it secures the private key of the signature from being accessed at different stages of development. |
A Blog For MicroSoft Technologies Visual Studio .Net, SQL Server Developers.
Thursday, 20 December 2012
ASP.NET Interview Question Answers For Deployment questions
ASP.NET Inertview Question Answers FOR Windows code security questions
- What’s
the difference between code-based security and role-based security? Which
one is better? Code security is the
approach of using permissions and permission sets for a given code to
run. The admin, for example, can disable running executables off the
Internet or restrict access to corporate database to only few
applications. Role-based security most of the time involves the code
running with the privileges of the current user. This way the code
cannot supposedly do more harm than mess up a single user account.
There’s no better, or 100% thumbs-up approach, depending on the nature
of deployment, both code-based and role-based security could be
implemented to an extent. - How can you work with permissions from your .NET application?
You can request
permission to do something and you can demand certain permissions from other
apps. You can also refuse permissions so that your app is not inadvertently used
to destroy some data.
- How can C# app request minimum permissions?
using
System.Security.Permissions;
[assembly:FileDialogPermissionAttribute(SecurityAction.RequestMinimum,
Unrestricted=true)]
System.Security.Permissions;
[assembly:FileDialogPermissionAttribute(SecurityAction.RequestMinimum,
Unrestricted=true)]
- What’s a code group?
A code group is a set of assemblies that share a security
context.
- What’s
the difference between authentication and authorization?
Authentication happens first. You verify user’s identity based on
credentials. Authorization is making sure the user only gets access to
the resources he has credentials for. - What
are the authentication modes in ASP.NET?
None, Windows, Forms and Passport. - Are the actual permissions for the application defined at run-time or compile-time?
Interview Question Answers For - ASP.NET DataGrid questions
The DataGrid Web server control is a powerful tool for
displaying information from a data
source. It is easy to use; you can display editable data in a professional-looking grid by setting only a few properties. At the same time, the grid has a sophisticated object model that provides you with great flexibility in how you display the data.
The web ui control does
notinherently support master-detail data structures. As with other web server controls, it does not support two-way data binding. If you wantto
update data, you must write code to do this yourself. You can only edit one
row at a time. It does not inherently support sorting, although it raises
events you can handle in order to sort the grid contents. You can bind the
web forms datagrid to any object that supports the ienumerable interface. The
web forms datagrid control supports paging. It is easy to customize the
appearance and layout of the web forms datagrid control as compared to the
windows forms one.
If you want to customize the content of a column, make the
column a template column. Template columns work like item templates in the
DataList or Repeater control, except that you are
defining the layout of a column rather than a row.
You cannot specify formatting
for columns generated when the grid’s AutoGenerateColumns
property is set to true, only for bound or template columns. To format, set the column’s DataFormatString property to a string-formatting expression suitable for the data type of the data you are formatting.
One way to have columns
appear dynamically is to create them at design time, and then to hide or
show them as needed. You can do this by setting a column’s Visible property.
This is just a brief on dealing
with ASP.NET DataGrid control. The full version of the document and the sample code is available on MSDN. <![if !supportLineBreakNewLine]> <![endif]> |
Subscribe to:
Posts (Atom)