Blog Home  Home Feed your aggregator (RSS 2.0)  
Software Code Help - Friday, January 22, 2010
Blog
 
# Friday, January 22, 2010

At times users access a resource as though they were someone else. This is known as impersonation. For example, if a web page has no access controls, then any user can access that web page. HTML pages, ASP pages, and components in version 3.0 and earlier can be accessed through two accounts named IUSR_machinename and IWAM_machinename. Both the accounts are set up during IIS installation, and are automatically added to all the folders in every web site on the server.

Anonymous access to a resource in IIS makes the task of identifying a user extremely difficult. But there is no need to authenticate a user in the case of IIS. When IIS receives a request for a web page or other resource that has permission for anonymous access, IIS treats the IUSR_machinename account as the user's account, to access the resources. If the resource requested by the user is an ASP page that uses a COM or COM+ component, that component is executed using the IWAM_machinename account.

In ASP.NET, when impersonation is turned off, the resources can be accessed using a "local system process" account. When impersonation is turned on, ASP.NET executes every resource using the account of a specified user who is authenticated when the user makes the request. If you specify the IUSR_machinename account to be used as the user account, then ASP.NET will behave like previous versions of ASP, in providing access to the resources.

In ASP.NET, you first need to check whether the application is configured to use impersonation. In the case of IIS, the IIS impersonates users with its own IUSR account. In the case of ASP.NET, impersonation is used to decide whether the user's request should be executed using the account of the requested user, or that of a local system-process account that ASP.NET uses for anonymous requests.

The concept of impersonation is complex to some extent due to the fact that ASP.NET uses the dynamic compilation features of the .NET Framework. The IUSR account has only limited permissions on the local machine, and so is not suitable without some reconfiguration. This account is also used by IIS to access resources like HTML pages, documents, and zip files that are not executed as part of the .NET Framework.

If impersonation is enabled in an ASP.NET application then:
• If anonymous access is enabled in IIS, the request is made using the IUSR_machinename account.
• If anonymous access is disabled in IIS, the request is made using the account of the authenticated user.
• In either case, permissions for the account are checked in the Windows Access Control List (ACL) for the resource(s) that a user requests, and a resource is only available if the account they are running under is valid for that resource.

If impersonation is disabled in an ASP.NET application then:
• If anonymous access is enabled in IIS, the request is made using the system-level process account.
• If anonymous access is disabled in IIS, the request is made using the account of the authenticated user.
• In either case, permissions for the account are checked in the Windows ACL for the resource(s) that a user requests, and a resource is only available if the account they are running under is valid for that resource.

Friday, January 22, 2010 5:51:33 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Interview Question ASP.NET  | 

a) PRE JIT : It Compiles complete source code to native caode In a single Compilation.

b) ECONO JIT : It compiles only those methods that are called at Runtime.

c) NORMAL JIT : It compiles only those methods that are called at Runtime and are stored in cache.

Friday, January 22, 2010 5:48:19 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Interview Question .Net  | 

Association represents the ability of one instance to send a message to another instance. This is typically implemented with a pointer or reference instance variable, although it might also be implemented as a method argument, or the creation of a local variable.

Aggregation is the typical whole/part relationship. This is exactly the same as an association with the exception that instances cannot have cyclic aggregation relationships (i.e. a part cannot contain its whole).
The fact that this is aggregation means that the instances of Node cannot form a cycle. Thus, this is a Tree of Nodes not a graph of Nodes.


Composition is exactly like Aggregation except that the lifetime of the 'part' is controlled by the 'whole'. This control may be direct or transitive. That is, the 'whole' may take direct responsibility for creating or destroying the 'part', or it may accept an already created part, and later pass it on to some other whole that assumes responsibility for it.

Friday, January 22, 2010 5:45:21 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Interview Question .Net  | 

XSLT is a rule based language used to transform XML documents in to other file formats. XSLT are nothing but generic transformation rules which can be applied to transform XML document to HTML, CS, Rich text etc. the XSLT processor takes the XML file and applies the XSLT transformation to produce a different document.

XPATH It is an XML query language to select specific parts of an XML document. Using XPATH you can address or filter elements and text in a XML document. For instance a simple XPATH expression like "Invoice/Amount" states find "Amount" node which are children of "Invoice" node.

Friday, January 22, 2010 5:39:19 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

MSXML supports XMLDOM and SAX parsers while .NET framework XML classes support XML DOM and XML readers and writers.

MSXML supports asynchronous loading and validation while parsing. For instance you can send synchronous and asynchronous calls to a remote URL. But as such there is not direct support of synchronous and asynchronous calls in .NET framework XML. But same can be achieved by using "System.Net" namespaces.

Friday, January 22, 2010 5:33:56 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

"System.xml.dll" is the actual physical file which has all XML implementation. Below are the commonly used namespaces:-

√ System.Xml

√ System.Xml.Schema

√ System.Xml.XPath

√ System.Xml.Xsl

Friday, January 22, 2010 5:32:19 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

XSL (the eXtensible Stylesheet Language) is used to transform XML document to some other document. So its transformation document which can convert XML to some other document. For instance you can apply XSL to XML and convert it to HTML document or probably CSV files.

Friday, January 22, 2010 5:30:50 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

All data is normally parsed in XML but if you want to exclude some elements you will need to put those elements in CDATA.

With CSS you can format a XML document.

Friday, January 22, 2010 5:30:19 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

If a XML document is confirming to XML rules (all tags started are closed, there is a root element etc) then it’s a well formed XML.

If XML is confirming to DTD rules then it’s a valid XML.

Friday, January 22, 2010 5:29:16 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

It defines how your XML should structure. For instance in the above XML we want to make it compulsory to provide "qty" and "totalcost", also that these two elements can only contain numeric. So you can define the DTD document and use that DTD document with in that XML

Friday, January 22, 2010 5:28:11 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 
Copyright © 2010 SoftwareCodeHelp. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: