What is Active Directory? What is the namespace used to access the Microsoft Active Directories? What are ADSI Directories?
Active Directory Service Interfaces (ADSI) is a programmatic interface for Microsoft Windows Active Directory. It enables your applications to interact with diverse directories on a network, using a single interface. Visual Studio .NET and the .NET Framework make it easy to add ADSI functionality with the DirectoryEntry and DirectorySearcher components.Using ADSI, you can create applications that perform common administrative tasks, such as backing up databases, accessing printers, and administering user accounts. ADSI makes it possible for you to:
1. Log on once to work with diverse directories. The DirectoryEntry component class provides username and password properties that can be entered at runtime and communicated to the Active Directory object you are binding to.
2. Use a single application programming interface (API) to perform tasks on multiple directory systems by offering the user a variety of protocols to use. The DirectoryServices namespace provides the classes to perform most administrative functions.
3. Perform "rich querying" on directory systems. ADSI technology allows for searching for an object by specifying two query dialects: SQL and LDAP.
4. Access and use a single, hierarchical structure for administering and maintaining diverse and complicated network configurations by accessing an Active Directory tree.
5. Integrate directory information with databases such as SQL Server. The DirectoryEntry path may be used as an ADO.NET connection string provided that it is using the LDAP provider. using System.DirectoryServices;
Tuesday, November 24, 2009
Pooling
What are object pooling and connection pooling and difference? Where do we set the Min and Max Pool size for connection pooling?
Object pooling is a COM+ service that enables you to reduce the overhead of creating each object from scratch. When an object is activated, it is pulled from the pool. When the object is deactivated, it is placed back into the pool to await the next request.
You can configure object pooling by applying the ObjectPoolingAttribute attribute to a class that derives from the System.EnterpriseServices.ServicedComponent class. Object pooling lets you control the number of connections you use, as opposed to connection pooling, where you control the maximum number reached.
Following are important differences between object pooling and connection pooling:
Creation. When using connection pooling, creation is on the same thread, so if there is nothing in the pool, a connection is created on your behalf. With object pooling, the pool might decide to create a new object. However, if you have already reached your maximum, it instead gives you the next available object. This is crucial behavior when it takes a long time to create an object, but you do not use it for very long.
Enforcement of minimums and maximums. This is not done in connection pooling. The maximum value in object pooling is very important when trying to scale your application. You might need to multiplex thousands of requests to just a few objects. (TPC/C benchmarks rely on this.) COM+ object pooling is identical to what is used in .NET Framework managed SQL Client connection pooling. For example, creation is on a different thread and minimums and maximums are enforced.
Object pooling is a COM+ service that enables you to reduce the overhead of creating each object from scratch. When an object is activated, it is pulled from the pool. When the object is deactivated, it is placed back into the pool to await the next request.
You can configure object pooling by applying the ObjectPoolingAttribute attribute to a class that derives from the System.EnterpriseServices.ServicedComponent class. Object pooling lets you control the number of connections you use, as opposed to connection pooling, where you control the maximum number reached.
Following are important differences between object pooling and connection pooling:
Creation. When using connection pooling, creation is on the same thread, so if there is nothing in the pool, a connection is created on your behalf. With object pooling, the pool might decide to create a new object. However, if you have already reached your maximum, it instead gives you the next available object. This is crucial behavior when it takes a long time to create an object, but you do not use it for very long.
Enforcement of minimums and maximums. This is not done in connection pooling. The maximum value in object pooling is very important when trying to scale your application. You might need to multiplex thousands of requests to just a few objects. (TPC/C benchmarks rely on this.) COM+ object pooling is identical to what is used in .NET Framework managed SQL Client connection pooling. For example, creation is on a different thread and minimums and maximums are enforced.
Thursday, November 12, 2009
Remoting
What is Remoting?
The process of communication between different operating system processes, regardless of whether they are on the same computer. The .NET Remoting system is an architecture designed to simplify communication between objects living in different application domains, whether on the same computer or not, and between different contexts, whether in the same application domain or not.
.NET Remoting Architecture?
• Methods that will be called from the client are implemented in a remote object class.
• Client uses a proxy to call a remote object.
• Remote objects runs inside a process that is different from the client process
• For the client, the proxy looks like the real object with the same public methods.
• When the methods of the proxy are called, messages are created.
• Messages are serialized using a binary formatter class, and are sent into a client channel.
• The client channel communicates with the server part of the channel to transfer the message across the network.
• The server channel uses a formatter to deserialize the message, so that the methods can be dispatched to the remote object.
• The formatter and the proxy is supplied automatically.
How does .NET remoting work?
.NET remoting involves sending messages along channels. Two of the standard channels are HTTP and TCP.
TCP is intended for LANs only -
HTTP can be used for LANs or WANs internet).
Support is provided for multiple message serializarion formats. Examples are SOAP (XML-based) and binary. By default, the HTTP channel uses SOAP (via the .NET runtime Serialization SOAP Formatter), and the TCP channel uses binary (via the .NET runtime Serialization Binary Formatter). But either channel can use either serialization format.
There are a number of styles of remote access:
• SingleCall. Each incoming request from a client is serviced by a new object. The object is thrown away when the request has finished.
• Singleton. All incoming requests from clients are processed by a single server object.
• Client-activated object. This is the old stateful (D)COM model whereby the client receives a reference to the remote object and holds that reference (thus keeping the remote object alive) until it is finished with it.
Distributed garbage collection of objects is managed by a system called 'leased based lifetime'. Each object has a lease time, and when that time expires the object is disconnected from the .NET runtime remoting infrastructure. Objects have a default renew time - the lease is renewed when a successful call is made from the client to the object. The client can also explicitly renew the lease.
Advantage over Web Services?
1.It works using purely Commmon Type System.
2.It supports high speed binary over tcp/ip communication.
Advantage over COM/DCOM?
1.It does not have extra interface language (IDL)
2.It Works using purely managed code
3.It's using Common Type System.. No Safearrays etc
Disadvantages
1.It is not an open standard like web services.
2.It is not as widespread and established ad DCOM.
3.Less support for transactions,load balancing compared with DCOM.
The process of communication between different operating system processes, regardless of whether they are on the same computer. The .NET Remoting system is an architecture designed to simplify communication between objects living in different application domains, whether on the same computer or not, and between different contexts, whether in the same application domain or not.
.NET Remoting Architecture?
• Methods that will be called from the client are implemented in a remote object class.
• Client uses a proxy to call a remote object.
• Remote objects runs inside a process that is different from the client process
• For the client, the proxy looks like the real object with the same public methods.
• When the methods of the proxy are called, messages are created.
• Messages are serialized using a binary formatter class, and are sent into a client channel.
• The client channel communicates with the server part of the channel to transfer the message across the network.
• The server channel uses a formatter to deserialize the message, so that the methods can be dispatched to the remote object.
• The formatter and the proxy is supplied automatically.
How does .NET remoting work?
.NET remoting involves sending messages along channels. Two of the standard channels are HTTP and TCP.
TCP is intended for LANs only -
HTTP can be used for LANs or WANs internet).
Support is provided for multiple message serializarion formats. Examples are SOAP (XML-based) and binary. By default, the HTTP channel uses SOAP (via the .NET runtime Serialization SOAP Formatter), and the TCP channel uses binary (via the .NET runtime Serialization Binary Formatter). But either channel can use either serialization format.
There are a number of styles of remote access:
• SingleCall. Each incoming request from a client is serviced by a new object. The object is thrown away when the request has finished.
• Singleton. All incoming requests from clients are processed by a single server object.
• Client-activated object. This is the old stateful (D)COM model whereby the client receives a reference to the remote object and holds that reference (thus keeping the remote object alive) until it is finished with it.
Distributed garbage collection of objects is managed by a system called 'leased based lifetime'. Each object has a lease time, and when that time expires the object is disconnected from the .NET runtime remoting infrastructure. Objects have a default renew time - the lease is renewed when a successful call is made from the client to the object. The client can also explicitly renew the lease.
Advantage over Web Services?
1.It works using purely Commmon Type System.
2.It supports high speed binary over tcp/ip communication.
Advantage over COM/DCOM?
1.It does not have extra interface language (IDL)
2.It Works using purely managed code
3.It's using Common Type System.. No Safearrays etc
Disadvantages
1.It is not an open standard like web services.
2.It is not as widespread and established ad DCOM.
3.Less support for transactions,load balancing compared with DCOM.
Web.Config
Explain Web.config Settings for exception management in ASP.NET
You should configure exception management settings within your application's Web.config file. e.g
< defaultredirect="http://hostname/error.aspx" mode="On">
< statuscode="500" redirect="/errorpages/servererror.aspx">
< statuscode="404" redirect="/errorpages/filenotfound.htm">
< /customErrors>
In the customErrors element, specify a default redirect page. There are three modes for the default redirect page:
On
Unhandled exceptions will redirect the user to the specified defaultredirect page. This is used mainly in production.
Off
Users will see the exception information and not be redirected to the defaultredirect page. This is used mainly in development.
RemoteOnly
Only users accessing the site on the local machine (using localhost) will see the exception information while all other users will be redirected to the defaultredirect page. This is used mainly for debugging.
In addition to the default redirect page, you can set specific pages for certain HTTP error codes. For example, you can specify that all 404 errors result in a certain error page, while all 500 errors result in another
You should configure exception management settings within your application's Web.config file. e.g
< defaultredirect="http://hostname/error.aspx" mode="On">
< statuscode="500" redirect="/errorpages/servererror.aspx">
< statuscode="404" redirect="/errorpages/filenotfound.htm">
< /customErrors>
In the customErrors element, specify a default redirect page. There are three modes for the default redirect page:
On
Unhandled exceptions will redirect the user to the specified defaultredirect page. This is used mainly in production.
Off
Users will see the exception information and not be redirected to the defaultredirect page. This is used mainly in development.
RemoteOnly
Only users accessing the site on the local machine (using localhost) will see the exception information while all other users will be redirected to the defaultredirect page. This is used mainly for debugging.
In addition to the default redirect page, you can set specific pages for certain HTTP error codes. For example, you can specify that all 404 errors result in a certain error page, while all 500 errors result in another
NetBpm
What is NetBpm?
NetBpm is a .Net Port of JBpm1. NetBpm is an open source platform for building, executing and managing workflows. It is very simple to use and integrate in other .Net applications. This Bpm Tool supports the build of Applications which are able to turn business models into executable software models. Business analysts are able to use a model driven approach to design, implement, execute and track business processes. So business people can easily react on business and strategy changes.
Click below for site
http://www.netbpm.org/index.html
NetBpm is a .Net Port of JBpm1. NetBpm is an open source platform for building, executing and managing workflows. It is very simple to use and integrate in other .Net applications. This Bpm Tool supports the build of Applications which are able to turn business models into executable software models. Business analysts are able to use a model driven approach to design, implement, execute and track business processes. So business people can easily react on business and strategy changes.
Click below for site
http://www.netbpm.org/index.html
Saturday, November 7, 2009
Configuration Files
Configuration Files
Configuration files are XML files that can be changed as needed. Developers can use configuration files to change settings without recompiling applications. Administrators can use configuration files to set policies that affect how applications run on their computers.
Note Managed code can use the System.Configuration API to read settings from the configuration files, but not to write settings to those files.
This section describes the syntax of configuration files and provides information about the three types of configuration files: machine, application, and security.
Configuration File Format
Briefly describes the format of configuration files.
Machine Configuration Files
Describes the contents of machine configuration files.
Application Configuration Files
Describes the different types of application configuration files.
Security Configuration Files
Provides the location of the security configuration files.
Configuration File Format
Configuration files contain elements, which are logical data structures that set configuration information. Within a configuration file, you use tags to mark the beginning and end of an element. For example, theelement consists of child elements . An empty element has a start tag, but no end tag.
You specify configuration settings using predefined attributes, which are name/value pairs inside an element's start tag. The following example specifies two attributes (version and href) for theelement, which specifies where the runtime can locate an assembly (for more information, see Specifying an Assembly's Location).
The syntax in configuration files is case-sensitive.
Machine Configuration Files
The machine configuration file, Machine.config, contains settings that apply to an entire computer. This file is located in the %runtime install path%\Config directory. Machine.config contains configuration settings for machine-wide assembly binding, built-in remoting channels, and ASP.NET.
The configuration system first looks in the machine configuration file for the element and other configuration sections that a developer might define. It then looks in the application configuration file. To keep the machine configuration file manageable, it is best to put these settings in the application configuration file. However, putting the settings in the machine configuration file can make your system more maintainable. For example, if you have a third-party component that both your client and server application uses, it is easier to put the settings for that component in one place. In this case, the machine configuration file is the appropriate place for the settings, so you don't have the same settings in two different files.
Note Deploying an application using XCOPY will not copy the settings in the machine configuration file.
Application Configuration Files
Application configuration files contain settings specific to an application. This file contains configuration settings that the common language runtime reads (such as assembly binding policy, remoting objects, and so on), and settings that the application can read.
The name and location of the application configuration file depend on the application's host, which can be one of the following:
• Executable–hosted application.
The configuration file for an application hosted by the executable host is in the same directory as the application. The name of the configuration file is the name of the application with a .config extension. For example, an application called myApp.exe can be associated with a configuration file called myApp.exe.config.
• ASP.NET-hosted application.
ASP.NET configuration files are called Web.config. Configuration files in ASP.NET applications inherit the settings of configuration files in the URL path. For example, given the URL www.microsoft.com/aaa/bbb, where www.microsoft.com/aaa is the Web application, the configuration file associated with the application is located at www.microsoft.com/aaa. ASP.NET pages that are in the subdirectory /bbb use both the settings that are in the configuration file at the application level and the settings in the configuration file that is in /bbb.
For more information about ASP.NET configuration files, see ASP.NET Configuration
• Internet Explorer-hosted application.
If an application hosted in Internet Explorer has a configuration file, the location of this file is specified in a tag with the following syntax:
In this tag, location is a URL to the configuration file. This sets the application base. The configuration file must be located on the same Web site as the application.
Security Configuration Files
Security configuration files contain information about the code group hierarchy and permission sets associated with a policy level. It is strongly recommended that you use the .NET Framework Configuration tool (Mscorcfg.msc) or Code Access Security Policy tool (Caspol.exe) to modify security policy to ensure that policy changes do not corrupt the security configuration files.
The following table shows the locations of the security configuration files.
Configuration files are XML files that can be changed as needed. Developers can use configuration files to change settings without recompiling applications. Administrators can use configuration files to set policies that affect how applications run on their computers.
Note Managed code can use the System.Configuration API to read settings from the configuration files, but not to write settings to those files.
This section describes the syntax of configuration files and provides information about the three types of configuration files: machine, application, and security.
Configuration File Format
Briefly describes the format of configuration files.
Machine Configuration Files
Describes the contents of machine configuration files.
Application Configuration Files
Describes the different types of application configuration files.
Security Configuration Files
Provides the location of the security configuration files.
Configuration File Format
Configuration files contain elements, which are logical data structures that set configuration information. Within a configuration file, you use tags to mark the beginning and end of an element. For example, the
You specify configuration settings using predefined attributes, which are name/value pairs inside an element's start tag. The following example specifies two attributes (version and href) for the
The syntax in configuration files is case-sensitive.
Machine Configuration Files
The machine configuration file, Machine.config, contains settings that apply to an entire computer. This file is located in the %runtime install path%\Config directory. Machine.config contains configuration settings for machine-wide assembly binding, built-in remoting channels, and ASP.NET.
The configuration system first looks in the machine configuration file for the
Note Deploying an application using XCOPY will not copy the settings in the machine configuration file.
Application Configuration Files
Application configuration files contain settings specific to an application. This file contains configuration settings that the common language runtime reads (such as assembly binding policy, remoting objects, and so on), and settings that the application can read.
The name and location of the application configuration file depend on the application's host, which can be one of the following:
• Executable–hosted application.
The configuration file for an application hosted by the executable host is in the same directory as the application. The name of the configuration file is the name of the application with a .config extension. For example, an application called myApp.exe can be associated with a configuration file called myApp.exe.config.
• ASP.NET-hosted application.
ASP.NET configuration files are called Web.config. Configuration files in ASP.NET applications inherit the settings of configuration files in the URL path. For example, given the URL www.microsoft.com/aaa/bbb, where www.microsoft.com/aaa is the Web application, the configuration file associated with the application is located at www.microsoft.com/aaa. ASP.NET pages that are in the subdirectory /bbb use both the settings that are in the configuration file at the application level and the settings in the configuration file that is in /bbb.
For more information about ASP.NET configuration files, see ASP.NET Configuration
• Internet Explorer-hosted application.
If an application hosted in Internet Explorer has a configuration file, the location of this file is specified in a tag with the following syntax:
In this tag, location is a URL to the configuration file. This sets the application base. The configuration file must be located on the same Web site as the application.
Security Configuration Files
Security configuration files contain information about the code group hierarchy and permission sets associated with a policy level. It is strongly recommended that you use the .NET Framework Configuration tool (Mscorcfg.msc) or Code Access Security Policy tool (Caspol.exe) to modify security policy to ensure that policy changes do not corrupt the security configuration files.
The following table shows the locations of the security configuration files.
Wednesday, November 4, 2009
IIS 7
What is break mode? What are the options to step through code?
Answer - Break mode lets you to observe code line to line in order to locate error.
VS.NET provides following option to step through code.
Step Into
Step Over
Step Out
Run To Cursor
Set Next Statement
Debug Vs Trace.
Answer - Both these objects are found in the System.Diagnostics namespace.
Both are used for diagnose problems without interrupting application execution.
Debug statement can only be used in debug mode while trace statement can be used both in debug and released mode.
Debug statements can't be compiled into a release version.
Define trace class.
Answer - The trace class in the code is used to diagnose problem.
You can use trace messages to your project to monitor events in the released version of the application.
The trace class is found in the System.Diagnostics namespace.
Define Trace Switches.
Answer - Trace switches are used to configure tracing behavior.
There are two kinds of trace switches: BooleanSwitch and TraceSwitch.
BooleanSwitch: It is either on or off.
TraceSwitch : It has property to determine trace behaviour.
Trace switches can be configured through application's .config file even after the application is compiled.
what is debugging.
debugging is an error correction because 'bug' means error
correct and 'de' including that is determinate the errors
and correct them
IIS Versions 1.0 to 4.0
IIS was released with Service Pack 3 for Windows NT 3.51, as a set of services providing HTTP, Gopher, and WAIS functionality. Although the functions were there, most users chose alternates from third-party vendors such as O'Reilly's Website or Netscape's server. Although these services had been available for years with the various flavors of UNIX operating systems, native Internet services for Windows were mostly an afterthought, with little integration with the Windows operating system.
With the advent of Windows NT 4.0, IIS also matured in version 2.0. The most notable improvement in IIS version 2.0 was closer integration with the Windows NT operating system, taking advantage of Windows security accounts and providing integrated administration through a management console similar to many other Windows services. IIS 2.0 introduced support for HTTP Host headers, which allowed multiple sites to run on a single IP address, and aligned Microsoft's IIS development with NCSA standards, providing for NCSA common log formats and NCSA-style map files. IIS 2.0 also intro-duced a web browser interface for management, and content indexing through Microsoft's Index Server.
IIS version 3.0 was introduced with Windows NT Service Pack 3 and introduced the world to ASP (Active Server Pages) and Microsoft's concept of an application server. A precursor to the ASP.NET envi-ronment, ASP (now referred to as classic ASP) is a server-side scripting environment for the creation of dynamic web pages. Using VBScript, JScript or any other active scripting engine, programmers finally had a viable competitor to CGI and scripting technologies available on non-Microsoft platforms, such as Perl.
IIS 4.0, available in the NT Option Pack, introduced ASP 2.0, an object-based version of ASP that included six built-in objects to provide standardized functionality in ASP pages. IIS 4.0 was the last version of IIS that could be downloaded and installed outside of the operating system.
IIS 5.0 and 5.1
With the release of Windows 2000, IIS became integrated with the operating system. Version numbers reflected the operating system, and there were no upgrades to IIS available without upgrading the oper-ating system. IIS 5.0 shipped with Windows 2000 Server versions and Windows 2000 Professional, and IIS version 5.1 shipped with Windows XP Professional, but not Windows XP Home Edition. For all essential functions, IIS 5.0 and IIS 5.1 are identical, differing only slightly as needed by the changes to the operating system.
With Windows 2000 and IIS 5.0, IIS became a service of the operating system, meant to be the base for other applications, especially for ASP applications. The IIS 5.0 architecture served static content, ISAPI functions, or ASP scripts, with ASP script processing handed off to a script engine based on the file extension. Using file extensions to determine the program that handles the file has always been a com-mon part of Windows functionality, and in the case of ASP processing, the speed of serving pages was increased by the automatic handoff of ASP scripts directly to the ASP engine, bypassing the static con-tent handler. This architecture has endured in IIS to the current version.
IIS 6.0
IIS 6.0 shipped with Windows Server 2003 editions and Windows XP Professional 64bit edition, which was built on the Windows Server 2003 Service Pack 1 code base. IIS 6.0 was identical among operating system versions, but there were restrictions or expansions depending on the version of Server 2003 under which IIS was running. For example, Server 2003 Web Edition would only run IIS and a few ancil-lary services; it could not be used to run Microsoft SQL Server. On the other end of the spectrum, only the Enterprise and Data Center versions of Server 2003 included clustering technology.
Operating system changes also expanded the capabilities of IIS as an application server. Native XML Web Services appeared in Server 2003. Process-independent session states made web farms easier to configure and manage, allowing session states to be stored outside the application for redundancy and failover. Web farms also became easier with Server 2003's improved Network Load-Balancing features, such as the NLB Manager, which provided a single management point for NLB functions.
IIS 7.0 Versions
Although there is really only a single version of IIS 7.0, the availability and capabilities vary with the choice of operating system. Because IIS 7.0 is tied to the operating system, as were all versions of IIS since IIS 4.0, it is not available on operating systems prior to Vista or Windows Server 2008. As in Windows XP, the workstation operating systems have limited IIS functionality or no functionality at all. Unlike in Windows XP, Vista versions have no concurrent HTTP connection limitations but instead use concurrent request processing limitations. In XP, reaching a maximum concurrent HTTP connection limit would result in IIS returning a 403.9 result code (too many users), while a request limitation merely queues requests in the order received. The end result is slower response, but no errors.
Some Windows Server 2008 versions also have limitations that affect IIS 7.0. Although IIS 7.0 is included with no limitations in all server versions, the server version itself may have limitations in use. For exam-ple, if you install Windows Server 2008 Core Edition, IIS 7.0 can be installed, but there is no GUI configu-ration application. This version of Windows does not have the .NET Framework available; thus, no managed code can be run on the server.
Windows Server 2008 Web Edition has no functional limits to IIS, but only supports three role services: Web Server, Windows Media Server and Sharepoint Services — it cannot be used to host a Domain Controller, or other types of roles. The following table shows which versions of Windows Vista and Windows Server 2008 have IIS 7.0 and what the limitations are.
IIS 7.0 Features
1)Integrated request pipeline
2) Configurability
3)Extensible Configuration Schemas
4) Componentization (Security,Minimal Installation,Management Delegation,Unified Authentication and Authorization,Request Filtering,Remote Management)
5)Administration Tools
6)AppCmd.exe Command-Line Utility
7)Diagnostics
IIS 7.0 is a ground-up rewrite of IIS 6.0, designed as an integrated web application platform. Integration with the ASP.NET framework combined with fully exposed APIs for complete extensibility of the plat-form and management interfaces make IIS 7.0 a programmer's dream. Security that includes delegation of configuration and a complete diagnostic suite with request tracing and advanced logging satisfies the administrator's desires.
While the most substantial change in IIS 7.0 may be the integration of ASP.NET into the request pipeline, the extensibility of IIS 7.0, configuration delegation and the use of XML configuration files, request trac-ing and diagnostics, and the new administration tools are all welcome changes from previous versions of IIS.
Unlike previous versions of IIS, the modular design of IIS 7.0 allows for easy implementation of custom modules and additional functionality. This increased functionality can come from in-house development, third-party sources, or even Microsoft. Since these modules and additional programs can be plugged into IIS at any time, without changing core operating system functions, the Microsoft IIS devel-opment team can ship additional supported and unsupported modules outside of Microsoft's standard service pack process. The bottom line is that you get what you need faster. Microsoft's web site at http://www.iis.net is the source for these additional downloads.
---------
IIS 7.0 is an evolution of previous IIS versions, building on their strengths while overcoming their weak-nesses. Microsoft has listened to user comments on previous versions and responded positively, to make IIS 7.0 the most robust, configurable, and secure version of their web server. In addition, Microsoft has further enhanced the tie between IIS and ASP.NET, making IIS 7.0 a fully functional application server with entirely integrated processing and configuration of both sides.
Programmers will see the improvements in IIS 7.0 as making their job easier and more manageable. They will no longer need to justify web server changes that might affect numerous sites just to adapt to their application. True XCopy deployment of applications and configurations will allow them to spend less time on deployment schemes that need to work around server configurations. Senior programmers on a site will be able to delegate appropriate permissions for configuration changes to junior programmers, just as administrators will delegate permission to developers.
Administrators will find that the delegation in IIS 7.0 greatly assists in lowering the administrative effort required to maintain an IIS server. Administrators will be able to granularly control their servers and site administration functions while allowing developers to control the areas they need to. Security concerns about opening servers to development staff are a thing of the past, and auditors will be pleased with the control available. The reduction in security exposure provided by the modular installation, as well as the ability to provide unified authentication across an entire site, will further help to lock down an already secure system. Administrators will also enjoy the simplified and unified management tools.
Both administrators and developers will appreciate IIS 7.0's tracing and diagnostic capabilities. The abil-ity to see into a request will ease troubleshooting failed requests as well as allow better tuning for per-formance even in completed requests. The modularity of IIS will also appeal to both camps, especially the ability to write custom modules that sit in the request pipeline and affect all requests, whether for a custom authentication system or simply to add a copyright notice to all images or content served.
After reviewing this chapter, you should have a good idea of the changes and new features in IIS 7.0. The following chapters will take you through installing and configuring the web server and environ-ment. If you have a particular interest, feel free to skip to the chapter or chapters covering it. Otherwise, let's take an in-depth look at the architecture of IIS 7.0, followed by planning your installation and installing IIS 7.0.
INETINFO.EXE,ISAPI.EXE,WP.EXE
inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things. When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe
When a request comes into Microsoft's IIS Web server (inetinfo.exe, is ur webserver running) its extension is examined and, based on this extension, the request is either handled directly by IIS or routed to an ISAPI extension. An ISAPI extension is a compiled class that is installed on the Web server and whose responsibility it is to return the markup for the requested file type.
By default, IIS handles the request, and simply returns the contents of the file requested. This makes sense for static files, like images, HTML pages, CSS files, external JavaScript files, and so on. For example, when a request is made for a .html file, IIS simply returns the contents of the requested HTML file.
For files whose content is dynamically generated, the ISAPI extension configured for the file extension is responsible for generating the content for the requested file. For example, a Web site that serves up classic ASP pages has the .asp extension mapped to the asp.dll ISAPI extension. The asp.dll ISAPI extension executes the requested ASP page and returns its generated HTML markup. If your Web site serves up ASP.NET Web pages, IIS has mapped the .aspx to aspnet_isapi.dll, an ISAPI extension that starts off the process of generating the rendered HTML for the requested ASP.NET Web page.
The aspnet_isapi.dll ISAPI extension is a piece of unmanaged code. That is, it is not code that runs in the .NET Framework. When IIS routes the request to the aspnet_isapi.dll ISAPI extension, the ISAPI extension routes the request onto the ASP.NET engine(aspnet_wp.exe), which is written in managed code - managed code is code that runs in the .NET Framework.
Diifference of IIS 6 and IIS 7
Architecture Monolithic Modular
Setup Most Features Installed Minimum installtion based on role
Extended Features ISAPI Filter and ISAPI Extention Added Module&handler managed code
Customize UI Normal Customize for .NET
IIS 7 Authentication:Each application pool is configured to run under the content of a user account and the default value for this account is NETWORKSERVICE.
IIS7 IP Restriction:allowUnlisted". This property was added to make it easier to configure security policies for your system at a global level.
Answer - Break mode lets you to observe code line to line in order to locate error.
VS.NET provides following option to step through code.
Step Into
Step Over
Step Out
Run To Cursor
Set Next Statement
Debug Vs Trace.
Answer - Both these objects are found in the System.Diagnostics namespace.
Both are used for diagnose problems without interrupting application execution.
Debug statement can only be used in debug mode while trace statement can be used both in debug and released mode.
Debug statements can't be compiled into a release version.
Define trace class.
Answer - The trace class in the code is used to diagnose problem.
You can use trace messages to your project to monitor events in the released version of the application.
The trace class is found in the System.Diagnostics namespace.
Define Trace Switches.
Answer - Trace switches are used to configure tracing behavior.
There are two kinds of trace switches: BooleanSwitch and TraceSwitch.
BooleanSwitch: It is either on or off.
TraceSwitch : It has property to determine trace behaviour.
Trace switches can be configured through application's .config file even after the application is compiled.
what is debugging.
debugging is an error correction because 'bug' means error
correct and 'de' including that is determinate the errors
and correct them
IIS Versions 1.0 to 4.0
IIS was released with Service Pack 3 for Windows NT 3.51, as a set of services providing HTTP, Gopher, and WAIS functionality. Although the functions were there, most users chose alternates from third-party vendors such as O'Reilly's Website or Netscape's server. Although these services had been available for years with the various flavors of UNIX operating systems, native Internet services for Windows were mostly an afterthought, with little integration with the Windows operating system.
With the advent of Windows NT 4.0, IIS also matured in version 2.0. The most notable improvement in IIS version 2.0 was closer integration with the Windows NT operating system, taking advantage of Windows security accounts and providing integrated administration through a management console similar to many other Windows services. IIS 2.0 introduced support for HTTP Host headers, which allowed multiple sites to run on a single IP address, and aligned Microsoft's IIS development with NCSA standards, providing for NCSA common log formats and NCSA-style map files. IIS 2.0 also intro-duced a web browser interface for management, and content indexing through Microsoft's Index Server.
IIS version 3.0 was introduced with Windows NT Service Pack 3 and introduced the world to ASP (Active Server Pages) and Microsoft's concept of an application server. A precursor to the ASP.NET envi-ronment, ASP (now referred to as classic ASP) is a server-side scripting environment for the creation of dynamic web pages. Using VBScript, JScript or any other active scripting engine, programmers finally had a viable competitor to CGI and scripting technologies available on non-Microsoft platforms, such as Perl.
IIS 4.0, available in the NT Option Pack, introduced ASP 2.0, an object-based version of ASP that included six built-in objects to provide standardized functionality in ASP pages. IIS 4.0 was the last version of IIS that could be downloaded and installed outside of the operating system.
IIS 5.0 and 5.1
With the release of Windows 2000, IIS became integrated with the operating system. Version numbers reflected the operating system, and there were no upgrades to IIS available without upgrading the oper-ating system. IIS 5.0 shipped with Windows 2000 Server versions and Windows 2000 Professional, and IIS version 5.1 shipped with Windows XP Professional, but not Windows XP Home Edition. For all essential functions, IIS 5.0 and IIS 5.1 are identical, differing only slightly as needed by the changes to the operating system.
With Windows 2000 and IIS 5.0, IIS became a service of the operating system, meant to be the base for other applications, especially for ASP applications. The IIS 5.0 architecture served static content, ISAPI functions, or ASP scripts, with ASP script processing handed off to a script engine based on the file extension. Using file extensions to determine the program that handles the file has always been a com-mon part of Windows functionality, and in the case of ASP processing, the speed of serving pages was increased by the automatic handoff of ASP scripts directly to the ASP engine, bypassing the static con-tent handler. This architecture has endured in IIS to the current version.
IIS 6.0
IIS 6.0 shipped with Windows Server 2003 editions and Windows XP Professional 64bit edition, which was built on the Windows Server 2003 Service Pack 1 code base. IIS 6.0 was identical among operating system versions, but there were restrictions or expansions depending on the version of Server 2003 under which IIS was running. For example, Server 2003 Web Edition would only run IIS and a few ancil-lary services; it could not be used to run Microsoft SQL Server. On the other end of the spectrum, only the Enterprise and Data Center versions of Server 2003 included clustering technology.
Operating system changes also expanded the capabilities of IIS as an application server. Native XML Web Services appeared in Server 2003. Process-independent session states made web farms easier to configure and manage, allowing session states to be stored outside the application for redundancy and failover. Web farms also became easier with Server 2003's improved Network Load-Balancing features, such as the NLB Manager, which provided a single management point for NLB functions.
IIS 7.0 Versions
Although there is really only a single version of IIS 7.0, the availability and capabilities vary with the choice of operating system. Because IIS 7.0 is tied to the operating system, as were all versions of IIS since IIS 4.0, it is not available on operating systems prior to Vista or Windows Server 2008. As in Windows XP, the workstation operating systems have limited IIS functionality or no functionality at all. Unlike in Windows XP, Vista versions have no concurrent HTTP connection limitations but instead use concurrent request processing limitations. In XP, reaching a maximum concurrent HTTP connection limit would result in IIS returning a 403.9 result code (too many users), while a request limitation merely queues requests in the order received. The end result is slower response, but no errors.
Some Windows Server 2008 versions also have limitations that affect IIS 7.0. Although IIS 7.0 is included with no limitations in all server versions, the server version itself may have limitations in use. For exam-ple, if you install Windows Server 2008 Core Edition, IIS 7.0 can be installed, but there is no GUI configu-ration application. This version of Windows does not have the .NET Framework available; thus, no managed code can be run on the server.
Windows Server 2008 Web Edition has no functional limits to IIS, but only supports three role services: Web Server, Windows Media Server and Sharepoint Services — it cannot be used to host a Domain Controller, or other types of roles. The following table shows which versions of Windows Vista and Windows Server 2008 have IIS 7.0 and what the limitations are.
IIS 7.0 Features
1)Integrated request pipeline
2) Configurability
3)Extensible Configuration Schemas
4) Componentization (Security,Minimal Installation,Management Delegation,Unified Authentication and Authorization,Request Filtering,Remote Management)
5)Administration Tools
6)AppCmd.exe Command-Line Utility
7)Diagnostics
IIS 7.0 is a ground-up rewrite of IIS 6.0, designed as an integrated web application platform. Integration with the ASP.NET framework combined with fully exposed APIs for complete extensibility of the plat-form and management interfaces make IIS 7.0 a programmer's dream. Security that includes delegation of configuration and a complete diagnostic suite with request tracing and advanced logging satisfies the administrator's desires.
While the most substantial change in IIS 7.0 may be the integration of ASP.NET into the request pipeline, the extensibility of IIS 7.0, configuration delegation and the use of XML configuration files, request trac-ing and diagnostics, and the new administration tools are all welcome changes from previous versions of IIS.
Unlike previous versions of IIS, the modular design of IIS 7.0 allows for easy implementation of custom modules and additional functionality. This increased functionality can come from in-house development, third-party sources, or even Microsoft. Since these modules and additional programs can be plugged into IIS at any time, without changing core operating system functions, the Microsoft IIS devel-opment team can ship additional supported and unsupported modules outside of Microsoft's standard service pack process. The bottom line is that you get what you need faster. Microsoft's web site at http://www.iis.net is the source for these additional downloads.
---------
IIS 7.0 is an evolution of previous IIS versions, building on their strengths while overcoming their weak-nesses. Microsoft has listened to user comments on previous versions and responded positively, to make IIS 7.0 the most robust, configurable, and secure version of their web server. In addition, Microsoft has further enhanced the tie between IIS and ASP.NET, making IIS 7.0 a fully functional application server with entirely integrated processing and configuration of both sides.
Programmers will see the improvements in IIS 7.0 as making their job easier and more manageable. They will no longer need to justify web server changes that might affect numerous sites just to adapt to their application. True XCopy deployment of applications and configurations will allow them to spend less time on deployment schemes that need to work around server configurations. Senior programmers on a site will be able to delegate appropriate permissions for configuration changes to junior programmers, just as administrators will delegate permission to developers.
Administrators will find that the delegation in IIS 7.0 greatly assists in lowering the administrative effort required to maintain an IIS server. Administrators will be able to granularly control their servers and site administration functions while allowing developers to control the areas they need to. Security concerns about opening servers to development staff are a thing of the past, and auditors will be pleased with the control available. The reduction in security exposure provided by the modular installation, as well as the ability to provide unified authentication across an entire site, will further help to lock down an already secure system. Administrators will also enjoy the simplified and unified management tools.
Both administrators and developers will appreciate IIS 7.0's tracing and diagnostic capabilities. The abil-ity to see into a request will ease troubleshooting failed requests as well as allow better tuning for per-formance even in completed requests. The modularity of IIS will also appeal to both camps, especially the ability to write custom modules that sit in the request pipeline and affect all requests, whether for a custom authentication system or simply to add a copyright notice to all images or content served.
After reviewing this chapter, you should have a good idea of the changes and new features in IIS 7.0. The following chapters will take you through installing and configuring the web server and environ-ment. If you have a particular interest, feel free to skip to the chapter or chapters covering it. Otherwise, let's take an in-depth look at the architecture of IIS 7.0, followed by planning your installation and installing IIS 7.0.
INETINFO.EXE,ISAPI.EXE,WP.EXE
inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things. When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe
When a request comes into Microsoft's IIS Web server (inetinfo.exe, is ur webserver running) its extension is examined and, based on this extension, the request is either handled directly by IIS or routed to an ISAPI extension. An ISAPI extension is a compiled class that is installed on the Web server and whose responsibility it is to return the markup for the requested file type.
By default, IIS handles the request, and simply returns the contents of the file requested. This makes sense for static files, like images, HTML pages, CSS files, external JavaScript files, and so on. For example, when a request is made for a .html file, IIS simply returns the contents of the requested HTML file.
For files whose content is dynamically generated, the ISAPI extension configured for the file extension is responsible for generating the content for the requested file. For example, a Web site that serves up classic ASP pages has the .asp extension mapped to the asp.dll ISAPI extension. The asp.dll ISAPI extension executes the requested ASP page and returns its generated HTML markup. If your Web site serves up ASP.NET Web pages, IIS has mapped the .aspx to aspnet_isapi.dll, an ISAPI extension that starts off the process of generating the rendered HTML for the requested ASP.NET Web page.
The aspnet_isapi.dll ISAPI extension is a piece of unmanaged code. That is, it is not code that runs in the .NET Framework. When IIS routes the request to the aspnet_isapi.dll ISAPI extension, the ISAPI extension routes the request onto the ASP.NET engine(aspnet_wp.exe), which is written in managed code - managed code is code that runs in the .NET Framework.
Diifference of IIS 6 and IIS 7
Architecture Monolithic Modular
Setup Most Features Installed Minimum installtion based on role
Extended Features ISAPI Filter and ISAPI Extention Added Module&handler managed code
Customize UI Normal Customize for .NET
IIS 7 Authentication:Each application pool is configured to run under the content of a user account and the default value for this account is NETWORKSERVICE.
IIS7 IP Restriction:allowUnlisted". This property was added to make it easier to configure security policies for your system at a global level.
Tuesday, November 3, 2009
Unit Testing
Types of tests?
Load or Stress test (performance)
Function or System tests (manual)
User Acceptance testing (by customer)
Integration test (testing interacting components of the system)
Unit test is basic level test designed to test your s/w at the smallest level.In the concept of OOP's unit testing is done at the method levels and tests the method at the single level class.
As the complexity of the s/w grows there are more chances to erroer in it.
Unit testing has come up within VS2008(Professional edition) with MSTest.If you are using any other edition then you won't have it within.MStest has test menu in VS2008 also we have test project in VS2008.
Other popular 3rd party softwares are NUnit.most popular and it can be downloaded from http://www.nunit.org/index.php
other is MBUNIT http://www.mbunit.com/
XUNIT http://www.codeplex.com/xunit
Now with each software we get the runner which shows us the test results.
Load or Stress test (performance)
Function or System tests (manual)
User Acceptance testing (by customer)
Integration test (testing interacting components of the system)
Unit test is basic level test designed to test your s/w at the smallest level.In the concept of OOP's unit testing is done at the method levels and tests the method at the single level class.
As the complexity of the s/w grows there are more chances to erroer in it.
Unit testing has come up within VS2008(Professional edition) with MSTest.If you are using any other edition then you won't have it within.MStest has test menu in VS2008 also we have test project in VS2008.
Other popular 3rd party softwares are NUnit.most popular and it can be downloaded from http://www.nunit.org/index.php
other is MBUNIT http://www.mbunit.com/
XUNIT http://www.codeplex.com/xunit
Now with each software we get the runner which shows us the test results.
Subscribe to:
Posts (Atom)