18.11.09

Webssite Vs. Web Application

* Fundamentally the behavior of the application types is same but website project type is folder based and WebApp is project type like normal project types in VS studio.In WebApplication project type project file defines the structure of the project.

* WebSite project type contains the folders and anything that you put in the folder are dynamically compiled and be part in the website. More about ASP.NET Website Dynamic compilation here.

* WebApplication project type contains the designer for the ASPX page and you can find the bin folder which contains the compiled assembly.

ASP.NET website project type is dynamic and WebApp is more like structured.

* When you add a class file to the website project it will prompt you that it will place the file in App_code folder under root.
Notice In website project type namespace won't add to the class by default however you can define the namespaces explicitly where as in WebApp it creates the namespace for the class file when you added it to the project.

* WebApp project type is restricted to one language where as Website you can add different language files to the App_Code folder which compiles the files dynamically.

* Referring a user control in WebApp is straight forward.You can define the properties and can be accessed in class files like any other objects where as in website it is not.

* We can put multiple language files in the Website but those files needs to be in same folder. If you change the location of the file then you need to mention in the Web.Config file as follows..
OpnAngl codeSubDirectories ClosAngl
OpnAngl add directory Name="Testfolder"/ClosAngl
OpnAngl /codeSubDirectories ClosAngl
In compilation process you will have the finer degree of control in WebApp and it is not in Website because everything is dynamically compiled.

* When you deploy the WebApps you can just copy the Compiled Assembly and Visual elements to the IIS folder where as in Website you need to copy everything to the IIS to work.

* If you use WebApplication project you can not access Profie at design time
Web site
No solution or project files are required and the pages and source can reside locally (file system, IIS) or remotely (FTP, WebDev/FrontPage extensions) via the File > Open > Web Site… menu option.

Code-behind and classes are typically stored on the web server which compiles them in-memory on demand. Changes can be made to the files without restarting the application and losing sessions.

Web Appli
Like the name implies these are primarily for web applications, those times when you have written a product or solution that happens to have a web interface.

Web application projects exist on your local drive and are treated like any other VS project type and can be added to existing solutions are subject to full compilation, validation and build steps.

Deployment is typically via MSI installers however you can also utilise the addition Web Deployment Projects add-in which allows you to deployment directly to servers which is useful for deploying to test environments.

29.10.09

Project-vs-Product

Product:
Product is, a company that develop and releases Hardware, Middleware, Operating system, Languages, Tools etc are becomes the product. They develop the products for global clients i.e. there are no specific clients for them. Here the requirements are gathered from market and analyze that with some experts and start to develop the product. After developing the products they try to market it as a solution. Here the end users are more than one. Product development is never ending process and customization is possible.

Project:
Project is finding solution to a particular problem to a particular client. It depends on the product. By using the products like Hardware, Middleware, Operating system, Languages and Tools only we will develop a project. Here the requirements are gathered from the client and analyze with that client and start to develop the project. Here the end user is one.

Project--Placing the order before manufacturing process
Product--Placing the order after manufacturing process

PRODUCTS
1 Here the requirements are gathered from market survey.
2 Develop the application for Global clients
3 Products are depends on products
4 End users are more than one
5 Never ending process
PROJECTS
1 Here the requirements are gathered from particular client
2 Develop the application for particular client
3 Projects are depends on products
4 End user is one
5 Once developed it will be finished

23.10.09

SQL Profiler

SQL Profiler captures SQL Server events from a server. The events are saved in a trace file that can be used to analyze and diagnose problem.

The different purposes of using SQL Profiler are:
*It is used to find the cause of the problem by stepping through problem queries.
*It is very useful to analyze the cause of slow running queries.
*It can be used to tune workload of the SQL server.
*It also stores security-related actions that can be reviewed by a security administrator.
*SQL Profiler also supports auditing the actions performed on instances of SQL Server.
*Saved traces can be used by the SQL Server Index Tuning.
*It is also possible to sort and filter the information captured.

*How can you use the SQL Profiler to ensure database security?
*SQL Profiler can audit events like Security, User Activity and DBA Activity.
*Security events include granting, revoking or denying permissions of a user or role.
*End user activity like logins and logouts can be audited.Enabling of roles for an application can also be done.

When do you use SQL Profiler?
*When some queries are performing slowly
*To trace and monitor events of the SQL server
*When indexes need to be fine tuned
*When security is a concern, it can be used to audit and review security activities
*It can be used when troubleshooting to find root cause of an issue

What are the tasks performed by SQL Profiler?
*The SQL Profiler can save traces to a file or a table. These saved traces can be used by the SQL Server Index Tuning.
*To be able to execute a set of actions in the future, the traces can be saved to an SQL script.
*The SQL Profiler can directly replay the traces.
*It is also possible to sort and filter the information captured. This helps in finding performance bottlenecks or deadlocks in the application.

How can you use the SQL Profiler to ensure database security?
SQL Profiler can audit events like Security, User Activity and DBA Activity.
Security events include granting, revoking or denying permissions of a user or role.
End user activity like logins and logouts can be audited.Enabling of roles for an application can also be done.

How can you reduce the amount of data collected by a trace?
There are various options that you need to fill up before creating a new trace. It is always a better practice to use the default options unless you dont want to get into the details of the data provided by the trace.

There are a lot of events that you can audit. If you need to focus on a particular problem, then you can select the events needed and go through to determine the problem.

8.9.09

What is patindex and charindex in SQL

Patindex: Returns the string position of the first occurrence of pattern
Ex: Select patindex(‘%o%’, ‘Microsoft’)
Note: % is must
Charindex: Same as patindex but you can specify the string position.
Ex: charindex ( Expression1, Expression2 [ , start_location])

What is MSIL, IL

When compiling to managed code, the compiler translates your source code into Microsoft intermediate language (MSIL), which is a CPU-independent set of instructions that can be efficiently converted to native code. MSIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations. Microsoft intermediate language (MSIL) is a language used as the output of a number of compilers and as the input to a just-in-time (JIT) compiler. The common language runtime includes a JIT compiler for converting MSIL to native code.

Can I write IL programs directly

.assembly MyAssembly {}
.class MyApp {
.method static void Main() {
.entrypoint
ldstr "Hello, IL!"
call void System.Console::WriteLine(class System.Object)
ret
}
}
Just put this into a file called hello.il, and then run ilasm hello.il. An exe assembly will be generated.

What is Portable Executable (PE)

The file format defining the structure that all executable files (EXE) and Dynamic Link Libraries (DLL) must use to allow them to be loaded and executed by Windows. PE is derived from the Microsoft Common Object File Format (COFF). The EXE and DLL files created using the .NET Framework obey the PE/COFF formats and also add additional header and data sections to the files that are only used by the CLR.

What is serialization in .NET?

Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite process of creating an object from a stream of bytes. Serialization/Deserialization is mostly used to transport objects (e.g. during remoting), or to persist objects (e.g. to a file or database).Serialization can be defined as the process of storing the state of an object to a storage medium. During this process, the public and private fields of the object and the name of the class, including the assembly containing the class, are converted to a stream of bytes, which is then written to a data stream. When the object is subsequently deserialized, an exact clone of the original object is created.

• Binary serialization preserves type fidelity, which is useful for preserving the state of an object between different invocations of an application. For example, you can share an object between different applications by serializing it to the clipboard. You can serialize an object to a stream, disk, memory, over the network, and so forth. Remoting uses serialization to pass objects "by value" from one computer or application domain to another.

• XML serialization serializes only public properties and fields and does not preserve type fidelity. This is useful when you want to provide or consume data without restricting the application that uses the data. Because XML is an open standard, it is an attractive choice for sharing data across the Web. SOAP is an open standard, which makes it an attractive choice.
There are two separate mechanisms provided by the .NET class library - XmlSerializer and SoapFormatter/BinaryFormatter. Microsoft uses XmlSerializer for Web Services, and uses SoapFormatter/BinaryFormatter for remoting. Both are available for use in your own code.

6.9.09

Difference Between Product & Project in software

Project or Application:
* One client point of view if we are designing any software it is called project.
* This is custom made for a specific company in a specific domain, by taking the companies requirements.
ex: subiksha

Product :
* Global client point of view if we are designing any software it is called product.
ex: Ms-word.
* Many companies can use it irrespective of domain -
ex: Microsoft Office.

4.9.09

"Debugging" and "Tracing"

Tracing in .NET

So how has tracing been implemented in .NET? In .NET we have objects called Trace Listeners. A listener is an object that receives the trace output and outputs it somewhere; that somewhere could be a window in your development environment, a file on your hard drive, a Windows Event log, a SQL Server or Oracle database, or any other customized data store.

You can think of a Trace Listener as a conduit for passing tracing information from your application to the output store. We write tracing information on Trace Listeners and Trace Listeners in turn output the tracing information to the target media.

Storing tracing information in a data store of some sort provides the flexibility of analyzing the data later on and helps us find the error and performance related patterns in our applications.

The System.Diagnostics namespace provides the interfaces, classes, enumerations and structures that are used for tracing, debugging, and other application and system diagnostic services.

The System.Diagnostics namespace provides two classes named Trace and Debug that are used for writing errors and application execution information in logs. These classes are helpful during the development (to output debug messages, etc) and after deployment (to output performance related patterns, etc). These two classes are the same, except that the methods of the Trace class become part of the release build code whereas methods of the Debug class don't become part of the release build executable.

When you create a new project, define the DEBUG symbol to enable output with the Debug class and the TRACE symbol to enable output with the Trace class. If you create a project in Visual Studio .NET, its Debug version will have these symbols defined.



The System.Diagnostics namespace provides some Trace Listeners. The default Trace Listener is System.Diagnostics.DefaultTraceListener. Write and WriteLine methods of this class route the tracing information to the OutputDebugString and to the Log method of the attached debugger.

.NET framework also introduced the concept of Trace Switches. As the name implies, these are simply switches whose values can be controlled from outside of the application. What I meant by outside of the application is that once an application is compiled and converted to .exe or .DLL files, we don't have to change our code in order to change the values of these switches; we can just update the corresponding entries in .config files and the corresponding switches in our applications will have the updated values. To be more precise,

Trace Switches are simple objects that can be controlled externally through the .config files.

We will learn more about Trace Listeners and Trace Switches as we progress through the article. Following is a simple example of WriteLine method of the Trace and Debug classes.


Trace.WriteLine ("Hello 15Seconds Reader - Trace!") ;
Debug.WriteLine ("Hello 15Seconds Reader - Debug!") ;

When used in debug mode, both of these methods direct the tracing and debugging output to the output windows of the debugger; as shown in the following figure



NEED TO GET MORE ON "http://www.15seconds.com/Issue/020910.htm"

1.9.09

How to use Configuration file in DOTNET

app.config for Windows applications
Windows applications in VS.NET use the name app.config by default for the configuration file. This will not be automatically created when you create a Windows application. If you need a configuration file for your application, open your project in VS.NET, go to the 'Solution Explorer' and right click on the project name. Choose Add > Add new item from the menu and select 'Application Configuration file' from the list of choices. This will create an app.config file for you in the application root.

* To store values in the configuration file, you can create XML elements in the format:
?xml version="1.0" encoding= "utf-8" ?
configuration

appSettings
add key="DatabasePath" value="c:\\projects\data\spider.mdb"
add key="SupportEmail" value="webmaster-1@dotnetspider.com"
appSettings

configuration

* And to read from this config file, just use the following code in your application:

string dbPath =
System.Configuration.ConfigurationSettings.AppSettings["DatabasePath"];
string email =
System.Configuration.ConfigurationSettings.AppSettings["SupportEmail"];

ConfigurationSettings is the class used to access the contents of the configuration file. Since this class is part of the namespace System.Configuration, we have to use the fully qualified name System.Configuration.ConfigurationSettings. As a shortcut, you can use the using directive on top of the file like below:

using System.Configuration;

If you have the above directive on top of the file, then you can directly use the class ConfigurationSettings.

string dbPath = ConfigurationSettings.AppSettings["DatabasePath"];
string email = ConfigurationSettings.AppSettings["SupportEmail"];

In VB.NET, you have to use "( ... )" instead of the "[ ... ]"

Note: When you compile your application, VS.NET will automatically create a file called .exe.config in your bin\debug folder. The contents of the app.config will be automatically copied to this new config file when you compile the application. When you deliver the application to the end user, you have to deliver the exe and this new config file called .exe.config and NOT the app.config. Users can modify the data in .exe.config file and application will read the data from the config file, when restarted.

web.config for Windows applications

The web applications use the same concept, but they use a config file with the name web.config. There are couple of things to note in this case.

web.config is created automatically by VS.NET when you create any web project.
When you compile the web application, web.config is NOT renamed or copied to the BIN folder.
web.config has several default entries in it to support web/IIS configuration & security.
You can add the section in the web.config and add your key/value pairs in that section.
You can have separate web.config files for each directory in your web application, in addition to the one in the root. For each web page, by default, system will look for a web.config in the same folder as the page and if not found, then looks in the parent folder.

28.8.09

Combining C# and VB.Net projects in VS2005

Q: Can a C# project be combined with a VB.Net project in VS 2005?

A: You can compile each project separately then combine them together into a single assembly file using the assembly linker (AL.exe). This is a Microsoft utility that installs in the .Net framework folder (C:\Windows\Microsoft.NET\Framework\v1.1.4322).

Another option is to compile one project into a DLL or EXE then reference it from the other project.

10.7.09

Diff Between Web.config & Machine.Config

* What is Web.Config File?

Web.config file, as it sounds like is a configuration file for the Asp .net web application. An Asp .net application has one web.config file which keeps the configurations required for the corresponding application. Web.config file is written in XML with specific tags having specific meanings.

* What is Machine.config File?

As web.config file is used to configure one asp .net web application, same way Machine.config file is used to configure the application according to a particular machine. That is, configuration done in machine.config file is affected on any application that runs on a particular machine. Usually, this file is not altered and only web.config is used which configuring applications.

* What can be stored in Web.config file?

There are number of important settings that can be stored in the configuration file. Here are some of the most frequently used configurations, stored conveniently inside Web.config file..

1. Database connections
2. Session States
3. Error Handling
4. Security

19.6.09

DOTNET Frameworks Difference

.NET Framework 1.0

This is the first release of the .NET Framework, released on 13 February 2002 and available for Windows 98, Me, NT 4.0, 2000, and XP. Mainstream support by Microsoft for this version ended 10 July 2007, and extended support ends 14 July 2009

.NET Framework 1.1

This is the first major .NET Framework upgrade. It is available on its own as a redistributable package or in a software development kit, and was published on 3 April 2003. It is also part of the second release of Microsoft Visual Studio .NET (released as Visual Studio .NET 2003). This is the first version of the .NET Framework to be included as part of the Windows operating system, shipping with Windows Server 2003. Mainstream support for .NET Framework 1.1 ended on 14 October 2008, and extended support ends on 8 October 2013. Since .NET 1.1 is a component of Windows Server 2003, extended support for .NET 1.1 on Server 2003 will run out with that of the OS - currently 14 July 2015.

Changes in 1.1 on comparison with 1.0

* Built-in support for mobile ASP.NET controls. Previously available as an add-on for .NET Framework, now part of the framework.
* Security changes - enable Windows Forms assemblies to execute in a semi-trusted manner from the Internet, and enable Code Access Security in ASP.NET applications.
* Built-in support for ODBC and Oracle databases. Previously available as an add-on for .NET Framework 1.0, now part of the framework.
* .NET Compact Framework - a version of the .NET Framework for small devices.
* Internet Protocol version 6 (IPv6) support.
* Numerous API changes.

.NET Framework 2.0

Released with Visual Studio 2005, Microsoft SQL Server 2005, and BizTalk 2006.

* The 2.0 Redistributable Package can be downloaded for free from Microsoft, and was published on 22 January 2006.
* The 2.0 Software Development Kit (SDK) can be downloaded for free from Microsoft.
* It is included as part of Visual Studio 2005 and Microsoft SQL Server 2005.
* Version 2.0 without any Service Pack is the last version with support for Windows 98 and Windows Me. Version 2.0 with Service Pack 2 is the last version with official support for Windows 2000 although there have been some unofficial workarounds published online to use a subset of the functionality from Version 3.5 in Windows 2000.[18] Version 2.0 with Service Pack 2 requires Windows 2000 with SP4 plus KB835732 or KB891861 update, Windows XP with SP2 or later and Windows Installer 3.1 (KB893803-v2).
* It shipped with Windows Server 2003 R2 (not installed by default).

Changes in 2.0 in comparison with 1.1

* Numerous API changes.
* A new hosting API for native applications wishing to host an instance of the .NET runtime. The new API gives a fine grain control on the behavior of the runtime with regards to multithreading, memory allocation, assembly loading and more (detailed reference). It was initially developed to efficiently host the runtime in Microsoft SQL Server, which implements its own scheduler and memory manager.
* Full 64-bit support for both the x64 and the IA64 hardware platforms.
* Language support for generics built directly into the .NET CLR.
* Many additional and improved ASP.NET web controls.
* New data controls with declarative data binding.
* New personalization features for ASP.NET, such as support for themes, skins and webparts.
* .NET Micro Framework - a version of the .NET Framework related to the Smart Personal Objects Technology initiative.
* Partial classes
* Anonymous methods
* Generics
* Data Tables

.NET Framework 3.0

.NET Framework 3.0, formerly called WinFX,[19] was released on 21 November 2006. It includes a new set of managed code APIs that are an integral part of Windows Vista and Windows Server 2008 operating systems. It is also available for Windows XP SP2 and Windows Server 2003 as a download. There are no major architectural changes included with this release; .NET Framework 3.0 uses the Common Language Runtime of .NET Framework 2.0.[20] Unlike the previous major .NET releases there was no .NET Compact Framework release made as a counterpart of this version.

.NET Framework 3.0 consists of four major new components:

* Windows Presentation Foundation (WPF), formerly code-named Avalon; a new user interface subsystem and API based on XML and vector graphics, which uses 3D computer graphics hardware and Direct3D technologies. See WPF SDK for developer articles and documentation on WPF.
* Windows Communication Foundation (WCF), formerly code-named Indigo; a service-oriented messaging system which allows programs to interoperate locally or remotely similar to web services.
* Windows Workflow Foundation (WF) allows for building of task automation and integrated transactions using workflows.
* Windows CardSpace, formerly code-named InfoCard; a software component which securely stores a person's digital identities and provides a unified interface for choosing the identity for a particular transaction, such as logging in to a website.

.NET Framework 3.5

Version 3.5 of the .NET Framework was released on 19 November 2007, but it is not included with Windows Server 2008. As with .NET Framework 3.0, version 3.5 uses the CLR of version 2.0. In addition, it installs .NET Framework 2.0 SP1, (installs .NET Framework 2.0 SP2 with 3.5 SP1) and .NET Framework 3.0 SP1 (installs .NET Framework 3.0 SP2 with 3.5 SP1), which adds some methods and properties to the BCL classes in version 2.0 which are required for version 3.5 features such as Language Integrated Query (LINQ). These changes do not affect applications written for version 2.0, however.[21]

As with previous versions, a new .NET Compact Framework 3.5 was released in tandem with this update in order to provide support for additional features on Windows Mobile and Windows Embedded CE devices.

The source code of the Base Class Library in this version has been partially released (for debugging reference only) under the Microsoft Reference Source License.[1]

Changes since version 3.0

* New language features in C# 3.0 and VB.NET 9.0 compiler
* Adds support for expression trees and lambda methods
* Extension methods
* Expression trees to represent high-level source code at runtime.[22]
* Anonymous types with static type inference
* Language Integrated Query (LINQ) along with its various providers
o LINQ to Objects
o LINQ to XML
o LINQ to SQL
* Paging support for ADO.NET
* ADO.NET synchronization API to synchronize local caches and server side datastores
* Asynchronous network I/O API[22] .
* Peer-to-peer networking stack, including a managed PNRP resolver[23]
* Managed wrappers for Windows Management Instrumentation and Active Directory APIs[24]
* Enhanced WCF and WF runtimes, which let WCF work with POX and JSON data, and also expose WF workflows as WCF services.[25] WCF services can be made stateful using the WF persistence model.[22]
* Support for HTTP pipelining and syndication feeds.[25]
* ASP.NET AJAX is included
* New System.CodeDom namespace.

Service Pack 1

The .NET Framework 3.5 Service Pack 1 was released on 11 August 2008. This release adds new functionality and provides performance improvements under certain conditions,[26] especially with WPF where 20-45% improvements are expected. Two new data service components have been added, the ADO.NET Entity Framework and ADO.NET Data Services. Two new assemblies for web development, System.Web.Abstraction and System.Web.Routing, have been added; these are used in the ASP.NET MVC Framework and, reportedly, will be utilized in the future release of ASP.NET Forms applications. Service Pack 1 is included with SQL Server 2008 and Visual Studio 2008 Service Pack 1.

There is also a new variant of the .NET Framework, called the ".NET Framework Client Profile", which at 28 MB is a lot smaller than the full framework and only installs components that are the most relevant to desktop applications.[27] However, the Client Profile amounts to this size only if using the online installer. When using the off-line installer, the download size is still 250 MB.[28]

.NET Framework 4.0

Microsoft announced the .NET Framework 4.0 on 29 September 2008. The Public Beta was released on 20 May 2009.[3] Some focuses of this release are:

* Parallel Extensions to improve support for parallel computing, which target multi-core or distributed systems.[29] To this end, they plan to include technologies like PLINQ (Parallel LINQ),[30] a parallel implementation of the LINQ engine, and Task Parallel Library, which exposes parallel constructs via method calls.[31]
* Visual Basic and C# languages innovations such as statement lambdas, implicit line continuations, dynamic dispatch, named parameters, and optional parameters.
* Full support for IronPython, IronRuby, and F#.[32]
* Support for a subset of the .NET Framework and ASP.NET with the "Server Core" variant of Windows Server 2008 R2.[33]
* Support for Code Contracts.
* Inclusion of the Oslo modelling platform, along with the M programming language.[34]

In conjunction with .NET Framework 4.0, Microsoft will offer a set of enhancements, codenamed Dublin, for Windows Server 2008 application server capabilities.[35][36] Dublin will extend IIS to be a "standard host" for applications that use either WCF or WF.[36]

Version==Version Number== Release Date== Visual Studio== Default in Windows
1.0==1.0.3705.0==2002-02-13==Visual Studio .NET
1.1==1.1.4322.573==2003-04-24==Visual Studio .NET 2003==Windows Server 2003
2.0==2.0.50727.42==2005-11-07==Visual Studio 2005
3.0==3.0.4506.30==2006-11-06== ==Windows Vista,Windows Server 2008
3.5==3.5.21022.8==2007-11-19==Visual Studio 2008==Windows 7, Windows Server 2008 R2
4.0 Beta 1== ==2009-05-20==Visual Studio 2010

Source:http://en.wikipedia.org/wiki/.NET_Framework

23.3.09

Differences between Dotnet2.0 and DotNet1.1:

1. Bulk Copy:

Copying of Data from one data source to
another data source in bulk like the sqlBulkCopy, this can
read as Dataset, Data Table and Data Reader. It provides
the fastest way to transfer the Data.

2. Batch Update:

Batch update can provide a huge
improvement in the performance by making just one round
trip to the server for multiple batch updates, instead of
several trips if the database server supports the batch
update feature. The UpdateBatchSize property provides the
number of rows to be updated in a batch. This value can be
set up to the limit of decimal.


3. Data Paging:

Now command object has a new execute
method called ExecutePageReader. This method takes three
parameters - Command Behavior, start Index, and page Size.
So if you want to get rows from 101 - 200, you can simply
call this method with start index as 101 and page size as
100.

4. Connection Details:
Now you can get more details about a
connection by setting Connection's Statistics Enabled
property to True. The Connection object provides two new
methods - Retrieve Statistics and Reset Statistics. The
Retrieve Statistics method returns a Hash Table object
filled with the information about the connection such as
data transferred, user details, curser details, buffer
information and transactions.

5. DataSet.RemotingFormatProperty:

When DataSet.RemotingFormat is set to
binary, the Dataset is serialized in binary format instead
of XML tagged format, which improves the performance of
serialization and deserialization operations significantly

6. Data Table’s Load and Save Methods:

In this Load method can load data
from objects such as XML in to Database objects and can
save them into the persistent data

7. New Controls:

DataGridView, Data Navigator, Data
Connector.

>inbuild webserver ... no need for iis(which is required in 1.0)
>master pages
> themes and skins,
> navigation controls
>login controls
>datasource controls (now gridview with added features when compared to datagrid in 1.0)
>webparts and also some techniques like improved caching techniques, cross page
>partial class,generics
>page directive include additional attributes

Net Framework1.0: -

This is the initial version of Microsoft .NET Framework.

************
.Net Framework 1.1: -

This is the major upgrade to the .NET Framework 1.0 to provide:

1) .NET Compact Framework - a version of the .NET Framework for small devices
2) Internet Protocol version 6 (IPv6) support
3) Built-in support for ODBC and Oracle databases: previously available as an add-on for .NET Framework 1.0, now part of the framework
4) Built-in support for mobile ASP.NET controls: previously available as an add-on for .NET Framework, now part of the framework
5) Security changes: enable Windows Forms assemblies to execute in a semi-trusted manner from the Internet and enable Code Access Security in ASP.NET applications
6) Numerous API changes and many more

************
.Net Framework 2.0: -

This version shipped with Microsoft Windows Server 2003 Release Candidate [RC]. This is the last version with support for Microsoft Windows 2000.

Changes in .NET Framework since 1.1:

1) Full 64-bit support for both the x64 and the IA64 hardware platforms.
2) Language support for Generics built directly into the .NET CLR.
3) Many additional and improved ASP.NET web controls.
4) New data controls with declarative data binding.
5) New personalization features for ASP.NET, such as support for themes, skins and webparts.
6) Numerous API changes and many more.

17.3.09

Differences Between Shadowing and Overriding


When you define a class that inherits from a base class, you sometimes want to redefine one or more of the base class elements in the derived class. Shadowing and overriding are both available for this purpose.
Shadowing and overriding are both used when a derived class inherits from a base class, and both redefine one declared element with another. But there are significant differences between the two.

1 The calling sequence consists of the element type (Function, Sub, Operator, or Property), name, parameter list, and return type. You cannot override a procedure with a property, or the other way around. You cannot override one kind of procedure (Function, Sub, or Operator) with another kind.

2 If you do not specify either Shadows or Overrides, the compiler issues a warning message to help you be sure which kind of redefinition you want to use. If you ignore the warning, the shadowing mechanism is used.

3 If the shadowing element is inaccessible in a further derived class, shadowing is not inherited. For example, if you declare the shadowing element as Private, a class deriving from your derived class inherits the original element instead of the shadowing element.

5.3.09

Authentication in ASP.NET

The .NET Framework uses role-based security and code-based security mechanisms for protecting resources and code from unauthorized use.

Role-based security
Code-based security

in the Core Security Concepts in .NET

The common language runtime (CLR) and .NET Framework provide many useful classes and services that enable developers to easily write secure code and system administrators to customize access to protected resources. The CLR and .NET Framework provide classes and services that implement these basic underlying concepts, including:
· Principals
· Permissions
· Security policies
· Authentication
· Authorization

ASP.NET authentication methods contain the code that is necessary to authenticate the user’s credentials. ASP.NET supports three types of authentication methods. These are
1.Windows-based authentication
2.Forms-based authentication
3.Microsoft Passport authentication

1.---- With Windows-based authentication, the ASP.NET Web application relies on the Windows operating system to authenticate the user. ASP.NET uses Windows-based authentication in conjunction with IIS authentication.
With Windows-based authentication, the user requests a secure Web page from the Web application, and the request then goes through IIS. If the user’s credentials do not match those of an authorized user, IIS rejects the request. The user then has to enter his or her name and password into the logon form. The credentials are again verified by IIS. If correct, IIS directs the original request to the Web application. The secure Web page is then returned to the user
2.------ Forms-based authentication refers to a system where non-authenticated requests are redirected to a Hypertext Markup Language (HTML) form by using Hypertext Transfer Protocol (HTTP) client-side redirection. The user provides credentials and submits the form. If the application validates the credentials on the form, the system issues an authentication cookie to the user. Subsequent requests from the user are issued with the authentication cookie in the request headers, and then the user is authenticated based on those request headers.

3.---- Microsoft Passport authentication is a centralized authentication service that offers a single logon option and core profile services for member sites. Users who sign up to use Passport are authenticated for access to Web sites through a single Passport account. Microsoft Passport is an XML Web service, and it is an integral part of the .NET Framework

16.2.09

LINQ

Basically LINQ address the current database development model in the context of Object Oriented Programming Model. If some one wants to develop database application on .Net platform the very simple approach he uses ADO.Net. ADO.Net is serving as middle ware in application and provides complete object oriented wrapper around the database SQL. Developing application in C# and VB.Net so developer must have good knowledge of object oriented concept as well as SQL, so it means developer must be familiar with both technologies to develop an application. If here I can say SQL statements are become part of the C# and VB.Net code so it’s not mistaken in form of LINQ. According to Anders Hejlsberg the chief architect of C#.

“Microsoft original motivation behind LINQ was to address the impedance mismatch between programming languages and database.”

LINQ has a great power of querying on any source of data, data source could be the collections of objects, database or XML files. We can easily retrieve data from any object that implements the IEnumerableO-tag(T)C-tag interface. Microsoft basically divides LINQ into three areas and that are give below.

LINQ to Object {Queries performed against the in-memory data}
LINQ to ADO.Net
LINQ to SQL (formerly DLinq) {Queries performed against the relation database only Microsoft SQL Server Supported}
LINQ to DataSet {Supports queries by using ADO.NET data sets and data tables}
LINQ to Entities {Microsoft ORM solution}
LINQ to XML (formerly XLinq) { Queries performed against the XML source}

WCS (Windows Card Space) - Design pattern

It is formerly known as the code named "InfoCard" that helps to protect user’s digital identities against spoofing, phishing and tampering. It enables end users to provide digital identity to online services in a simple and trusted way.
Here is how it works…
Instead of authenticating users with passwords, websites authenticate users with security tokens. Submit identity token to the website with just a few clicks of a mouse. The website accepts this token presented by the user, decrypts the token, validates this credential and uses this information internally to identify the user. Cryptographic techniques along with responsible protocols are used for identification of the user. CardSpace includes a self-issued identity provider, which runs on the local Windows system and it can produce information cards just like any other identity provider.
Users download cards from identity providers such as their bank, employer, government agency, membership organization, or create their own self-issued cards. When a Website or Web service requests a user’s credentials, CardSpace will be invoked and allow the user to select a card to present. CardSpace then retrieves a verifiable credential from the selected identity provider, or the self-issuing authority as the case may be, utilizing interoperable protocols. It then forwards the credential to the target application. This provides users with a simple, secure and familiar sign-on experience that is consistent across all Websites and Web services.
We can enjoy the technology, simplicity, consistency and mainly security that Card Space gifts us

WF (Windows Workflow Foundation) - Design Pattern

This is really really very cool features that Microsoft comes up with .net 3.0. With the help of this foundation you can implement any complex Business logic which you could not even think for it. Just within a few hours you can implement few weeks of work. The features are

• Draw the Flow chart and the coding part will be written automatically. Of course you have to feed some line of code

• Represent your logic on document which is actually the code you implement

• No more syntax and commenting for Code, because your logic is in form of Flow charts

• Maintain the State of Object (Application Objects) with the Help of State Chart. Draw the state diagram for your Object and it will reach exactly in the state as per you have drawn with in IDE

• I could not believe on my eyes when I saw the demonstration of Parallel Computing and Multi threading application development. Just to draw the flow chart with some parallel Flow in sequence, that’s all to do. Not to think anything for the thread and multi process management

WCF (Windows Communication Foundation) - Design Pattern

New era for Communication methods for the Distributed application development and Grid Computing with much flexibility that we never have before. This is something they are calling Service Oriented Application Architecture.

• Web service, WSE, Remorting, MSMQ... all of this is now a mapped in single API

• Easy to deploy and integration with Application.

• XML web service access speed will no more issue with the help of WCF

WPF (Windows Presentation Foundation)

New are for Windows Desktop Application UI designing. Following are some of the main features

  • Now onwards there are no WinForm Controls that we are using till .net 2.0. Everything is XML. Whatever you write will be the XML for the desigining. Officially Microsoft gives its name XAML
  • Because of this XML everything you can do in Html pages will now possible in Winform design also
  • Cascading Style like web is possible in Winform also
  • Designer draw the screen in Photoshop just like they where doing for web page. And then you can do the same step as you were doing to convert that layout in html
  • Provides new type of application known as "WPF Browser based application", which can run in Internet Explorer just like the ActiveX and Applets are running
  • 3D modeling.
  • Animation like GIF file can be possible for the windows form.