narayan sahu


{ City } bhopal
< Country > india
* Profession * senior software developer
User No # 3059
Total Questions Posted # 0
Total Answers Posted # 11

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 109
Users Marked my Answers as Wrong # 26
Questions / { narayan sahu }
Questions Answers Category Views Company eMail




Answers / { narayan sahu }

Question { Wipro, 20245 }

Explain manifest & metadata.


Answer

manifest
Every assembly, whether static or dynamic, contains a
collection of data that describes how the elements in the
assembly relate to each other. The assembly manifest
contains this assembly metadata. An assembly manifest
contains all the metadata needed to specify the assembly's
version requirements and security identity, and all
metadata needed to define the scope of the assembly and
resolve references to resources and classes. The assembly
manifest can be stored in either a PE file (an .exe
or .dll) with Microsoft intermediate language (MSIL) code
or in a standalone PE file that contains only assembly
manifest information.
Metadata
Metadata is binary information describing your program that
is stored either in a common language runtime portable
executable (PE) file or in memory. When you compile your
code into a PE file, metadata is inserted into one portion
of the file, while your code is converted to Microsoft
intermediate language (MSIL) and inserted into another
portion of the file. Every type and member defined and
referenced in a module or assembly is described within
metadata. When code is executed, the runtime loads metadata
into memory and references it to discover information about
your code's classes, members, inheritance, and so on.

Is This Answer Correct ?    17 Yes 4 No

Question { Wipro, 4361 }

Directcast(123.34,integer) - should it throw an error? Why
or why not?


Answer

Yes, because the specified type and the runtime type is not
same

Is This Answer Correct ?    8 Yes 0 No


Question { Wipro, 8297 }

Give An example of a ctype and directcast.


Answer

textbox = CType(obj, TextBox)
textbox = DirectCast(obj, TextBox)

Is This Answer Correct ?    15 Yes 8 No

Question { Wipro, 11547 }

What is the Difference between directcast and ctype?


Answer

The difference between the two keywords is that CType
succeeds as long as there is a valid conversion defined
between the expression and the type, whereas DirectCast
requires the run-time type of an object variable to be the
same as the specified type. If the specified type and the
run-time type of the expression are the same, however, the
run-time performance of DirectCast is better than that of
CType. DirectCast throws an InvalidCastException error if
the argument types do not match.

Is This Answer Correct ?    12 Yes 3 No

Question { TCS, 10601 }

How WSDL is stored ?


Answer

WSDL is an XML format for describing network services as a
set of endpoints operating on messages containing either
document-oriented or procedure-oriented information. The
operations and messages are described abstractly, and then
bound to a concrete network protocol and message format to
define an endpoint. Related concrete endpoints are combined
into abstract endpoints (services). WSDL is extensible to
allow description of endpoints and their messages
regardless of what message formats or network protocols are
used to communicate, however, the only bindings described
in this document describe how to use WSDL in conjunction
with SOAP 1.1, HTTP GET/POST, and MIME.


Is This Answer Correct ?    4 Yes 4 No

Question { TCS, 7906 }

What are the providers available with VS.NET ?


Answer

oledb,sql,oracle,ibm

Is This Answer Correct ?    1 Yes 4 No

Question { TCS, 7906 }

What are the providers available with VS.NET ?


Answer

Odbc Data Provider:System.Data.Odbc
OleDb Data Provider:System.Data.OleDb
SqlClient Data Provider:System.Data.SqlClient
OracleClient Data Provider:System.Data.OracleClient

Is This Answer Correct ?    20 Yes 0 No

Question { Accenture, 9386 }

How do you do role based security ?


Answer

1.Create a principle object which contains users identity
(login name) and array of roles
2.and pass this object to HttpContext.Current.User
3.The roles supplied to this object will be checked against
roles specified in the web.config file,if they matched then
they are allowed access to the page otherwise not.

allowed roles can be specified like this in web.config




Is This Answer Correct ?    17 Yes 1 No

Question { 3i Infotech, 13234 }

Is string reference type / value type ?


Answer

It's a common misconception that string is a value type.
That's because its immutability makes it act sort of like
a value type. It actually acts like a normal reference type

Is This Answer Correct ?    3 Yes 2 No

Question { Accenture, 11598 }

Types of configuration files and their differences ?


Answer

app.config-> contains application specific settings

web.config
Web.config is a security in ASP.Net application and how to
secure applications. Web.config does most of the work for
the application the who, what, where, when and how to be
authenticated.
1.This is automatically created when you create an ASP.Net
web application project.
2.This is also called application level configuration file.
3.This file inherits setting from the machine.config

Machine.config contains settings that apply to an entire
computer. This file is located in the %runtime install path%
\Config directory. Machine.config contains configuration
settings for machine-wide assembly binding, built-in
remoting channels.
1.This is automatically installed when you install Visual
Studio. Net.
2.This is also called machine level configuration file.
3.Only one machine.config file exists on a server.
4.This file is at the highest level in the configuration
hierarchy.

Is This Answer Correct ?    8 Yes 0 No

Question { Accenture, 11175 }

Should sn.exe be used before gacutil.exe ?


Answer

Yes. Before placing an assembly to GAC, we should sign the
assembly with a strong name using sn.exe

Is This Answer Correct ?    4 Yes 0 No