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.
23.3.09
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
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}
“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
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
• 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
• 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.
30.10.08
Static Constructors
A static constructor is used to initialize any static data, or to perform a particular action that needs performed once only. It is called automatically before the first instance is created or any static members are referenced.
Static constructors have the following properties:
Static constructors have the following properties:
- A static constructor does not take access modifiers or have parameters.
- A static constructor is called automatically to initialize the class before the first instance is created or any static members are referenced.
- A static constructor cannot be called directly.
- The user has no control on when the static constructor is executed in the program.
- A typical use of static constructors is when the class is using a log file and the constructor is used to write entries to this file.
- Static constructors are also useful when creating wrapper classes for unmanaged code, when the constructor can call the LoadLibrary method.
Sample Code
public class Bus
{
// Static constructor:
static Bus()
{
System.Console.WriteLine("The static constructor invoked.");
}
public static void Drive()
{
System.Console.WriteLine("The Drive method invoked.");
}
}
class TestBus
{
static void Main()
{
Bus.Drive();
}
}
Sample Try - Catch in SQL 2005
begin tran Tran_DeleteAll
begin try
--Sample code
end try
begin catch
set @EMessage = @ProcedureName + ':' + ERROR_MESSAGE()
execute dbo.SPname @arg1,@arg2, 1, NULL, NULL, 2
rollback tran Tran_DeleteAll
end catch
begin try
--Sample code
end try
begin catch
set @EMessage = @ProcedureName + ':' + ERROR_MESSAGE()
execute dbo.SPname @arg1,@arg2, 1, NULL, NULL, 2
rollback tran Tran_DeleteAll
end catch
Subscribe to:
Posts (Atom)