Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger


Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Thursday, 19 June 2008

ASP.NET questions, part 111

  1. Explain the differences between Server-side and Client-side code? Server side scripting means that all the script will be executed by the server and interpreted as needed. ASP doesn’t have some of the functionality like sockets, uploading, etc. For these you have to make a custom components usually in VB or VC++. Client side scripting means that the script will be executed immediately in the browser such as form field validation, clock, email validation, etc. Client side scripting is usually done in VBScript or JavaScript. Download time, browser compatibility, and visible code - since JavaScript and VBScript code is included in the HTML page, then anyone can see the code by viewing the page source. Also a possible security hazards for the client computer.
  2. What type of code (server or client) is found in a Code-Behind class? C#
  3. Should validation (did the user enter a real date) occur server-side or client-side? Why? Client-side validation because there is no need to request a server side date when you could obtain a date from the client machine.
  4. What does the "EnableViewState" property do? Why would I want it on or off? Enable ViewState turns on the automatic state management feature that enables server controls to re-populate their values on a round trip without requiring you to write any code. This feature is not free however, since the state of a control is passed to and from the server in a hidden form field. You should be aware of when ViewState is helping you and when it is not. For example, if you are binding a control to data on every round trip (as in the datagrid example in tip #4), then you do not need the control to maintain it’s view state, since you will wipe out any re-populated data in any case. ViewState is enabled for all server controls by default. To disable it, set the EnableViewState property of the control to false.
  5. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? Server.Transfer() : client is shown as it is on the requesting page only, but the all the content is of the requested page. Data can be persist accros the pages using Context.Item collection, which is one of the best way to transfer data from one page to another keeping the page state alive. Response.Dedirect() :client know the physical loation (page name and query string as well). Context.Items loses the persisitance when nevigate to destination page. In earlier versions of IIS, if we wanted to send a user to a new Web page, the only option we had was Response.Redirect. While this method does accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes each page to be treated as a separate transaction. Besides making it difficult to maintain your transactional integrity, Response.Redirect introduces some additional headaches. First, it prevents good encapsulation of code. Second, you lose access to all of the properties in the Request object. Sure, there are workarounds, but they’re difficult. Finally, Response.Redirect necessitates a round trip to the client, which, on high-volume sites, causes scalability problems. As you might suspect, Server.Transfer fixes all of these problems. It does this by performing the transfer on the server without requiring a roundtrip to the client.
  6. Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component? When to Use Web Services:
    • Communicating through a Firewall When building a distributed application with 100s/1000s of users spread over multiple locations, there is always the problem of communicating between client and server because of firewalls and proxy servers. Exposing your middle tier components as Web Services and invoking the directly from a Windows UI is a very valid option.
    • Application Integration When integrating applications written in various languages and running on disparate systems. Or even applications running on the same platform that have been written by separate vendors.
    • Business-to-Business Integration This is an enabler for B2B intergtation which allows one to expose vital business processes to authorized supplier and customers. An example would be exposing electronic ordering and invoicing, allowing customers to send you purchase orders and suppliers to send you invoices electronically.
    • Software Reuse This takes place at multiple levels. Code Reuse at the Source code level or binary componet-based resuse. The limiting factor here is that you can reuse the code but not the data behind it. Webservice overcome this limitation. A scenario could be when you are building an app that aggregates the functionality of serveral other Applicatons. Each of these functions could be performed by individual apps, but there is value in perhaps combining the the multiple apps to present a unifiend view in a Portal or Intranet.
    • When not to use Web Services: Single machine Applicatons When the apps are running on the same machine and need to communicate with each other use a native API. You also have the options of using component technologies such as COM or .NET Componets as there is very little overhead.
    • Homogeneous Applications on a LAN If you have Win32 or Winforms apps that want to communicate to their server counterpart. It is much more efficient to use DCOM in the case of Win32 apps and .NET Remoting in the case of .NET Apps.
  7. Let’s say I have an existing application written using Visual Studio (VBInterDevand this application utilizes WindowsCOM+ transaction services. How would you approach migrating this application to .NET?
  8. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset? In ADO, the in-memory representation of data is the recordset. In ADO.NET, it is the dataset. There are important differences between them.
    • A recordset looks like a single table. If a recordset is to contain data from multiple database tables, it must use a JOIN query, which assembles the data from the various database tables into a single result table. In contrast, a dataset is a collection of one or more tables. The tables within a dataset are called data tables; specifically, they are DataTable objects. If a dataset contains data from multiple database tables, it will typically contain multiple DataTable objects. That is, each DataTable object typically corresponds to a single database table or view. In this way, a dataset can mimic the structure of the underlying database. A dataset usually also contains relationships. A relationship within a dataset is analogous to a foreign-key relationship in a database —that is, it associates rows of the tables with each other. For example, if a dataset contains a table about investors and another table about each investor’s stock purchases, it could also contain a relationship connecting each row of the investor table with the corresponding rows of the purchase table. Because the dataset can hold multiple, separate tables and maintain information about relationships between them, it can hold much richer data structures than a recordset, including self-relating tables and tables with many-to-many relationships.
    • In ADO you scan sequentially through the rows of the recordset using the ADO MoveNext method. In ADO.NET, rows are represented as collections, so you can loop through a table as you would through any collection, or access particular rows via ordinal or primary key index. DataRelation objects maintain information about master and detail records and provide a method that allows you to get records related to the one you are working with. For example, starting from the row of the Investor table for "Nate Sun," you can navigate to the set of rows of the Purchase table describing his purchases. A cursor is a database element that controls record navigation, the ability to update data, and the visibility of changes made to the database by other users. ADO.NET does not have an inherent cursor object, but instead includes data classes that provide the functionality of a traditional cursor. For example, the functionality of a forward-only, read-only cursor is available in the ADO.NET DataReader object. For more information about cursor functionality, see Data Access Technologies.
    • Minimized Open Connections: In ADO.NET you open connections only long enough to perform a database operation, such as a Select or Update. You can read rows into a dataset and then work with them without staying connected to the data source. In ADO the recordset can provide disconnected access, but ADO is designed primarily for connected access. There is one significant difference between disconnected processing in ADO and ADO.NET. In ADO you communicate with the database by making calls to an OLE DB provider. In ADO.NET you communicate with the database through a data adapter (an OleDbDataAdapter, SqlDataAdapter, OdbcDataAdapter, or OracleDataAdapter object), which makes calls to an OLE DB provider or the APIs provided by the underlying data source. The important difference is that in ADO.NET the data adapter allows you to control how the changes to the dataset are transmitted to the database — by optimizing for performance, performing data validation checks, or adding any other extra processing. Data adapters, data connections, data commands, and data readers are the components that make up a .NET Framework data provider. Microsoft and third-party providers can make available other .NET Framework data providers that can be integrated into Visual Studio.
    • Sharing Data Between Applications. Transmitting an ADO.NET dataset between applications is much easier than transmitting an ADO disconnected recordset. To transmit an ADO disconnected recordset from one component to another, you use COM marshalling. To transmit data in ADO.NET, you use a dataset, which can transmit an XML stream.
    • Richer data types.COM marshalling provides a limited set of data types — those defined by the COM standard. Because the transmission of datasets in ADO.NET is based on an XML format, there is no restriction on data types. Thus, the components sharing the dataset can use whatever rich set of data types they would ordinarily use.
    • Performance. Transmitting a large ADO recordset or a large ADO.NET dataset can consume network resources; as the amount of data grows, the stress placed on the network also rises. Both ADO and ADO.NET let you minimize which data is transmitted. But ADO.NET offers another performance advantage, in that ADO.NET does not require data-type conversions. ADO, which requires COM marshalling to transmit records sets among components, does require that ADO data types be converted to COM data types.
    • Penetrating Firewalls.A firewall can interfere with two components trying to transmit disconnected ADO recordsets. Remember, firewalls are typically configured to allow HTML text to pass, but to prevent system-level requests (such as COM marshalling) from passing.
  9. Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines? The Application_Start event is guaranteed to occur only once throughout the lifetime of the application. It’s a good place to initialize global variables. For example, you might want to retrieve a list of products from a database table and place the list in application state or the Cache object. SessionStateModule exposes both Session_Start and Session_End events.
  10. If I’m developing an application that must accomodate multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?
  11. What are ASP.NET Web Forms? How is this technology different than what is available though ASP? Web Forms are the heart and soul of ASP.NET. Web Forms are the User Interface (UI) elements that give your Web applications their look and feel. Web Forms are similar to Windows Forms in that they provide properties, methods, and events for the controls that are placed onto them. However, these UI elements render themselves in the appropriate markup language required by the request, e.g. HTML. If you use Microsoft Visual Studio .NET, you will also get the familiar drag-and-drop interface used to create your UI for your Web application.
  12. How does VB.NET/C# achieve polymorphism? By using Abstract classes/functions.
  13. Can you explain what inheritance is and an example of when you might use it? Inheritance is a fundamental feature of an object oriented system and it is simply the ability to inherit data and functionality from a parent object. Rather than developing new objects from scratch, new code can be based on the work of other programmers, adding only new features that are needed.
  14. How would you implement inheritance using VB.NET/C#? When we set out to implement a class using inheritance, we must first start with an existing class from which we will derive our new subclass. This existing class, or base class, may be part of the .NET system class library framework, it may be part of some other application or .NET assembly, or we may create it as part of our existing application. Once we have a base class, we can then implement one or more subclasses based on that base class. Each of our subclasses will automatically have all of the methods, properties, and events of that base class ? including the implementation behind each method, property, and event. Our subclass can add new methods, properties, and events of its own - extending the original interface with new functionality. Additionally, a subclass can replace the methods and properties of the base class with its own new implementation - effectively overriding the original behavior and replacing it with new behaviors. Essentially inheritance is a way of merging functionality from an existing class into our new subclass. Inheritance also defines rules for how these methods, properties, and events can be merged.

Windows Server 2003 Active Directory and Security questions

  1. What’s the difference between local, global and universal groups? Domain local groups assign access permissions to global domain groups for local domain resources. Global groups provide access to resources in other trusted domains. Universal groups grant access to resources in all trusted domains.
  2. I am trying to create a new universal user group. Why can’t I? Universal groups are allowed only in native-mode Windows Server 2003 environments. Native mode requires that all domain controllers be promoted to Windows Server 2003 Active Directory.
  3. What is LSDOU? It’s group policy inheritance model, where the policies are applied to Local machines, Sites, Domains and Organizational Units.
  4. Why doesn’t LSDOU work under Windows NT? If the NTConfig.pol file exist, it has the highest priority among the numerous policies.
  5. Where are group policies stored? %SystemRoot%System32\GroupPolicy
  6. What is GPT and GPC? Group policy template and group policy container.
  7. Where is GPT stored? %SystemRoot%\SYSVOL\sysvol\domainname\Policies\GUID
  8. You change the group policies, and now the computer and user settings are in conflict. Which one has the highest priority? The computer settings take priority.
  9. You want to set up remote installation procedure, but do not want the user to gain access over it. What do you do? gponame–> User Configuration–> Windows Settings–> Remote Installation Services–> Choice Options is your friend.
  10. What’s contained in administrative template conf.adm? Microsoft NetMeeting policies
  11. How can you restrict running certain applications on a machine? Via group policy, security settings for the group, then Software Restriction Policies.
  12. You need to automatically install an app, but MSI file is not available. What do you do? A .zap text file can be used to add applications using the Software Installer, rather than the Windows Installer.
  13. What’s the difference between Software Installer and Windows Installer? The former has fewer privileges and will probably require user intervention. Plus, it uses .zap files.
  14. What can be restricted on Windows Server 2003 that wasn’t there in previous products? Group Policy in Windows Server 2003 determines a users right to modify network and dial-up TCP/IP properties. Users may be selectively restricted from modifying their IP address and other network configuration parameters.
  15. How frequently is the client policy refreshed? 90 minutes give or take.
  16. Where is secedit? It’s now gpupdate.
  17. You want to create a new group policy but do not wish to inherit. Make sure you check Block inheritance among the options when creating the policy.
  18. What is "tattooing" the Registry? The user can view and modify user preferences that are not stored in maintained portions of the Registry. If the group policy is removed or changed, the user preference will persist in the Registry.
  19. How do you fight tattooing in NT/2000 installations? You can’t.
  20. How do you fight tattooing in 2003 installations? User Configuration - Administrative Templates - System - Group Policy - enable - Enforce Show Policies Only.
  21. What does IntelliMirror do? It helps to reconcile desktop settings, applications, and stored files for users, particularly those who move between workstations or those who must periodically work offline.
  22. What’s the major difference between FAT and NTFS on a local machine? FAT and FAT32 provide no security over locally logged-on users. Only native NTFS provides extensive permission control on both remote and local files.
  23. How do FAT and NTFS differ in approach to user shares? They don’t, both have support for sharing.
  24. Explan the List Folder Contents permission on the folder in NTFS. Same as Read & Execute, but not inherited by files within a folder. However, newly created subfolders will inherit this permission.
  25. I have a file to which the user has access, but he has no folder permission to read it. Can he access it? It is possible for a user to navigate to a file for which he does not have folder permission. This involves simply knowing the path of the file object. Even if the user can’t drill down the file/folder tree using My Computer, he can still gain access to the file using the Universal Naming Convention (UNC). The best way to start would be to type the full path of a file into Run… window.
  26. For a user in several groups, are Allow permissions restrictive or permissive? Permissive, if at least one group has Allow permission for the file/folder, user will have the same permission.
  27. For a user in several groups, are Deny permissions restrictive or permissive? Restrictive, if at least one group has Deny permission for the file/folder, user will be denied access, regardless of other group permissions.
  28. What hidden shares exist on Windows Server 2003 installation? Admin$, Drive$, IPC$, NETLOGON, print$ and SYSVOL.
  29. What’s the difference between standalone and fault-tolerant DFS (Distributed File System) installations? The standalone server stores the Dfs directory tree structure or topology locally. Thus, if a shared folder is inaccessible or if the Dfs root server is down, users are left with no link to the shared resources. A fault-tolerant root node stores the Dfs topology in the Active Directory, which is replicated to other domain controllers. Thus, redundant root nodes may include multiple connections to the same data residing in different shared folders.
  30. We’re using the DFS fault-tolerant installation, but cannot access it from a Win98 box. Use the UNC path, not client, only 2000 and 2003 clients can access Server 2003 fault-tolerant shares.
  31. Where exactly do fault-tolerant DFS shares store information in Active Directory? In Partition Knowledge Table, which is then replicated to other domain controllers.
  32. Can you use Start->Search with DFS shares? Yes.
  33. What problems can you have with DFS installed? Two users opening the redundant copies of the file at the same time, with no file-locking involved in DFS, changing the contents and then saving. Only one file will be propagated through DFS.
  34. I run Microsoft Cluster Server and cannot install fault-tolerant DFS. Yeah, you can’t. Install a standalone one.
  35. Is Kerberos encryption symmetric or asymmetric? Symmetric.
  36. How does Windows 2003 Server try to prevent a middle-man attack on encrypted line? Time stamp is attached to the initial client request, encrypted with the shared key.
  37. What hashing algorithms are used in Windows 2003 Server? RSA Data Security’s Message Digest 5 (MD5), produces a 128-bit hash, and the Secure Hash Algorithm 1 (SHA-1), produces a 160-bit hash.
  38. What third-party certificate exchange protocols are used by Windows 2003 Server? Windows Server 2003 uses the industry standard PKCS-10 certificate request and PKCS-7 certificate response to exchange CA certificates with third-party certificate authorities.
  39. What’s the number of permitted unsuccessful logons on Administrator account? Unlimited. Remember, though, that it’s the Administrator account, not any account that’s part of the Administrators group.
  40. If hashing is one-way function and Windows Server uses hashing for storing passwords, how is it possible to attack the password lists, specifically the ones using NTLMv1? A cracker would launch a dictionary attack by hashing every imaginable term used for password and then compare the hashes.
  41. What’s the difference between guest accounts in Server 2003 and other editions? More restrictive in Windows Server 2003.
  42. How many passwords by default are remembered when you check "Enforce Password History Remembered"? User’s last 6 passwords.

Windows Server 2003 interview and certification questions

  1. How do you double-boot a Win 2003 server box? The Boot.ini file is set as read-only, system, and hidden to prevent unwanted editing. To change the Boot.ini timeout and default settings, use the System option in Control Panel from the Advanced tab and select Startup.
  2. What do you do if earlier application doesn’t run on Windows Server 2003? When an application that ran on an earlier legacy version of Windows cannot be loaded during the setup function or if it later malfunctions, you must run the compatibility mode function. This is accomplished by right-clicking the application or setup program and selecting Properties –> Compatibility –> selecting the previously supported operating system.
  3. If you uninstall Windows Server 2003, which operating systems can you revert to? Win ME, Win 98, 2000, XP. Note, however, that you cannot upgrade from ME and 98 to Windows Server 2003.
  4. How do you get to Internet Firewall settings? Start –> Control Panel –> Network and Internet Connections –> Network Connections.
  5. What are the Windows Server 2003 keyboard shortcuts? Winkey opens or closes the Start menu. Winkey + BREAK displays the System Properties dialog box. Winkey + TAB moves the focus to the next application in the taskbar. Winkey + SHIFT + TAB moves the focus to the previous application in the taskbar. Winkey + B moves the focus to the notification area. Winkey + D shows the desktop. Winkey + E opens Windows Explorer showing My Computer. Winkey + F opens the Search panel. Winkey + CTRL + F opens the Search panel with Search for Computers module selected. Winkey + F1 opens Help. Winkey + M minimizes all. Winkey + SHIFT+ M undoes minimization. Winkey + R opens Run dialog. Winkey + U opens the Utility Manager. Winkey + L locks the computer.
  6. What is Active Directory? Active Directory is a network-based object store and service that locates and manages resources, and makes these resources available to authorized users and groups. An underlying principle of the Active Directory is that everything is considered an object—people, servers, workstations, printers, documents, and devices. Each object has certain attributes and its own security access control list (ACL).
  7. Where are the Windows NT Primary Domain Controller (PDC) and its Backup Domain Controller (BDC) in Server 2003? The Active Directory replaces them. Now all domain controllers share a multimaster peer-to-peer read and write relationship that hosts copies of the Active Directory.
  8. How long does it take for security changes to be replicated among the domain controllers? Security-related modifications are replicated within a site immediately. These changes include account and individual user lockout policies, changes to password policies, changes to computer account passwords, and modifications to the Local Security Authority (LSA).
  9. What’s new in Windows Server 2003 regarding the DNS management? When DC promotion occurs with an existing forest, the Active Directory Installation Wizard contacts an existing DC to update the directory and replicate from the DC the required portions of the directory. If the wizard fails to locate a DC, it performs debugging and reports what caused the failure and how to fix the problem. In order to be located on a network, every DC must register in DNS DC locator DNS records. The Active Directory Installation Wizard verifies a proper configuration of the DNS infrastructure. All DNS configuration debugging and reporting activity is done with the Active Directory Installation Wizard.
  10. When should you create a forest? Organizations that operate on radically different bases may require separate trees with distinct namespaces. Unique trade or brand names often give rise to separate DNS identities. Organizations merge or are acquired and naming continuity is desired. Organizations form partnerships and joint ventures. While access to common resources is desired, a separately defined tree can enforce more direct administrative and security restrictions.
  11. How can you authenticate between forests? Four types of authentication are used across forests: (1) Kerberos and NTLM network logon for remote access to a server in another forest; (2) Kerberos and NTLM interactive logon for physical logon outside the user’s home forest; (3) Kerberos delegation to N-tier application in another forest; and (4) user principal name (UPN) credentials.
  12. What snap-in administrative tools are available for Active Directory? Active Directory Domains and Trusts Manager, Active Directory Sites and Services Manager, Active Directory Users and Group Manager, Active Directory Replication (optional, available from the Resource Kit), Active Directory Schema Manager (optional, available from adminpak)
  13. What types of classes exist in Windows Server 2003 Active Directory?
    • Structural class. The structural class is important to the system administrator in that it is the only type from which new Active Directory objects are created. Structural classes are developed from either the modification of an existing structural type or the use of one or more abstract classes.
    • Abstract class. Abstract classes are so named because they take the form of templates that actually create other templates (abstracts) and structural and auxiliary classes. Think of abstract classes as frameworks for the defining objects.
    • Auxiliary class. The auxiliary class is a list of attributes. Rather than apply numerous attributes when creating a structural class, it provides a streamlined alternative by applying a combination of attributes with a single include action.
    • 88 class. The 88 class includes object classes defined prior to 1993, when the 1988 X.500 specification was adopted. This type does not use the structural, abstract, and auxiliary definitions, nor is it in common use for the development of objects in Windows Server 2003 environments.
  14. How do you delete a lingering object? Windows Server 2003 provides a command called Repadmin that provides the ability to delete lingering objects in the Active Directory.
  15. What is Global Catalog? The Global Catalog authenticates network user logons and fields inquiries about objects across a forest or tree. Every domain has at least one GC that is hosted on a domain controller. In Windows 2000, there was typically one GC on every site in order to prevent user logon failures across the network.
  16. How is user account security established in Windows Server 2003? When an account is created, it is given a unique access number known as a security identifier (SID). Every group to which the user belongs has an associated SID. The user and related group SIDs together form the user account’s security token, which determines access levels to objects throughout the system and network. SIDs from the security token are mapped to the access control list (ACL) of any object the user attempts to access.
  17. If I delete a user and then create a new account with the same username and password, would the SID and permissions stay the same? No. If you delete a user account and attempt to recreate it with the same user name and password, the SID will be different.
  18. What do you do with secure sign-ons in an organization with many roaming users? Credential Management feature of Windows Server 2003 provides a consistent single sign-on experience for users. This can be useful for roaming users who move between computer systems. The Credential Management feature provides a secure store of user credentials that includes passwords and X.509 certificates.
  19. Anything special you should do when adding a user that has a Mac? "Save password as encrypted clear text" must be selected on User Properties Account Tab Options, since the Macs only store their passwords that way.
  20. What remote access options does Windows Server 2003 support? Dial-in, VPN, dial-in with callback.
  21. Where are the documents and settings for the roaming profile stored? All the documents and environmental settings for the roaming user are stored locally on the system, and, when the user logs off, all changes to the locally stored profile are copied to the shared server folder. Therefore, the first time a roaming user logs on to a new system the logon process may take some time, depending on how large his profile folder is.
  22. Where are the settings for all the users stored on a given machine? \Document and Settings\All Users
  23. What languages can you use for log-on scripts? JavaScipt, VBScript, DOS batch files (.com, .bat, or even .exe)

Windows Server 2003 IIS and Scripting interview questions

  1. What is presentation layer responsible for in the OSI model? The presentation layer establishes the data format prior to passing it along to the network application’s interface. TCP/IP networks perform this task at the application layer.
  2. Does Windows Server 2003 support IPv6? Yes, run ipv6.exe from command line to disable it.
  3. Can Windows Server 2003 function as a bridge? Yes, and it’s a new feature for the 2003 product. You can combine several networks and devices connected via several adapters by enabling IP routing.
  4. What’s the difference between the basic disk and dynamic disk? The basic type contains partitions, extended partitions, logical drivers, and an assortment of static volumes; the dynamic type does not use partitions but dynamically manages volumes and provides advanced storage options
  5. What’s a media pool? It is any compilation of disks or tapes with the same administrative properties.
  6. How do you install recovery console? C:\i386\win32 /cmdcons, assuming that your Win server installation is on drive C.
  7. What’s new in Terminal Services for Windows 2003 Server? Supports audio transmissions as well, although prepare for heavy network load.
  8. What scripts ship with IIS 6.0? iisweb.vsb to create, delete, start, stop, and list Web sites, iisftp.vsb to create, delete, start, stop, and list FTP sites, iisdir.vsb to create, delete, start, stop, and display virtual directories, iisftpdr.vsb to create, delete, start, stop, and display virtual directories under an FTP root, iiscnfg.vbs to export and import IIS configuration to an XML file.
  9. What’s the name of the user who connects to the Web site anonymously? IUSR_computername
  10. What secure authentication and encryption mechanisms are supported by IIS 6.0? Basic authentication, Digest authentication, Advanced digest authentication, Certificate-based Web transactions that use PKCS #7/PKCS #10, Fortezza, SSL, Server-Gated Cryptography, Transport Layer Security
  11. What’s the relation between SSL and TLS? Transport Layer Security (TLS) extends SSL by providing cryptographic authentication.
  12. What’s the role of http.sys in IIS? It is the point of contact for all incoming HTTP requests. It listens for requests and queues them until they are all processed, no more queues are available, or the Web server is shut down.
  13. Where’s ASP cache located on IIS 6.0? On disk, as opposed to memory, as it used to be in IIS 5.
  14. What is socket pooling? Non-blocking socket usage, introduced in IIS 6.0. More than one application can use a given socket.
  15. Describe the process of clustering with Windows 2003 Server when a new node is added. As a node goes online, it searches for other nodes to join by polling the designated internal network. In this way, all nodes are notified of the new node’s existence. If other nodes cannot be found on a preexisting cluster, the new node takes control of the quorum resources residing on the shared disk that contains state and configuration data.
  16. What applications are not capable of performing in Windows 2003 Server clusters? The ones written exclusively for NetBEUI and IPX.
  17. What’s a heartbeat? Communication processes between the nodes designed to ensure node’s health.
  18. What’s a threshold in clustered environment? The number of times a restart is attempted, when the node fails.
  19. You need to change and admin password on a clustered Windows box, but that requires rebooting the cluster, doesn’t it? No, it doesn’t. In 2003 environment you can do that via cluster.exe utility which does not require rebooting the entire cluster.
  20. For the document of size 1 MB, what size would you expect the index to be with Indexing Service? 150-300 KB, 15-30% is a reasonable expectation.
  21. Doesn’t the Indexing Service introduce a security flaw when allowing access to the index? No, because users can only view the indices of documents and folders that they have permissions for.
  22. What’s the typical size of the index? Less then 100K documents - up to 128 MB. More than that - 256+ MB.
  23. Which characters should be enclosed in quotes when searching the index? &, @, $, #, ^, ( ), and |.
  24. How would you search for C++? Just enter C++, since + is not a special character (and neither is C).
  25. What about Barnes&Noble? Should be searched for as Barnes’&’Noble.
  26. Are the searches case-sensitive? No.
  27. What’s the order of precedence of Boolean operators in Microsoft Windows 2003 Server Indexing Service? NOT, AND, NEAR, OR.
  28. What’s a vector space query? A multiple-word query where the weight can be assigned to each of the search words. For example, if you want to fight information on ‘black hole’, but would prefer to give more weight to the word hole, you can enter black[1] hole[20] into the search window.
  29. What’s a response queue? It’s the message queue that holds response messages sent from the receiving application to the sender.
  30. What’s MQPing used for? Testing Microsoft Message Queue services between the nodes on a network.
  31. Which add-on package for Windows 2003 Server would you use to monitor the installed software and license compliance? SMS (System Management Server).
  32. Which service do you use to set up various alerts? MOM (Microsoft Operations Manager).
  33. What languages does Windows Scripting Host support? VB, VBScript, JScript.

Microsoft interview questions 12

The three types of DAO Dynaset,Snapshot,Table
2. Why do we use Option Explicit
3. Difference between Dim Object as object AND dim obj as myform
4. How do we make a poperty read only? Private Property Get(Read Only )
5. How do you declare an object in VBscript? Dim object
6. What is the equivalent of VBScript’s On Error In Jscript ??
7. How many data types are supported in Vbscript
8. MFC
9. Java
10. Active Server Pages
11. What are session variables??
12. In what languages in ASP written.
13. How do you create Virtual Root in IIS
14. How do you remotely administer MS IIS??
15. What is the key advantage of Windows NT Challenge/Response security?
16. What problems do the vendors of ODBC Technology face with ASP/ADO ?
18. How do you administer Connection Pooling in IIS 3.0
19. How do you administer Connection Pooling in IIS 4.0
20. What are the three Ado objects?? –Connection,command, recordset
21. Two Methods of retrieving SQL
22. How do you assign Construct the where clause without concatenating Field,
value pairs??
23. What cursor type do you use to retrieve multiple recordsets?
24. What action do you have to perform before retrieving data from the next
result set of a stored procedure ??
25. What are The three tags of a form tag in HTML form
26. What are The two tags for framesets
27. How do you create Drop Down Combos in HTML ? select Tag
28. In DHTML what is the difference between FontSize and Font Size ??
A: FontSize is a property, Font Size is a style
29. What is the tag Code Base and why do we use it?
30. How can you have different number of cells for each row of a table?

three file types in NT ? NTFS,Macintosh(HPFS), FAT
32. Describe a two tier Windows NT Domain?
33. Define and explain COM
34. What is IUnknown and what are its three parts??

35. Define Query Interface,Adref,Release
36. Do COM keep track of all the object references(Accounting)??
37. What is Marshalling
38. When is Marshalling not necessary??

Microsoft Windows programming interview questions

  1. Which controls can not be placed in MDI ?
  2. List out controls which does not have events
  3. Which property of textbox cannot be changed at runtime. What is the max size of textbox?
  4. How many system controls are available
  5. ___,_____ and ____ container objects.
  6. strech___ Property is to compress a image in image control.
  7. ___,___ and __ are difference between image and picture controls.
  8. Is it possible to set a shortcut key for label.
  9. What is the default property of data control?
  10. ___,__,___ are the type of combo box?
  11. __ no of controls in form.
  12. OLE is used for _______
  13. What is the need of tabindex property is label control.
  14. ___ is the control used to call a windows application.
  15. Clear property is available in ____,___ control.
  16. ___ Property is used to count no. of items in a combobox.
  17. ___ is a property to resize a label control according to your caption.
  18. Which controls have refresh method.
  19. ___ property is used to change to ___ value to access a identity column in datacontrols.
  20. _____ is the property to ___,____,____ are valid for recordsource property of dat control.
  21. To find the current record position in data control.
  22. Timer control contains ________ no. of events.
  23. ____ property is used to lock a textbox to enter data.
  24. What is the need of z-order method?
  25. ____ is the difference between Listindex and Tab index.
  26. ____ property of menu cannot be set at run time.
  27. Can you create a tabletype of recordset in Jet - connected ODBC dbengine.
  28. Difference between listbox and combo box.
  29. What are the new events in textbox that has been included in VB
  30. 0
  31. Can you create a Updatecascade, Deletecascade relation in Ms- Access? If no, give on eample.
  32. _____ collection in recordset used to assign a value from textbox to table columns without making abinding in datacontrol.
  33. ____ argument can be used to make a menu item into bold.
  34. What is the difference between Msgbox Statement and MsgboxQ function?
  35. What is.the difference between queryunload and unload in form?
  36. ___,___ arguments will be used to run a executable program in shell function
  37. ___ property used to add a menus at runtime.
  38. What is the difference between modal and module-less window?
  39. ___ VB constant make the menu item in centre.
  40. ___ method used to move a recordset pointer in nth position in DAG.
  41. To validate a range of values for a property whenever the property values changes,which type of property procedure you use?
  42. What are 3 main differences between flexgrid control and dbgrid control?
  43. What is the difference between change event in normal combobox and dbcombobox?
  44. To populate a single column value which dbcontrols you to use?
  45. What is ODBC?
  46. Parts of ODBC?
  47. What is DSN?
  48. What is DAO?
  49. Types of cursors in DAO?
  50. Types of LockEdits in DAO? 51 .Types of Recordsets.
  51. Difference between Tabletype and Snapshot?
  52. Draw Sequence Modal of DAO? Explain.
  53. Difference between Dynaset and Snapshot?
  54. Difference between Recordset and Querydef?
  55. What is the use of Tabledef?
  56. Default cursor Type and LockEdit type in DAO?
  57. What is the default workspace?
  58. 1s it posible to Create Tables Through Querydef?
  59. It is possible to access Text (x.txt) files? Explain.
  60. What is ODBC Direct and Microsoft Jet Database Engine ?
  61. Is it possible to Manipulate data through flexgrid? Explain.
  62. Types of DBCombo boxes
  63. What do you mean by Databound Controls? Explain.
  64. What is RDO?
  65. Types of cursors in RDO.
  66. Types of LockEdits in RDO.
  67. Types of LockEdits in RDO.
  68. Types of Resultsets.
  69. Difference between Recordset and Resultsets.
  70. Explain Default cursor Type and LockEdits type in RDO
  71. Draw Sequence Modal of RDO? Explain.
  72. What is meant by Establish Connection in RDO?
  73. Is it possible to Access BackEnd procedures? Explain.
  74. What is OLE? Explain.
  75. What is DDE?
  76. Difference between Linked Object and Embedded Object?
  77. Explain OLE Drag and Drop.
  78. Difference between DDE and OLE.
  79. What is the difference between Object and Class?
  80. Give brief description about class?
  81. Does VB support object-oriented concepts? Explain..
  82. Difference between Class Module and Standard Module?
  83. Explain Get, Let, Set Properties.
  84. Difference Types of Procedures in VB?
  85. What is the use of NEW Keyword? Explain.
  86. What is constructors and distructors.
  87. Types of Modal windows in VB.
  88. What is ActiveX? Explain.
  89. Types of ActiveX Components in VB?
  90. Difference between ActiveX Control and Standard Control.
  91. Difference between ActiveX Exe and Dll.
  92. What is instantiating?
  93. Advantage of ActiveX Dll over Active Exe.
  94. Difference Types of Instancing Property in ActiveX Dll and Exe.
  95. What is ActiveX Dll and ActiveX Exe?
  96. Write the steps in Creating ActiveX Dll and Active Exe?
  97. Explain the differences between ActiveX Dll and ActiveX Exe?
  98. How would you use ActiveX Dll and ActiveX Exe in your application?
  99. How would you access objects created in ActiveX Exe and ActiveX D1T
  100. What is the use of ActiveX Documents?
  101. What is ActiveX Document?
  102. What is the use of Visual Basic Document file?
  103. What is hyperlink?
  104. How would you create Visual basic Document file?
  105. What is Internet Explorer and its uses?
  106. How would you navigate between one document to another document in Internet Explorer ?
  107. How would you run your ActiveX Document Dll?
  108. How would you view html code in Active Server Pages?
  109. How would you cre.ate your application in DHTML?
  110. What is ActiveX Control?
  111. Write the Steps in Creating an ActiveX Control?
  112. How would you attach an ActiveX control in Your Application?
  113. How would you create properties in ActiveX Control?
  114. What is the-use of property page Wizard in ActiveX Control?
  115. How would you add elements in TreevieW Control.
  116. What are the types of line styles available in Treeview Control?
  117. What is the use of Imagelist Controls
  118. How would you attach pictures in Treeview Control?
  119. What are the uses of List View Control?
  120. Explain the types of Views in Listview Control.
  121. How would you attach pictures in column headers of List View Control?
  122. How would you add column headers in listview control?
  123. How would you add elements and pictures to listitems in listview control?
  124. How would you activate animation control?
  125. What is the use of progress Bar Control?
  126. How would you find out the value property in Slider Bar Control?
  127. What is the use of Data Form Wizard?
  128. How would you map properties to controls by using ActiveX Control Interface Wizard?
  129. How would you convert a form into document?
  130. How would you Create a Query Builder and Explain its uses
  131. How would you create properties by using class Builder Wizard?
  132. HTML stands for What? Use of HTML ?
  133. Whether HTML supports multimedia: and document links?
  134. DHTML Is used for what?
  135. What do you mean by HTTP?
  136. What is the use of Hyperlink control for DHTML applications?
  137. How can you Navigate from the DHTML application to another DHTML application? .
  138. What are the Internet tools available in VB
  139. 0?
  140. Explain the usage of Web Browser Control?
  141. What do you mean by ADO?
  142. What is the difference Between ADO and other data access objects0
  143. What is OLEDB?
  144. What are the important components of OLEDB?
  145. Through which protocol OLEDB components are interfaced?
  146. It possible to call OLEDB’s Features directly in VB without using any control?
  147. What type of databases you can access through AD I Data Access Object?
  148. How many objects resides in ADO ?
  149. .

  150. What is the use of Connection object?
  151. What is the use of command Object?
  152. Record set object consists of what?
  153. What is the use of parameters collection?
  154. Which type of object requires this object?
  155. Is it possible to call backend procedures with ADO control?
  156. Is there any Edit method in ADO Data Access method?
  157. How can you check whether a record is valid record or Invalid record using ADO control or Object?
  158. What do you mean by provider?
  159. What type of record sets are available in ADO?
  160. Is it possible to call oracle database through ADO control or Object?
  161. How many File System Controls are there ? Explain.
  162. How can you filter out specific type of file using file system controls?
  163. How can you get selected file from file system Control?
  164. How many ways we can access file using VB?
  165. Which method is preferred to save data like database to the disk?
  166. How to get free file location in memory?
  167. How to find size of the file. Which method or function is used to occomplish this?
  168. Using which type we can access file line by line?
  169. Which method is used to write context Into file?
  170. How can you read content from file?
  171. Binary Access-method is used to access file in which manner?
  172. How can you check Beginning and End of the file?
  173. What is the use of Scalewidth and ScaleHeight Proeperty?
  174. What is the use of Active Control Property?
  175. How can you save and Get data from Clipboard/
  176. What are the types of Error?
  177. In which areas the Error occurs?
  178. What are the tools available for Debug in VB?
  179. What is the use of Immediate, Local Window?
  180. What is the use of debug Window?
  181. How can you Implement windows functionality in VB?
  182. How many types of API functions are available in VB?
  183. How can you Add API functions to your Application?
  184. How to get Cursor position using API?
  185. Is it possible to change menu runtime using API? If yes? Specify the function names.
  186. What are the types of API Types.
  187. Scope of API’s can be of types, what are they? Why API functions are Required?

Microsoft Win32 interview questions

  1. Tell the differences between Windows 95 and Windows NT? Lack of Unicode implementation for most of the functions of Win95. Different extended error codes. Different number window and menu handles. Windows 95 implements some window management features in 16 bits. Windows 95 uses 16-bit world coordinate system and the coordinates restricted to 32K. Deletion of drawing objects is different. Windows 95 does not implement print monitor DLLs of Windows NT. Differences in registry. Windows 95 does not support multiprocessor computers. NT implementation of scheduler is quite different. Different driver models. Win95 was built with back-compatibility in mind and ill-behaving 16-bit process may easily corrupt the system. Win95 starts from real DOS, while WinNT uses DOS emulation when one needs a DOS. Win95’s FAT is built over 16-bit win3.1 FAT (not FAT32!, actually, Win95’s FAT contains two FATs).
  2. What is the effective way of DIB files management? A: Memory-mapped file is the best choice for device-independent bitmaps. MMF allows to map the file to RAM/SWAP addresses and to let Windows handle all load/unload operations for the file.
  3. What should you be aware of if you design a program that runs days/weeks/months/years? A: When your program should run for a long time, you should be careful about heap allocations, because if you use new/delete intensively in your application, the memory becomes highly fragmented with a time. It is better to allocate all necessary memory in this case that many times small blocks. You should be especially careful about CString class which allocates permanent DLL
  4. What are the advantages of using DLL’s? DLLs are run-time modular. DLL is loaded when the program needs it. Used as a code sharing between executables.
  5. What are the different types of DLL’s? A: Extension, Regular and pure Win32 DLL (without MFC)
  6. What are the differences between a User DLL and an MFC Extension DLL? A: Extension DLL supports a C++ interface, i.e. can export whole C++ classes and the client may construct objects from them. Extension DLL dynamically links to MFC DLLs (those which name starts with MFC??.DLL) and to be synchronous with the version it was developed for. Extension DLL is usually small (simple extension DLL might be around 10K) Regular DLL can be loaded by any Win32 environment (e.g. VB 5) Big restriction is that regular DLL may export only C-style functions. Regular DLLs are generally larger. When you build a regular DLL, you may choose a static link (in this case MFC library code is copied to your DLL) and dynamic (in this case you would need MFC DLLs to be presented on the target machine)
  7. What do you have to do when you inherit from two CObject-based classes? A: First of all, this is a bad idea does not matter what tells you interviewer. Secondly, if you forced to use condemned rhombus structure, read Technical Note 16 in MSDN, which discusses why MFC does not support multiple inheritance and what to do in case you still need it (there are a few problems with CObject class, such as incorrect information, returned by IsKindOf() of CObject for MI, etc.)
  8. What are the additional requirements for inheritance from CWnd-based classes? A: Again, this is the bad idea. Try to find alternative solution. Anyway, if you have to multiply inherit from CWnd-based class, the following are additional requirements to the above conditions (again, this is extremely bad question for interview!!!): There must be only one CWnd-derived base class. The CWnd-derived base class must be the first (or left-most) base class.
  9. What is a "mutex"? A: Mutexes are the mechanism of process synchronization that might be used to synchronize data across multiple processes. Mutex is a waitable object while a critical section is not. Mutexes are significantly slower than critical sections.
  10. What’s the difference between a "mutex" and a "critical section"? Critical section provides synchronization means for one process only, while mutexes allow data synchronization across processes.
  11. What might be wrong with the following pseudo-code:
    FUNCTION F
    BEGIN
    INT I=2
    DO
    I = I + 1
    IF I = 4 THEN BREAK
    END DO
    END
    A:This code is not thread safe. Suppose one thread increments I to 3 and then returns to the beginning of DO statement. Then it increments I to 4 and now context switch happens. Second thread increments I to 5. From this moment the code shown will execute forever until some external force intervention. Solution is obviously using some synchronization object to protect I from being changed by more than one thread.
  12. What is a deadlock ? A: A deadlock, very simply, is a condition in which two or more threads wait for each other to release a shared resource before resuming their execution. Because all threads participating in a deadlock are suspended and cannot, therefore, release the resources they own, no thread can continue, and the entire application (or, worse, more than one application if the resources are shared between threads in multiple applications) appears to hang.
  13. How can we create thread in MFC framework? A: Using AfxBeginThread.
  14. What types of threads are supported by MFC framework? A: Working thread and windows thread. Working thread usually does not have a user interface and easier to use. Windows thread has an user interface and usually used to improve responsiveness of the user input. Message Map
  15. When ON_UPDATE_COMMAND_UI is called? (message may vary) A: When a user of your application pulls down a menu, each menu item needs to know whether it should be displayed as enabled or disabled. The target of a menu command provides this information by implementing an ON_UPDATE_COMMAND_UI handler.
  16. What is a "hook"? A: A point in the Windows message-handling mechanism where an application can install a subroutine to monitor messages. You need hooks to implement your own Windows message filter.
  17. What are the difference between MFC Exception macros and C++ exception keywords? A:Actually, MFC macros may accept exception of only CException class or class, derived from CException, where as C++ exception mechanism accepts exception of ANY type Reusable Control Class
  18. How would you set the background of an edit control to a customized color? A: You have several choices, but the simplest one is subclassing. Kruglinski in his "Inside Visual C++" describes pretty well this process. Generally, you derive the class from none control class, override the messages you want (like WM_CTLCOLOR) and then in init function like OnInitialUpdate of CDialog, subclass the control with SubclassDlgItem().
  19. What is Message Reflection? How could you accomplish the above task using message reflection? A: See Technical Note 62 of MSDN. Usually, message is handled in the parent class that means you have to override message handler for each parent. Sometimes it is nice to handle a message in the control itself, without parent invocation. Such handling mechanism is called message reflection. Control "reflects" message to itself and then processes it. Use ON__REFLECT macro to create a reflected message.
  20. What is the command routing in MFC framework? A: CView => CDocument => CFrameWnd => CWinApp
  21. What’s the purpose of CView class? CDocument class? What are relationships between them? A: The CView class provides the basic functionality for user-defined view classes. A view is attached to a document and acts as an intermediary between the document and the user: the view renders an image of the document on the screen or printer and interprets user input as operations upon the document. The CDocument class provides the basic functionality for user-defined document classes. A document represents the unit of data that the user typically opens with the File Open command and saves with the File Save command. Users interact with a document through the CView object(s) associated with it. A view is a child of a frame window. The relationship between a view class, a frame window class, and a document class is established by a CDocTemplate object. A view can be attached to only one document, but a document can have multiple views attached to it at once.
  22. What class is responsible for document template in MDI application? A: CMultiDocTemplate.
  23. What function must be used to add document template? A: AddDocTemplate.
  24. What the main objects are created for SDI and MDI applications? A: CWinApp - application object. For MDI application with New document implementation CDocTemplate, CDocument, CView, CMainFrame. If your application is SDI, your CMainFrame class is derived from class CFrameWnd. If your application is MDI, CMainFrame is derived from class CMDIFrameWnd. For MDI application CMDIChildWindow is also created.
  25. We have a loop for 800,000. It fails on 756,322. How can we get the information before it fails? A: You could think of several way to debug this: Set the condition in debugger to stop when loop is passed around 756321 times. Throw an exception within a loop (may be not the best idea since exception does not show you the exact location of the fail. Create a log file and to put detailed information within a loop.
  26. Our Debug version works fine, but Release fails. What should be done? A: There are four differences between debug and release builds:
    • heap layout (you may have heap overwrite in release mode - this will cause 90% of all problems),
    • compilation (check conditional compilation statements, assertion functions etc.),
    • pointer support (no padding in release mode which may increase chances of a pointer to point into sky)
    • optimization.

    Check the project settings.

.NET interview questions - Windows Forms


  1. I am constantly writing the drawing procedures with System.Drawing.Graphics, but having to use the try and dispose blocks is too time-consuming with Graphics objects. Can I automate this?
    Yes, the code
    System.Drawing.Graphics canvas = new System.Drawing.Graphics();
    try
    {
    //some code
    }
    finally
    canvas.Dispose();

    is functionally equivalent to

    using (System.Drawing.Graphics canvas = new System.Drawing.Graphics())
    {
    //some code
    } //canvas.Dispose() gets called automatically

  2. How do you trigger the Paint event in System.Drawing?Invalidate the current form, the OS will take care of repainting. The Update method forces the repaint.
  3. With these events, why wouldn’t Microsoft combine Invalidate and Paint, so that you wouldn’t have to tell it to repaint, and then to force it to repaint? Painting is the slowest thing the OS does, so usually telling it to repaint, but not forcing it allows for the process to take place in the background.
  4. How can you assign an RGB color to a System.Drawing.Color object? Call the static method FromArgb of this class and pass it the RGB values.
  5. What class does Icon derive from? Isn’t it just a Bitmap with a wrapper name around it? No, Icon lives in System.Drawing namespace. It’s not a Bitmap by default, and is treated separately by .NET. However, you can use ToBitmap method to get a valid Bitmap object from a valid Icon object.
  6. Before in my VB app I would just load the icons from DLL. How can I load the icons provided by .NET dynamically? By using System.Drawing.SystemIcons class, for example System.Drawing.SystemIcons.Warning produces an Icon with a warning sign in it.
  7. When displaying fonts, what’s the difference between pixels, points and ems? A pixel is the lowest-resolution dot the computer monitor supports. Its size depends on user’s settings and monitor size. A point is always 1/72 of an inch. An em is the number of pixels that it takes to display the letter M.

Windows 2000 administration questions

# Explain hidden shares. Hidden or administrative shares are share names with a dollar sign ($) appended to their names. Administrative shares are usually created automatically for the root of each drive letter. They do not display in the network browse list.
# How do the permissions work in Windows 2000? What permissions does folder inherit from the parent? When you combine NTFS permissions based on users and their group memberships, the least restrictive permissions take precedence. However, explicit Deny entries always override Allow entries.
# Why can’t I encrypt a compressed file on Windows 2000? You can either compress it or encrypt it, but not both.
# If I rename an account, what must I do to make sure the renamed account has the same permissions as the original one? Nothing, it’s all maintained automatically.
# What’s the most powerful group on a Windows system? Administrators.
# What are the accessibility features in Windows 2000? StickyKeys, FilterKeys Narrator, Magnifier, and On-Screen Keyboard.
# Why can’t I get to the Fax Service Management console? You can only see it if a fax had been installed.
# What do I need to ensure before deploying an application via a Group Policy? Make sure it’s either an MSI file, or contains a ZAP file for Group Policy.
# How do you configure mandatory profiles? Rename ntuser.dat to ntuser.man
# I can’t get multiple displays to work in Windows 2000. Multiple displays have to use peripheral connection interface (PCI) or Accelerated Graphics Port (AGP) port devices to work properly with Windows 2000.
# What’s a maximum number of processors Win2k supports? 2
# I had some NTFS volumes under my Windows NT installation. What happened to NTFS after Win 2k installation? It got upgraded to NTFS 5.
# How do you convert a drive from FAT/FAT32 to NTFS from the command line? convert c: /fs:ntfs
# Explain APIPA. Auto Private IP Addressing (APIPA) takes effect on Windows 2000 Professional computers if no DHCP server can be contacted. APIPA assigns the computer an IP address within the range of 169.254.0.0 through 169.254.255.254 with a subnet mask of 255.255.0.0.
# How does Internet Connection Sharing work on Windows 2000? Internet Connection Sharing (ICS) uses the DHCP Allocator service to assign dynamic IP addresses to clients on the LAN within the range of 192.168.0.2 through 192.168.0.254. In addition, the DNS Proxy service becomes enabled when you implement ICS.

Windows code security questions

  1. 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.
  2. 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.
  3. How can C# app request minimum permissions?

    using System.Security.Permissions;
    [assembly:FileDialogPermissionAttribute(SecurityAction.RequestMinimum, Unrestricted=true)]

  4. What’s a code group? A code group is a set of assemblies that share a security context.
  5. 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.
  6. What are the authentication modes in ASP.NET? None, Windows, Forms and Passport.
  7. Are the actual permissions for the application defined at run-time or compile-time? The CLR computes actual permissions at runtime based on code group membership and the calling chain of the code.

Microsoft software development engineer in test (SDET) interview questions

  1. How would you deal with changes being made a week or so before the ship date?
  2. How would you deal with a bug that no one wants to fix? Both the SDE and his lead have said they won’t fix it.
  3. Write a function that counts the number of primes in the range [1-N]. Write the test cases for this function.
  4. Given a MAKEFILE (yeah a makefile), design the data structure that a parser would create and then write code that iterates over that data structure
    executing commands if needed.
  5. Write a function that inserts an integer into a linked list in ascending order. Write the test cases for this function.
  6. Test the save dialog in Notepad. (This was the question I enjoyed the most).
  7. Write the InStr function. Write the test cases for this function.
  8. Write a function that will return the number of days in a month (not using System.DateTime).
  9. You have 3 jars. Each jar has a label on it: white, black, or white&black. You have 3 sets of marbles: white, black, and
    white&black. One set is stored in one jar. The labels on the jars are guaranteed to be incorrect (i.e. white will not contain white). Which jar would you choose from to give you the best chances of identifying the which set of marbles in is in which jar.
  10. Why do you want to work for Microsoft?
  11. Write the test cases for a vending machine. (Those were the questions I was asked. I had a lot of discussions about how to handle situations. Such as a tester is focused on one part of an SDK. During triage it was determined that that portion of the SDK was not on the critical path, and the tester was needed elsewhere. But the tester continued to test that portion because it is his baby. How would you get him to stop testing that portion and work on what needs to be worked on? Other situations came up like arranging tests into the different testing buckets (functional, stress, perf, etc.).)

Windows admin interview questions

  1. Describe how the DHCP lease is obtained. It’s a four-step process consisting of (a) IP request, (b) IP offer, © IP selection and (d) acknowledgement.
  2. I can’t seem to access the Internet, don’t have any access to the corporate network and on ipconfig my address is 169.254.*.*. What happened? The 169.254.*.* netmask is assigned to Windows machines running 98/2000/XP if the DHCP server is not available. The name for the technology is APIPA (Automatic Private Internet Protocol Addressing).
  3. We’ve installed a new Windows-based DHCP server, however, the users do not seem to be getting DHCP leases off of it. The server must be authorized first with the Active Directory.
  4. How can you force the client to give up the dhcp lease if you have access to the client PC? ipconfig /release
  5. What authentication options do Windows 2000 Servers have for remote clients? PAP, SPAP, CHAP, MS-CHAP and EAP.
  6. What are the networking protocol options for the Windows clients if for some reason you do not want to use TCP/IP? NWLink (Novell), NetBEUI, AppleTalk (Apple).
  7. What is data link layer in the OSI reference model responsible for? Data link layer is located above the physical layer, but below the network layer. Taking raw data bits and packaging them into frames. The network layer will be responsible for addressing the frames, while the physical layer is reponsible for retrieving and sending raw data bits.
  8. What is binding order? The order by which the network protocols are used for client-server communications. The most frequently used protocols should be at the top.
  9. How do cryptography-based keys ensure the validity of data transferred across the network? Each IP packet is assigned a checksum, so if the checksums do not match on both receiving and transmitting ends, the data was modified or corrupted.
  10. Should we deploy IPSEC-based security or certificate-based security? They are really two different technologies. IPSec secures the TCP/IP communication and protects the integrity of the packets. Certificate-based security ensures the validity of authenticated clients and servers.
  11. What is LMHOSTS file? It’s a file stored on a host machine that is used to resolve NetBIOS to specific IP addresses.
  12. What’s the difference between forward lookup and reverse lookup in DNS? Forward lookup is name-to-address, the reverse lookup is address-to-name.
  13. How can you recover a file encrypted using EFS? Use the domain recovery agent.

Solaris interview questions

  1. List the files in current directory sorted by size ? - ls -l | grep ^- | sort -nr
  2. List the hidden files in current directory ? - ls -a1 | grep "^\."
  3. Delete blank lines in a file ? - cat sample.txt | grep -v ‘^$’ > new_sample.txt
  4. Search for a sample string in particular files ? - grep “Debug” *.confHere grep uses the string “Debug” to search in all files with extension“.conf” under current directory.
  5. Display the last newly appending lines of a file during appendingdata to the same file by some processes ? - tail –f Debug.logHere tail shows the newly appended data into Debug.log by some processes/user.
  6. Display the Disk Usage of file sizes under each directory in currentDirectory ? - du -k * | sort –nr (or) du –k . | sort -nr
  7. Change to a directory, which is having very long name ? - cd CDMA_3X_GEN*Here original directory name is – “CDMA_3X_GENERATION_DATA”.
  8. Display the all files recursively with path under current directory ? - find . -depth -print
  9. Set the Display automatically for the current new user ? - export DISPLAY=`eval ‘who am i | cut -d"(" -f2 | cut -d")" -f1′`Here in above command, see single quote, double quote, grave ascent is used. Observe carefully.
  10. Display the processes, which are running under yourusername ? - ps –aef | grep MaheshvjHere, Maheshvj is the username.
  11. List some Hot Keys for bash shell ? - Ctrl+l – Clears the Screen. Ctrl+r – Does a search in previously given commands in shell. Ctrl+u - Clears the typing before the hotkey. Ctrl+a – Places cursor at the beginning of the command at shell. Ctrl+e – Places cursor at the end of the command at shell. Ctrl+d – Kills the shell. Ctrl+z – Places the currently running process into background.
  12. Display the files in the directory by file size ? - ls –ltr | sort –nr –k 5
  13. How to save man pages to a file ? - man | col –b > Example : man top | col –b > top_help.txt
  14. How to know the date & time for – when script is executed ? - Add the following script line in shell script.eval echo "Script is executed at `date`" >> timeinfo.infHere, “timeinfo.inf” contains date & time details ie., when script is executed and history related to execution.
  15. How do you find out drive statistics ? - iostat -E
  16. Display disk usage in Kilobytes ? - du -k
  17. Display top ten largest files/directories ? - du -sk * | sort -nr | head
  18. How much space is used for users in kilobytes ? - quot -af
  19. How to create null file ? - cat /dev/null > filename1
  20. Access common commands quicker ? - ps -ef | grep -i $@
  21. Display the page size of memory ? - pagesize -a
  22. Display Ethernet Address arp table ? - arp -a
  23. Display the no.of active established connections to localhost ? - netstat -a | grep EST
  24. Display the state of interfaces used for TCP/IP traffice ? - netstat -i
  25. Display the parent/child tree of a process ? - ptree Example: ptree 1267
  26. Show the working directory of a process ? - pwdx Example: pwdx 1267
  27. Display the processes current open files ? - pfiles Example: pfiles 1267
  28. Display the inter-process communication facility status ? - ipcs
  29. Display the top most process utilizing most CPU ? - top –b 1
  30. Alternative for top command ? - prstat -a

Solaris interview questions

  1. What does the pkgadd command do?
  2. How do you create a solaris package?
  3. How do you view shared memory statistics?
  4. How do you get system diagnostics information?
  5. What is OBP and how do you access it?
  6. What is LOM and how do you access it?
  7. What is VTS?
  8. What is an alternative to the “top” command on Solaris?
  9. What is /etc/system for?
  10. What does ndd do?
  11. What does init 5 do?
  12. What does init 0 do?
  13. How do you boot from CD-ROM?
  14. What is jumpstart?
  15. How do you boot from a Network with jumpstart?
  16. What is JASS?
  17. What is the difference between NFS version 2 and NFS version 3?
  18. What is RPC? Why do I need it?
  19. Are kernel parameters tunable during runtime?
  20. What does fmthard do?

Sysadmin interview questions

  1. What is a level 0 backup?
  2. What is an incremental backup?
  3. What steps are required to perform a bare-metal recovery?
  4. Name key files or directories on a UNIX system that should always be backed up.
  5. Name key files or directories on a Windows system that should always be backed up.
  6. What is RAID 0?
  7. What is RAID 0+1? Why is it better than 0?
  8. What is RAID-5?
  9. Why would you NOT want to encapsulate a root directory with Veritas?
  10. What is concatenation?
  11. What is striping?
  12. What is a spindle?

Windows Server and MS Exchange interview questions

  1. What is DHCP? How we configure DHCP?
  2. What are the ways to configure DNS & Zones?
  3. What are the types of backup? Explain each?
  4. What are Levels of RAID 0, 1, 5? Which one is better & why?
  5. What are FMSO Roles? List them.
  6. Describe the lease process of the DHCP server.
  7. Disaster Recovery Plan?
  8. What is scope & super scope?
  9. Differences between Win 2000 Server & Advanced Server?
  10. Logical Diagram of Active Directory? What is the difference between child domain & additional domain server?
  11. FTP, NNTP, SMTP, KERBEROS, DNS, DHCP, POP3 port numbers?
  12. What is Kerberos? Which version is currently used by Windows? How does Kerberos work?

Microsoft Exchange Server interview questions

  1. Distribution List?
  2. GAL, Routing Group, Stm files, Eseutil & ininteg - what are they used for?
  3. What is MIME & MAPI?
  4. List the services of Exchange Server 2000?
  5. How would you recover Exchange server when the log file is corrupted?

Windows programming interview questions

  1. What are kernel objects? - - Several types of kernel objects, such as access token objects, event objects, file objects, file-mapping objects, I/O completion port objects, job objects, mailslot objects, mutex objects, pipe objects, process objects, semaphore objects, thread objects, and waitable timer objects.
  2. What is a kernel object? - Each kernel object is simply a memory block allocated by the kernel and is accessible only by the kernel. This memory block is a data structure whose members maintain information about the object. Some members (security descriptor, usage count, and so on) are the same across all object types, but most are specific to a particular object type. For example, a process object has a process ID, a base priority, and an exit code, whereas a file object has a byte offset, a sharing mode, and an open mode.
  3. User can access these kernel objects structures? - Kernel object data structures are accessible only by the kernel
  4. If we cannot alter these Kernel Object structures directly, how do our applications manipulate these kernel objects? - The answer is that Windows offers a set of functions that manipulate these structures in well-defined ways. These kernel objects are always accessible via these functions. When you call a function that creates a kernel object, the function returns a handle that identifies the object.
  5. How owns the Kernel Object? - Kernel objects are owned by the kernel, not by a process
  6. How does the kernel object outlive the process that created it? - If your process calls a function that creates a kernel object and then your process terminates, the kernel object is not necessarily destroyed. Under most circumstances, the object will be destroyed; but if another process is using the kernel object your process created, the kernel knows not to destroy the object until the other process has stopped using it
  7. Which is the data member common to all the kernel object and what is the use of it? -
  8. The usage count is one of the data members common to all kernel object types

  9. How to identify the difference between the kernel object and user object? -
  10. The easiest way to determine whether an object is a kernel object is to examine the function that creates the object. Almost all functions that create kernel objects have a parameter that allows you to specify security attribute information.

  11. What is the purpose of Process Handle Table? -
  12. When a process is initialized, the system allocates a handle table for it. This handle table is used only for kernel objects, not for User objects or GDI objects. When a process first initializes, its handle table is empty. Then when a thread in the process calls a function that creates a kernel object, such as CreateFileMapping , the kernel allocates a block of memory for the object and initializes it; the kernel then scans the process’s handle table for an empty entry

  13. Name few functions that create Kernel Objects? - HANDLE CreateThread(…),HANDLE CreateFile(..),HANDLE CreateFileMapping(..)HANDLE CreateSemaphore(..)etcAll functions that create kernel objects return process-relative handles that can be used successfully by any and all threads that are running in the same process.
  14. What is handle? - Handle value is actually the index into the process’s handle table that identifies where the kernel object’s information is stored.
  15. How the handle helps in manipulating the kernel objects? - Whenever you call a function that accepts a kernel object handle as an argument, you pass the value returned by one of the Create* functions. Internally, the function looks in your process’s handle table to get the address of the kernel object you want to manipulate and then manipulates the object’s data structure in a well-defined fashion.
  16. What happens when the CloseHandle(handle) is called? - This function first checks the calling process’s handle table to ensure that the index (handle) passed to it identifies an object that the process does in fact have access to. If the index is valid, the system gets the address of the kernel object’s data structure and decrements the usage count member in the structure; if the count is zero, the kernel destroys the kernel object from memory.
  17. You forget to call CloseHandle - will there be a memory leak? - Well, yes and no. It is possible for a process to leak resources (such as kernel objects) while the process runs. However, when the process terminates, the operating system ensures that any and all resources used by the process are freed—this is guaranteed. For kernel objects, the system performs the following actions: When your process terminates, the system automatically scans the process’s handle table. If the table has any valid entries (objects that you didn’t close before terminating), the system closes these object handles for you. If the usage count of any of these objects goes to zero, the kernel destroys the object.
  18. What is the need of process relative handles? - The most important reason was robustness. If kernel object handles were system-wide values, one process could easily obtain the handle to an object that another process was using and wreak havoc on that process. Another reason for process-relative handles is security. Kernel objects are protected with security, and a process must request permission to manipulate an object before attempting to manipulate it. The creator of the object can prevent an unauthorized user from touching the object simply by denying access to it
  19. How the handles are handled in the child process? - The operating system creates the new child process but does not allow the child process to begin executing its code right away. Of course, the system creates a new, empty process handle table for the child process—just as it would for any new process. But because you passed TRUE to CreateProcess’s bInheritHandles parameter, the system does one more thing: it walks the parent process’s handle table, and for each entry it finds that contains a valid inheritable handle, the system copies the entry exactly into the child process’s handle table. The entry is copied to the exact same position in the child process’s handle table as in the parent’s handle table.
  20. Why the entries in the parent process table and child table are same? - It means that the handle value that identifies a kernel object is identical in both the parent and the child processes.
  21. What about the usage count in the parent child process tables? - The system increments the usage count of the kernel object because two processes are now using the object. For the kernel object to be destroyed, both the parent process and the child process must either call CloseHandle on the object or terminate.
  22. What are Named Objects? - Method available for sharing kernel objects across process boundaries is to name the objects. Below are the kernel named objects 1) mutex, 2) Events, 3) semaphore, 4) waitableTimers, 5)file mapping, 6)job object. There are APIs to create these objects with last parameter as the object name.
  23. What do you mean by unnamed object? - When you are creating the kernel objects with the help of API’s like CreateMutex(, , , ,pzname). And the Pzname parameter is NULL , you are indicating to the system that you want to create an unnamed (anonymous) kernel object. When you create an unnamed object, you can share the object across processes by using either inheritance or DuplicateHandle
  24. What is DuplicateHandle (API)? - Takes an entry in one process’s handle table and makes a copy of the entry into another process’s handle table
  25. What is a thread? - A thread describes a path of execution within a process. Every time a process is initialized, the system creates a primary thread. This thread begins executing with the C/C++ run-time library’s startup code, which in turn calls your entry-point function ( main , Wmain , WinMain , or WWinMain ) and continues executing until the entry-point function returns and the C/C++ run-time library’s startup code calls ExitProcess
  26. What is the limit on per process for creating a thread? - The number of threads a process can create is limited by the available virtual memory and depends on the default stack size
  27. What is Synchronization Objects? - Synchronization object s are use to co-ordinate the execution of multiple threads.
  28. Which kernel objects are use for Thread Synchronization on different processes? - Event, Mutex, Semaphore
  29. What is Event Object and why it is used? - Event is the thread synchronization object to set signaled state or non-signaled state.
  30. What is signaled and non signaled state? - An event is in signaled state means that it has the capacity to release the threads waiting for this event to be signaled. An event is in non signaled state means that it will not release any thread that is waiting for this particular event.example in our project: when user clicks the image application icon double simultaneously. Two image application windows were created. so PAIG created an event and set it to non-signaled state. Then the image application will reset the event to signaled state, after this all the threads are released.
  31. APIs for creating event and set and reset the events - CreateEvent-to create the event OpenEvent – to open already created event SetEvent – to set the event signaled stateRestEvent - To set the Event To non-Signaled State
  32. What is Mutex Object and why it is used? - A mutex object is a synchronization object whose state is set to signaled when it is not owned by any thread, and non-signaled when it is owned. For example, to prevent two threads from writing to shared memory at the same time, each thread waits for ownership of a mutex object before executing the code that accesses the memory. After writing to the shared memory, the thread releases the mutex object.
  33. How do I create a Mutex? - A thread uses the CreateMutex function to create a mutex object. The creating thread can request immediate ownership of the mutex object and can also specify a name for the mutex object
  34. How do other threads own the mutex? - Threads in other processes can open a handle to an existing named mutex object by specifying its name in a call to theOpenMutex - function. Any thread with a handle to a mutex object can use one of the wait functions to request ownership of the mutex object. If the mutex object is owned by another thread, the wait function blocks the requesting thread until the owning thread releases the mutex object using theReleaseMutex - function.
  35. What is semaphores and why it is used? - A semaphore object is a synchronization object that maintains a count between zero and a specified maximum value. The count is decremented each time a thread completes a wait for the semaphore object and incremented each time a thread releases the semaphore. When the count reaches zero, no more threads can successfully wait for the semaphore object state to become signaled. The state of a semaphore is set to signaled when its count is greater than zero, and non-signaled when its count is zero. The semaphore object is useful in controlling a shared resource that can support a limited number of users. It acts as a gate that limits the number of threads sharing the resource to a specified maximum number. For example, an application might place a limit on the number of windows that it creates. It uses a semaphore with a maximum count equal to the window limit, decrementing the count whenever a window is created and incrementing it whenever a window is closed. The application specifies the semaphore object in call to one of the wait functions before each window is created. When the count is zero - indicating that the window limit has been reached - the wait function blocks execution of the window-creation code.

Microsoft college recruitment questions

  1. How did you first get interested in Computer Science?
  2. What do you like to do best related to computers now (programming, administration, testing, manage projects, etc)? What is it about that area that you specifically enjoy?
  3. What is your strongest programming language (Java, ASP, C, C++, VB, HTML,C#, etc.)?
  4. When is the last time you coded in C/C++? What is the most lines of original C/C++ code you have personally written in one project? How confident are you in your ability to write C or C++ without a reference?
  5. How do you test your code?
  6. Are there particular areas of technology you’re interested in, or specific products you would want to work on at Microsoft?
  7. Describe your ideal job.
  8. Given a simple program designed to take inputs of integers from 1-1000 and to output the factorial value of that number, how would you test this program? You do not have access to the code. Please be as specific as possible.
  9. Is there anyone else in your set of peers or friends who you would like to recommend as a great candidate for Software Development positions at Microsoft? If so, please list their name and email address below.
  10. What is your expected date of graduation if you are still in school? If you have already graduated, what was your graduation date?

OS interview questions

  1. What is MUTEX ?
  2. What isthe difference between a ‘thread’ and a ‘process’?
  3. What is INODE?
  4. Explain the working of Virtual Memory.
  5. How does Windows NT supports Multitasking?
  6. Explain the Unix Kernel.
  7. What is Concurrency? Expain with example Deadlock and Starvation.
  8. What are your solution strategies for “Dining Philosophers Problem” ?
  9. Explain Memory Partitioning, Paging, Segmentation.
  10. Explain Scheduling.
  11. Operating System Security.
  12. What is Semaphore?
  13. Explain the following file systems : NTFS, Macintosh(HPFS), FAT .
  14. What are the different process states?
  15. What is Marshalling?
  16. Define and explain COM?
  17. What is Marshalling?
  18. Difference - Loading and Linking ?

.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?