.NET WebDev and Web services questions

  1. How does ASP page work?
  2. How ASP.NET page works?
  3. What are the contents of cookie?
  4. How do you create a permanent cookie?
  5. What is ViewState? What does the “EnableViewState” property do? Whay would I want it on or off?
  6. Give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?
  7. Describe the role of global.asax?
  8. How can you debug your.NET application?
  9. How do you deploy your ASP.NET application?
  10. Where do we store our connection string in ASP.NET application?
  11. Explain security types in ASP.NET?
  12. Where do we store our connection string in ASP.NET application?
  13. Explain different Authentication modes in ASP.NET?
  14. How.NET has implemented security for web applications?
  15. How to do forms authentication in ASP.NET?
  16. Explain authentication levels in.NET?
  17. Explain authorization levels in.NET?
  18. How can you debug an ASP page, without touching the code?
  19. How can you handle Exceptions in ASP.NET?
  20. How can you handle UnManaged Code Exceptions in ASP.NET?
  21. Which is the namespace used to write error message in event Lof File?
  22. What are the Page level transaction and class level transaction?
  23. What are different transaction options?
  24. What is the namespace for encryption?
  25. What is the difference between application and cache variables?
  26. What is the difference between control and component?
  27. You have defined one page_load event in ASPx page and same page_load event in code behind, how will program run?
  28. Where would you use an IHttpModule, and what are the limitations of any approach you might take in implementing one?
  29. Can you edit data in the Repeater control? Which template must you provide, in order to display data in Repeater control? How can you provide an alternating color scheme in a repeater control? What property must you set, and what method must you call in your code, in order to bind the data from some source to the repeater?
  30. In what order do the events of an ASPX page executes. As a developer is it important to understand these events?
  31. How would you get ASP.NET running in Apache web servers? Why would you even do this?
  32. What tags do you need to add within the ASP:datagrid tags to bind columns manualy?
  33. How can we create pie chart in ASP.NET?
  34. How do you understand asynchronous web services?
  35. What are the events fired when web service called?
  36. How do you perform a transaction in web services?
  37. How does SOAP transport happen and what is the role of HTTP in it? How you can access a webservice using soap?
  38. What are the different formatters can be used in both Binary and SOAP?
  39. How will you expose/publish a webservice?
  40. What is disco file?
  41. What’s the attribute for webservice method? What is the namespace for creating webservice?
  42. Can you pass SOAP messages through remoting?
  43. Explain web client class and its methods?
  44. What is flow of remoting?
  45. Explain the concept of data island?
  46. How to useXML DOM model on client using JavaScript?
  47. What are the ways to create a tree view control usingXML, XSL and JavaScript?
  48. What is XPathNavigator?
  49. What is the use of Template in XSL?
  50. What is “Well FormedXML” and “ValidXML“?
  51. How will you do SubString in XSL?
  52. How do you deal sorting columns dynamically inXML?
  53. What is “Async” property ofXML?
  54. What is XPath query?
  55. Explain differences between Element and Node.
  56. What is CDATA section?
  57. Explain definition and differences between DOM and SAX?
  58. What is GetElementbyname method will do?
  59. What will selectnode method will do?
  60. What is validXML document?
  61. What is well formedXML document?
  62. What is the difference betweenXMLDocument andXMLDataDocument?
  63. Can I replace my Sqlserver withXML files and how about handling the same?
  64. Write syntax to serialize class usingXML Serializer?
  65. How can we configure the sites in web server(IIS)?
  66. Explain advantages of IIS 6.0?
This entry was posted in .NET, Web dev, Windows. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

28 Comments on .NET WebDev and Web services questions

  1. arun
    Posted 2/9/2006 at 9:13 am | Permalink

    24) Ans: System.Security.cryptography;

  2. arun
    Posted 3/2/2006 at 1:11 am | Permalink

    60.An XML document that references a DTD in a DOCTYPE statement

  3. arun
    Posted 3/2/2006 at 1:12 am | Permalink

    61.An XML document that does not reference a DTD(document type definition)
    Source: http://www.epcedit.com/UserManual/g4701.html

  4. Stephany
    Posted 3/27/2006 at 1:35 pm | Permalink

    1 How does ASP page work?

    An ASP page is an HTML page that contains server-side scripts written on VBScript or Jscript or Perl that are processed by the Web server before being sent to the user’s browser. ASP can be combined with HTML, XML and COM to create Web sites.
    Server-side scripts run when a browser requests an .asp file from the Web server. ASP is called by the Web server, which processes the requested file and executes script commands. It then formats a standard Web page and sends it to the browser.

  5. Stephany
    Posted 3/27/2006 at 1:38 pm | Permalink

    2 How ASP.NET page works?

    Web Forms pages are built with ASP.NET technology. ASP.NET is built on the .NET Framework, so the entire framework is available to any ASP.NET application. Your applications can be written in any language compatible with the common language runtime, including Microsoft Visual Basic, Visual C#, and JScript .NET.

    The ASP.NET page framework is a programming framework that runs on a Web server to dynamically produce and manage Web Forms pages.

    Web Forms pages run on any browser or client device.

  6. Stephany
    Posted 3/27/2006 at 1:58 pm | Permalink

    3 What are the contents of cookie?

    Cookie is a small amount of data and it contains page-specific information(usually user ID) the server sends to the client along with page output. Cookies can contain only strings.

  7. Stephany
    Posted 3/27/2006 at 2:16 pm | Permalink

    4 How do you create a permanent cookie?

    Dim oCookie As New HttpCookie(“permanentCookie”,”Bonjour!”)
    oCookie.Expires=#12/01/2006#
    Response.Cookies.Add(oCookie)

  8. Stephany
    Posted 3/27/2006 at 4:31 pm | Permalink

    5 What is ViewState? What does the “EnableViewState” property do? Whay would I want it on or off?

    View state is a property of Web Forms page and each control of the page to save their values so it can be used between round trips to the server.
    When the page is processed, the current state of the page and controls is inserted into a string and saved in the page as a hidden field. When the page is posted back to the server, the page parses the view state string at page initialization and restores property information in the page.

    EnableViewState indicates whether the page maintains its view state, and the view state of any server controls it contains, when the current page request ends.

    The benefits of using ViewState are it automatically store values between multiple requests for the same page, it is saved as a hidden field of the page and no server resources required.

    It is better to disable ViewState if a control or a page contain large amount of data. Saving such an amount can affect the form load. Because the view state is stored in the page itself, storing large values can cause the page to slow down when users display it and when they post it.

  9. Stephany
    Posted 3/27/2006 at 8:26 pm | Permalink

    6 Give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?

    In Application_Start you can initialize the variables, upload data from database table and store in ViewState or in Cache.

    In Session_Start you can count the number of active sessions, automatically redirect users to the certain Web page at the beginning of the session.

  10. Stephany
    Posted 3/27/2006 at 8:32 pm | Permalink

    7 Describe the role of global.asax?

    The Global.asax file is an optional file that contains code for responding to application-level events raised by ASP.NET or by HttpModules and initializing global application objects. The Global.asax file resides in the root directory of an ASP.NET-based application.

  11. Stephany
    Posted 3/30/2006 at 5:12 pm | Permalink

    8 How can you debug your.NET application?

    You can debug .NET application using Visual Studio .NET.
    If Visual Studio .NET is not installed you can use Systems.Diagnostics classes, Runtime Debugger (Cordbg.exe), or Microsoft Common Language Runtime Debugger (DbgCLR.exe)

    System.Diagnostics includes the Trace and Debug classes for tracing execution flow, and the Process, EventLog, and PerformanceCounter classes for profiling code.
    The Cordbg.exe command-line debugger can be used to debug managed code from the command-line interpreter.

    DbgCLR.exe is a debugger with the Windows interface for debugging managed code.

  12. Stephany
    Posted 3/30/2006 at 6:15 pm | Permalink

    9 How do you deploy your ASP.NET application?

    To create ASP.NET Web applications, you use a standard deployment model: your project is compiled and the resulting files are deployed. The Web Forms code-behind class file (.aspx.vb, or .aspx.cs) is compiled into a project .dll file along with all other class files included in your project. This single project .dll file is then deployed to the server, without any source code. When a request for the page is received, the project .dll file is instantiated and executed.

  13. Stephany
    Posted 3/30/2006 at 7:28 pm | Permalink

    10 Where do we store our connection string in ASP.NET application?

    You can store Connection String in Web.config file:

    create a new add key in the appSettings element.

    Or in the Registry

    add new subkeys to the SOFTWARE key in the HKEY_LOCAL_MACHINE

  14. Stephany
    Posted 3/31/2006 at 12:09 pm | Permalink

    11 Explain security types in ASP.NET?

    ASP.NET, in conjunction with Microsoft Internet Information Services (IIS), can authenticate user credentials such as names and passwords using any of the following authentication methods:
    • Windows: Basic, digest, or Integrated Windows Authentication. If the user making the request has already been authenticated in a Windows-based network, IIS can pass the user’s credentials through when requesting access to a resource.

    • Microsoft Passport authentication
    Passport authentication allows implementing single sign-in for multiple applications or websites that want to authenticate users. The user is expected to use only one username and password to access all the sites.

    • Forms authentication
    generally refers to a system in which unauthenticated requests are redirected to a registration form. The user provides credentials and submits the form. If the application authenticates the request, the system issues a cookie that contains the credentials or a key for reacquiring the identity.

    • Client Certificate authentication
    IIS supports the use of digital certificates and the secure sockets layer (SSL). In this scenario, either the server or the client has a certificate — a digital identification — that they have obtained from a third-party source. The certification is passed to your application with requests. It can be mapped to a Windows user account and granted appropriate permissions.

  15. Stephany
    Posted 3/31/2006 at 1:51 pm | Permalink

    13 Explain different Authentication modes in ASP.NET?

    Authentication modes are: Windows, Forms, Passport, or None.

    ASP.NET uses Windows authentication in conjunction with IIS authentication. It authenticates the identity using basic, digest, or Integrated Windows authentication, or some combination of them.
    All users are authenticated as soon as they log on to Windows.

    Passport authentication is centralized authentication service provided by Microsoft that offers a single log on and core profile services for member sites.

    Form authentication generally refers to a system in which unauthenticated requests are redirected to a registration form. The user provides credentials and submits the form. If the application authenticates the request, the system issues a cookie that contains the credentials or a key for reacquiring the identity.

    None authentication is used when you want to apply anonymous authentication or a custom authentication scheme.

  16. Stephany
    Posted 3/31/2006 at 4:03 pm | Permalink

    14 How.NET has implemented security for web applications?

    To secure Web application, .NET uses two functions: Authentication and Authorization.
    Authentication is the process of obtaining identification credentials such as name and password from a user and validating those credentials against some authority.
    Authorization limits access rights by granting or denying specific permissions to an authenticated identity.

  17. Stephany
    Posted 3/31/2006 at 5:47 pm | Permalink

    15 How to do forms authentication in ASP.NET?

    You need to create an entry in Web.Config
    authentication mode=”Forms”
    forms
    name=”.TheCookie”
    loginUrl=”/login/login.aspx”
    protection=”All”
    timeout=”70″
    path=”/”/
    /authentication

  18. Stephany
    Posted 4/1/2006 at 12:00 pm | Permalink

    16 Explain authentication levels in.NET?

    Authentication can be declared only at the machine, site, or application level.

  19. Stephany
    Posted 4/1/2006 at 12:00 pm | Permalink

    17 Explain authorization levels in.NET?

    Authorization controls client access to URL resources. It can be declared at any level: machine, site, application, subdirectory, or page.

  20. Stephany
    Posted 4/1/2006 at 1:46 pm | Permalink

    18 How can you debug an ASP page, without touching the code?

    You can debug ASP page using either the Microsoft Script Debugger or Visual InterDev

  21. Stephany
    Posted 4/1/2006 at 8:06 pm | Permalink

    19 How can you handle Exceptions in ASP.NET?

    You can handle Exceptions using Try Catch Finally block.

    Also in Global.asax you can create an application-wide error handler Application_Error or create a handler in a page for the Page_Error event. Application_Error and Page_Error methods are called if an unhandled exception occurs anywhere in your page or application.

    You can also use the Page class property ErrorPage that gets or sets the error page to which the requesting browser is redirected in the event of an unhandled page exception.
    It works only when customErrors mode is on in Web.Config or Machine.Config.

    The sub-element error of customErrors element in Web.Config can be used to define one custom error redirect associated with an HTTP status code and

    defaultRedirect attribute is used to specify the default URL to direct a browser to if an error occurs. When defaultRedirect is not specified, a generic error is displayed instead.

  22. Stephany
    Posted 4/2/2006 at 7:14 pm | Permalink

    19 How can you handle UnManaged Code Exceptions in ASP.NET?

    Unmanaged code can include both C++-style SEH Exceptions and COM-based HRESULTS.

    COM handles errors through HRESULT. If an exception occurs in unmanaged code, the COM HRESULT is mapped to the appropriate exception class, which is returned to .NET, where it can be handled like any other exception.

    User-defined exception classes can specify whatever HRESULT is appropriate. These exception classes can dynamically change the HRESULT to be returned when the exception is generated by setting the HResult field on the exception object. Additional information about the exception is provided to the client through the IErrorInfo interface, which is implemented on the .NET object in the unmanaged process.

  23. Stephany
    Posted 4/3/2006 at 12:11 pm | Permalink

    21 Which is the namespace used to write error message in event Log File?

    Namespace: System.Diagnostics

  24. Stephany
    Posted 4/3/2006 at 4:22 pm | Permalink

    22 What are the Page level transaction and class level transaction?

    ASP.NET transaction support allows pages to participate in ongoing Microsoft .NET Framework transactions. Transaction support is exposed via an @Transaction directive that indicates the desired level of support: Required, RequiresNew, Supported, NotSupported, Disabled.

    The Transaction attribute is applied at the class level too to indicate that all class methods should be run in the context of a transaction. If an unhandled exception is thrown during the execution of a class method, the transaction is aborted. Otherwise, the transaction is committed.

    using System.EnterpriseServices;
    [Transaction]
    public class TransactionAttribute_Cl : ServicedComponent
    {
    }

  25. Stephany
    Posted 4/3/2006 at 8:09 pm | Permalink

    23 What are different transaction options?

    Required - Shares a transaction, if one exists, and creates a new transaction, if necessary.

    RequiresNew- Creates the component with a new transaction, regardless of the state of the current context.

    Supported- Shares a transaction, if one exists.

    NotSupported- Indicates that the object does not run within the scope of transactions. When a request is processed, its object context is created without a transaction, regardless of whether there is a transaction active.

    Disabled - Ignores any transaction in the current context.

  26. Stephany
    Posted 4/4/2006 at 12:19 pm | Permalink

    24 What is the namespace for encryption?

    System.Security.Cryptography

  27. Stephany
    Posted 4/6/2006 at 10:51 am | Permalink

    25 What is the difference between application and cache variables?

    ASP.NET allows you to save values using application state (an instance of the HttpApplicationState class) for each active Web application. Application state is a global storage mechanism accessible from all pages in the Web application and is thus useful for storing information that needs to be maintained between server round trips and between pages.
    The memory occupied by variables stored in application state is not released until the value is either removed or replaced.
    Application state is a key-value dictionary structure created during each request to a specific URL. You can add your application-specific information to this structure to store it between page requests.
    Once you add your application-specific information to application state, the server manages it.

    Cache data can persist for a long time, but not across application restarts. It can hold both large and small amounts of data effectively. Also, data can expire based on time set by the application code or other dependencies; this feature is not available in the Application object.

  28. Stephany
    Posted 4/6/2006 at 5:17 pm | Permalink

    26 What is the difference between control and component?

    Components implement the System.ComponentModel.IComponent interface by deriving from the SystemComponent.Model.Component base class. Component is generally used for an object that is reusable and can interact with other objects. A .NET Framework component additionally provides features such as control over external resources and design-time support.

    A control is a component that provides user-interface capabilities. Controls draw themselves and shown in the visual area.
    The .NET Framework provides two base classes for controls: one for client-side Windows Forms controls and the other for ASP.NET server controls. These are System.Windows.Forms.Control and System.Web.UI.Control. System.Windows.Forms.Control derives from Component base class and itself provides UI capabilities.
    System.Web.UI.Control implements IComponent and provides the infrastructure on which it is easy to add UI functionality.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*