Major Report On Website Of: Submitted By
Major Report On Website Of: Submitted By
Major Report On Website Of: Submitted By
SUBMITTED BY:-
1
ACKNOWLEDGEMENT
“In the beginning it was an idea
No matter how much enterprising and entrepreneurial one’s thinking is, yet nobody can do
everything all by himself without some help and guidance. It is inhumane if the concerned
person’s assistance goes without appreciation and thanks.
Many individuals have contributed for the completion of this project. For their invaluable
guidance, comments and suggestions, we wish to express our deep sense of indebtedness and
sincerest gratitude to our guide, Mr. Vinod Kumar Verma, AP and co-guide Ms. Usvir Kaur,
Department of Computer Engineering, Sant Longowal Institute of Engineering and Technology
for his invaluable guidance and constructive criticism throughout this dissertation. He has
displayed unique tolerance and understanding at every step of progress and encouraged us
incessantly. We deem it our privilege to have carried out our Dissertation work under his able
guidance.
We express our sincere thanks to Mr. Birmohan Singh, professor & Head, Department of
Computer Engineering for accepting our application and giving us an opportunity to work on
project.
As a final personal note, we are grateful to, our parents, who are inspirational to us in their
understanding, patience and constant encouragement.
2
INDEX
2. Feasibility Study
2.1 Introduction 4
2.2 Types of Feasibility 4
2.3 Software development life cycle 6
3
4. Introduction to SQL Server
4.1 Introduction 47
4.2 Database Design 48
4.3 Database Tables 55
5. E-R Diagrams
5.1 Introduction 58
5.2 ER Diagram of Login Page 59
5.3 ER Diagram of Account and Profile 59
5.4 ER Diagram of Balance Account 60
6. Snapshots
6.1 Admin Level
6.1.1 Admin Home 61
6.1.2 Activate Account 61
6.1.3 Place a Member 62
6.1.4 Select Type of Member 62
6.1.5 Tree View Structure 63
6.1.6 Distribute Profit 63
6.2 Registration 64
6.3 Login Page 65
6.4 User Level
6.4.1 User Profile 66
6.4.2 Update Profile 67
6.4.3 User Earnings 67
6.4.4 User Members 68
7. Summary 69
8. Bibliography 70
9. References 71
4
2. FEASIBILITY STUDY
(2.1) INTRODUCTION:-
Feasibility is the measure of how beneficial or practical the development of the system will be to
the organization. It is a preliminary survey for the systems investigation. It aims to
proinformation to facilitate a later in-depth investigation
The report produced at the end of the feasibility study contains suggestions and reasoned
arguments to help management decide whether to commit further resources to the proposed
project.
Within the scheduled duration we were assigned to study both the positive and negative aspects
of the current manual system, in which we have come up with a number of drawbacks that
prevent the progress of the clinic if it is continued to function manually.
Having gone through all measures of feasibility we report to the management to figure out if the
objectives of the new system are met.
For e.g.: –
Technical Feasibility
Operational Feasibility
Economical Feasibility
Each of these types will be explained in detail throughout the project report.
If we are considering the performance and response time for each task, it is very much faster
since there is less paper work to be completed. When entering data into the system to relieve the
user from additional work and typing incorrect data, the system provides options such as combo
boxes, check boxes, option buttons and etc. if the users type in incorrect data they would be
informed immediately about the error by the error detection control.
Another important fact to be regarded is the security control, which is handled by the system.
Since data regarding each user is confidential, security is a key issue. Here, in this system, data
regarding users is stored in database which can only be accessed by the authorized administrator.
The new system is more user-friendly, which enables the end-user to complete his/her work
efficiently and accurately with interest. After taking the above fact into consideration we can
state the operating of the proposed system within the organization is feasible.
Even though finding out the costs of the proposed project is difficult we assume and estimate the
costs and benefits as follows.
According to the computerized system we propose, the costs can be broken down to two
categories:
6
Software Development Model:
Software engineering is a discipline that integrates process, methods, and tools for the
development of computer software. To solve actual problems in an industry setting, software
engineer or a team of software engineers must incorporate a development strategy that
encompasses, methods, and tools. This strategy is often referred to as a process model or a
software-engineering paradigm.
A number of different process models for the software engineering have been proposed, each
exhibiting strengths and weaknesses, but all having a series of generic phases in common. Some
of the commonly used software process models are:
A particular process model for software engineering is chosen on the nature of the project and
the application at hand, the methods and the tools to be used, and the controls are required.
All software development can be characterized as a problem-solving loop in which four distinct
stages are encountered:
Status Quo
Problem Definition
Technical Development
Solution Integration
Design:
Software design is actually a multi-step process that focuses on four distinct attributes of a
program: data structures, software architecture, interface representations, and procedural
(algorithm) detail. The design process translates requirement into a representation of the software
that can be assessed for quality before code generation begins.
7
Code Generation:
The design must be translated in to a machine-readable form. The testing process focuses on the
logical internals of the software, assuring that all statements have been tested and on the
functional externals that is, conducting tests to uncover errors and ensure that defined inputs will
produce actual results that agree with required results.
Testing:
Once code has been generated, program testing begins. The testing process focuses on the logical
internals of the software, assuring that all statements have been tested and on the functional
externals that is, conducting tests to uncover errors and ensure that defined inputs will produce
actual results that agree with required results.
Maintenance
Software will undoubtedly undergo change after it is delivered to the customer (A possible
exception is embedded software).Change will occur because errors have been encountered,
because the software must be adapted to accommodate change in its external environment (e.g. A
change required because of a new operating system or peripheral device), or because the
customer requires functional or performance enhancements.
8
3. ENVIRONMENT AND TOOLS USED FOR THE SYSTEM
The .NET Framework's Base Class Library provides user interface, data access, database
connectivity, cryptography, web application development, numeric algorithms, and network
communications. Programmers produce software by combining their own source code with the
.NET Framework and other libraries. The .NET Framework is intended to be used by most new
applications created for the Windows platform. Microsoft also produces a popular integrated
development environment largely for .NET software called Visual Studio.
The .NET Framework is an integral Windows component that supports building and running the
next generation of applications and XML Web services. The key components of the .NET
Framework are the common language runtime and the .NET Framework class library, which
includes ADO.NET, ASP.NET, and Windows Forms. The .NET Framework provides a managed
execution environment, simplified development and deployment, and integration with a wide
variety of programming languages.
9
.NET Framework in Context
The .NET Framework is a new computing platform that simplifies application development in
the highly distributed environment of the Internet.
10
To make the developer experience consistent across widely varying types of applications,
such as Windows-based applications and Web-based applications.
To build all communication on industry standards to ensure that code based on the .NET
Framework can integrate with any other code.
Language Independence
The .NET Framework introduces a Common Type System, or CTS. The
CTS specification defines all possible datatypes and programming constructs supported by the
CLR and how they may or may not interact with each other conforming to the Common
Language Infrastructure (CLI) specification. Because of this feature, the .NET Framework
supports the exchange of types and object instances between libraries and applications written
using any conforming .NET language.
11
Simplified Deployment
The .NET Framework includes design features and tools that help manage the installation of
computer software to ensure that it does not interfere with previously installed software, and that
it conforms to security requirements.
Security
The design is meant to address some of the vulnerabilities, such as buffer overflows, that have
been exploited by malicious software. Additionally, .NET provides a common security model for
all applications.
Portability
The design of the .NET Framework allows it theoretically to be platform agnostic, and
thus cross-platform compatible. That is, a program written to use the framework should run
without change on any type of system for which the framework is implemented. While Microsoft
has never implemented the full framework on any system except Microsoft Windows, the
framework is engineered to be platform agnostic, and cross-platform implementations are
available for other operating systems. Microsoft submitted the specifications for the Common
Language Infrastructure (which includes the core class libraries, Common Type System, and
the Common Intermediate Language), the C# language, and the C++/CLI language to
both ECMA and the ISO, making them available as open standards. This makes it possible for
third parties to create compatible implementations of the framework and its languages on other
platform.
12
(3.1.3) Architectural layout of the .NET Framework
CLR is the foundation of the .NET Framework. You can think of the runtime as an agent that
manages code at execution time, providing core services such as memory management, thread
management, and remoting, while also enforcing strict type safety and other forms of code
accuracy that ensure security and robustness. In fact, the concept of code management is a
fundamental principle of the runtime. Code that targets the runtime is known as managed code,
while code that does not target the runtime is known as unmanaged code. The class library, the
other main component of the .NET Framework, is a comprehensive, object-oriented collection of
13
reusable types that you can use to develop applications ranging from traditional command-line or
graphical user interface (GUI) applications to applications based on the latest innovations
provided by ASP.NET, such as Web Forms and XML Web services.
The .NET Framework can be hosted by unmanaged components that load the common language
runtime into their processes and initiate the execution of managed code, thereby creating a
software environment that can exploit both managed and unmanaged features. The .NET
Framework not only provides several runtime hosts, but also supports the development of third-
party runtime hosts.
The .NET Framework class library is a collection of reusable types that tightly integrate with the
common language runtime. The class library is object oriented, providing types from which your
own managed code can derive functionality. This not only makes the .NET Framework types
easy to use, but also reduces the time associated with learning new features of the .NET
14
Framework. In addition, third-party components can integrate seamlessly with classes in the
.NET Framework.
For example, the .NET Framework collection classes implement a set of interfaces that you can
use to develop your own collection classes. Your collection classes will blend seamlessly with
the classes in the .NET Framework.
As you would expect from an object-oriented class library, the .NET Framework types enable
you to accomplish a range of common programming tasks, including tasks such as string
management, data collection, database connectivity, and file access. In addition to these common
tasks, the class library includes types that support a variety of specialized development scenarios.
For example, you can use the .NET Framework to develop the following types of applications
and services:
a) Console applications.
b) Windows GUI applications (Windows Forms).
c) ASP.NET applications.
d) XML Web services.
e) Windows services.
Security
NET has its own security mechanism with two general features: Code Access Security (CAS),
and validation and verification. Code Access Security is based on evidence that is associated
with a specific assembly. Typically the evidence is the source of the assembly (whether it is
installed on the local machine or has been downloaded from the intranet or Internet). Code
Access Security uses evidence to determine the permissions granted to the code. Other code can
demand that calling code is granted a specified permission. The demand causes the CLR to
perform a call stack walk: every assembly of each method in the call stack is checked for the
required permission; if any assembly is not granted the permission a security exception is
thrown. however, has to split the application into subdomains; it is not done by the CLR
Memory management
The .NET Framework CLR frees the developer from the burden of managing memory (allocating
and freeing up when done); instead it does the memory management itself even though there are
no actual guarantees as to when the Garbage Collector will perform its work, unless an explicit
double-call is issued. To this end, the memory allocated to instantiations of .NET types (objects)
is done contiguously from the managed heap, a pool of memory managed by the CLR. As long
as there exists a reference to an object, which might be either a direct reference to an object or
15
via a graph of objects, the object is considered to be in use by the CLR. When there is no
reference to an object, and it cannot be reached or used, it becomes garbage. However, it still
holds on to the memory allocated to it. .NET Framework includes a garbage collector which runs
periodically, on a separate thread from the application's thread, that enumerates all the unusable
objects and reclaims the memory allocated to them.
Since the memory held by garbage is not of any consequence, it is considered free space.
However, this leaves chunks of free space between objects which were initially contiguous. The
objects are then compacted together to make used memory contiguous again. Any reference to an
object invalidated by moving the object is updated to reflect the new location by the GC. The
application is resumed after the garbage collection is over.
The GC used by .NET Framework is actually generational. Objects are assigned a generation;
newly created objects belong to Generation 0. The objects that survive a garbage collection are
tagged as Generation 1, and the Generation 1 objects that survive another collection
are Generation 2 objects. The .NET Framework uses up to Generation 2 objects. Higher
generation objects are garbage collected less frequently than lower generation objects. This helps
increase the efficiency of garbage collection, as older objects tend to have a larger lifetime than
newer objects. Thus, by removing older (and thus more likely to survive a collection) objects
from the scope of a collection run, fewer objects need to be checked and compacted.
ASP.NET is more than the next version of Active Server Pages (ASP); it provides a unified Web
development model that includes the services necessary for developers to build enterprise-class
Web applications. While ASP.NET is largely syntax compatible with ASP, it also provides a
new programming model and infrastructure for more scalable and stable applications that help
16
provide greater protection. You can feel free to augment your existing ASP applications by
incrementally adding ASP.NET functionality to them.
ASP.NET is a compiled, .NET-based environment; you can author applications in any .NET
compatible language, including Visual Basic .NET, C#, and JScript .NET. Additionally, the
entire .NET Framework is available to any ASP.NET application. Developers can easily access
the benefits of these technologies, which include the managed common language runtime
environment, type safety, inheritance, and so on.
ASP.NET has been designed to work seamlessly with WYSIWYG HTML editors and other
programming tools, including Microsoft Visual Studio .NET. Not only does this make Web
development easier, but it also provides all the benefits that these tools have to offer, including a
GUI that developers can use to drop server controls onto a Web page and fully integrated
debugging support.
Developers can use Web Forms or XML Web services when creating an ASP.NET application,
or combine these in any way they see fit. Each is supported by the same infrastructure that allows
you to use authentication schemes, cache frequently used data, or customize your application's
configuration, to name only a few possibilities.
Web Forms allow you to build powerful forms-based Web pages. When building these
pages, you can use ASP.NET server controls to create common UI elements, and
program them for common tasks. These controls allow you to rapidly build a Web Form
out of reusable built-in or custom components, simplifying the code of a page. For more
information, see Web Forms Pages. For information on how to develop ASP.NET server
controls.
An XML Web service provides the means to access server functionality remotely. Using
XML Web services, businesses can expose programmatic interfaces to their data or
business logic, which in turn can be obtained and manipulated by client and server
applications. XML Web services enable the exchange of data in client-server or server-
server scenarios, using standards like HTTP and XML messaging to move data across
firewalls. XML Web services are not tied to a particular component technology or object-
calling convention. As a result, programs written in any language, using any component
model, and running on any operating system can access XML Web services.
Each of these models can take full advantage of all ASP.NET features, as well as the power of
the .NET Framework and .NET Framework common language runtime. These features and how
you can use them are outlined as follows:
If you have ASP development skills, the new ASP.NET programming model will seem
very familiar to you. However, the ASP.NET object model has changed significantly
from ASP, making it more structured and object-oriented. Unfortunately this means that
ASP.NET is not fully backward compatible; almost all existing ASP pages will have to
be modified to some extent in order to run under ASP.NET. In addition, major changes to
Visual Basic .NET mean that existing ASP pages written with Visual Basic Scripting
Edition typically will not port directly to ASP.NET. In most cases, though, the necessary
17
changes will involve only a few lines of code.
ASP.NET provides a simple model that enables Web developers to write logic that runs
at the application level. Developers can write this code in the Global.asax text file or in a
compiled class deployed as an assembly. This logic can include application-level events,
but developers can easily extend this model to suit the needs of their Web application..
ASP.NET provides easy-to-use application and session-state facilities that are familiar to
ASP developers and are readily compatible with all other .NET Framework APIs. For
advanced developers who want to use APIs as powerful as the ISAPI programming
interfaces that were included with previous versions of ASP, ASP.NET offers
theIHttpHandler and IHttpModule interfaces. Implementing the IHttpHandler interface
gives you a means of interacting with the low-level request and response services of the
IIS Web server and provides functionality much like ISAPI extensions, but with a simpler
programming model. Implementing the IHttpModule interface allows you to include
custom events that participate in every request made to your application..
The .NET Framework and ASP.NET provide default authorization and authentication
schemes for Web applications. You can easily remove, add to, or replace these schemes,
18
depending upon the needs of your application.
ASP.NET configuration settings are stored in XML-based files, which are human
readable and writable. Each of your applications can have a distinct configuration file and
you can extend the configuration scheme to suit your requirements.
Applications are said to be running side by side when they are installed on the same
computer but use different versions of the .NET Framework.
IIS 6.0 uses a new process model called worker process isolation mode, which is different
from the process model used in previous versions of IIS. ASP.NET uses this process
model by default when running on Windows Server 2003.
(3.2.1) Some of the most important namespaces in the .NET Framework class library that
pertain to ASP.NET are the following:
System.Web:
Provides classes and interfaces that enable browser-server communication. This namespace
includes the HttpRequest class, which provides extensive information about the current HTTP
request, the HttpResponse class, which manages HTTP output to the client, and
the HttpServerUtility class, which provides access to server-side utilities and
processes. System.Web also includes classes for cookie manipulation, file transfer, exception
information, and output cache control.
System.Web.ApplicationServices:
Provides classes that provide access to ASP.NET forms authentication, roles, and profiles
application services as Windows Communication Foundation (WCF) services.
System.Runtime.Caching:
Contains types that let you implement caching in .NET Framework applications.
System.Web.ClientServices:
Contains classes that support access to the ASP.NET login, roles, and profiles services from
Windows-based applications.
System.Web.Configuration:
Contains classes that are used to programmatically manage ASP.NET configuration. (Most
configuration settings can be made in XML files.)
System.Web.DynamicData:
Contains classes that provide the core functionality for ASP.NET dynamic data and extensibility
features that let you customize dynamic data behavior.
19
System.Web.Handlers:
Contains HTTP handler classes that process HTTP requests to a Web server. (An ASP.NET Web
Forms page -- .aspx file -- is a special form of an HTTP handler.)
System.Web.Management:
Contains classes and interfaces for managing and monitoring the health of Web applications.
System.Web.Profile:
Contains classes that are used to implement the ASP.NET user profile in Web server
applications.
System.Web.Query.Dynamic:
Contains classes that are used to parse expressions from a LinqDataSource control into a
Language-Integrated Query (LINQ).
System.Web.RegularExpressions:
Provides regular expressions that are used to parse ASP.NET files. All members of
the System.Web.RegularExpressions namespace are descendants of the Regex class. (You typically
do not have to parse ASP.NET pages yourself.)
System.Web.Routing:
Provides classes that are used with URL routing, which enables you to use URLs that do not map
to a physical file.
System.Web.Script:
Contains classes that provide client-script resource information.
System.Web.Script.Services:
Provides attributes to customize Web service support for using Ajax functionality in ASP.NET.
System.Web.Security:
Contains classes that are used to implement ASP.NET security in Web server applications.
System.Web.Services:
Consists of the classes that enable you to create XML Web services using ASP.NET and XML
Web service clients. XML Web services are applications that provide the ability to exchange
messages in a loosely coupled environment using standard protocols such as HTTP, XML, XSD,
SOAP, and WSDL. XML Web services let you build modular applications that are interoperable
across a broad variety of implementations, platforms, and devices.
System.Web.SessionState:
Contains classes and interfaces that enable storage of data specific to a single client during a
single browser session on the server. Session state data is used to give the client the appearance
of a persistent connection with the application.
20
System.Web.UI:
Provides classes and interfaces that enable you to create ASP.NET server controls and ASP.NET
Web pages for the user interface of your ASP.NET Web applications. This namespace includes
the Control class, which provides all HTML server controls, Web server controls, and user
controls with a common set of functionality. It also includes the Page control, which is generated
automatically whenever a request is made for an .aspx file in an ASP.NET Web application. Also
included are classes which provide the server controls with data-binding functionality, the ability
to save the view state of a given control or page, and parsing functionality.
System.Web.UI.DataVisualization.Charting:
Contains types for the Chart Web server control.
System.Web.UI.Design.WebControls:
Contains classes that can be used to extend design-time support for Web server controls.
System.Web.UI.Design.WebControls.WebParts:
Contains classes that provide design-time support for controls derived from classes in
the System.Web.UI.WebControls.WebParts namespace.
System.Web.UI.HtmlControls:
Contains a collection of classes that enable you to create HTML server controls on a Web Forms
page. HTML server controls run on the server and map directly to standard HTML tags
supported by most browsers. This enables you to programmatically control the HTML elements
on a Web Forms page.
System.Web.UI.WebControls:
Contains classes that enable you to create Web server controls on a Web page. Web server
controls run on the server and include form controls such as buttons and text boxes. They also
include special-purpose controls such as a calendar. Because Web server controls run on the
server, you can programmatically control these elements. Web server controls are more abstract
than HTML server controls. Their object model does not necessarily reflect HTML syntax.
System.Web.UI.WebControls.WebParts:
Contains an integrated set of classes and interfaces for creating Web pages whose appearance
and behavior can be modified (personalized) by end users. The user-defined settings for each
page are saved for future browser sessions.
System.Web.Util:
Contains classes that enable callback methods to be run under the scope of a transaction and that
enable work to be posted to separate threads.
21
(3.2.2) Page and Control Framework:
The ASP.NET page and controls framework is a programming framework that runs on a Web
server to dynamically produce and render ASP.NET Web pages. ASP.NET Web pages can be
requested from any browser or client device, and ASP.NET renders markup (such as HTML) to
the requesting browser. As a rule, you can use the same page for multiple browsers, because
ASP.NET renders the appropriate markup for the browser making the request. However, you can
design your ASP.NET Web page to target a specific browser and take advantage of the features
of that browser.
ASP.NET Web pages are completely object-oriented. Within ASP.NET Web pages you can
work with HTML elements using properties, methods, and events. The ASP.NET page
framework removes the implementation details of the separation of client and server inherent in
Web-based applications by presenting a unified model for responding to client events in code
that runs at the server. The framework also automatically maintains the state of a page and the
controls on that page during the page processing life cycle. For more information
The ASP.NET page and controls framework also enables you to encapsulate common UI
functionality in easy-to-use, reusable controls. Controls are written once, can be used in many
pages, and are integrated into the ASP.NET Web page that they are placed in during rendering.
The ASP.NET page and controls framework also provides features to control the overall look
and feel of your Web site via themes and skins. You can define themes and skins and then apply
them at a page level or at a control level..
In addition to themes, you can define master pages that you use to create a consistent layout for
the pages in your application. A single master page defines the layout and standard behavior that
you want for all the pages (or a group of pages) in your application. You can then create
individual content pages that contain the page-specific content you want to display. When users
request the content pages, they merge with the master page to produce output that combines the
layout of the master page with the content from the content page.
The ASP.NET page framework also enables you to define the pattern for URLs that will be used
in your site. This helps with search engine optimization (SEO) and makes URLs more user-
friendly..
The ASP.NET page and control framework is designed to generate HTML that conforms to
accessibility guidelines.
In order for application code to service requests by users, ASP.NET must first compile the code
into one or more assemblies. Assemblies are files that have the file name extension .dll. You can
write ASP.NET code in many different languages, such as Visual Basic, C#, J#, and others.
When the code is compiled, it is translated into a language-independent and CPU-independent
representation called Microsoft Intermediate Language (MSIL). At run time, MSIL runs in the
22
context of the .NET Framework, which translates MSIL into CPU-specific instructions for the
processor on the computer running the application.
Automatic Compilation:
ASP.NET automatically compiles your application code and any dependent resources the first
time a user requests a resource from the Web site. In general, ASP.NET creates an assembly for
each application directory (such as App_Code) and one for the main directory. (If files in a
directory are in different programming languages, then separate assemblies will be created for
each language.) You can specify which directories are compiled into single assemblies in
the Compilation section of the Web.config file.
Flexible Deployment
Because ASP.NET compiles your Web site on first user request, you can simply copy your
application's source code to the production Web server. However, ASP.NET also provides
23
precompilation options that allow you to compile your Web site before it has been deployed, or
to compile it after it has been deployed but before a user requests it. Precompilation has several
advantages. It can improve the performance of your Web site on first request because there will
be no lag time while ASP.NET compiles the site. Precompiling can also help you find errors that
might otherwise be found only when a user requests a page. Finally, if you precompile the Web
site before you deploy it, you can deploy the assemblies instead of the source code.
You can precompile a Web site using the ASP.NET compiler tool (ASPNET_Compiler.exe).
The tool that provides the following precompilation options:
In-place compilation This option performs the same compilation that occurs during
dynamic compilation. Use this option to compile a Web site that has already been
deployed to a production server.
Non-updateable full precompilation Use this to compile an application and then copy
the compiled output to the production server. All application code, markup, and UI code is
compiled into assemblies. Placeholder files such as .aspx pages still exist so that you can
perform file-specific tasks such as configure permissions, but the files contain no
updateable code. In order to update any page or any code you must precompile the Web
site again and deploy it again.
Updateable precompilation This is similar to non-updateable full precompilation,
except that UI elements such as .aspx pages and .ascx controls retain all their markup, UI
code, and inline code, if any. You can update code in the file after it has been deployed;
ASP.NET will detect changes to the file and recompile it. Note that code in a code-behind
file (.vb or .cs file) built into assemblies during precompilation, and you therefore cannot
change it without going through the precompilation and deployment steps again..
(3.2.4)ASP.NET Security:
Security is a very important aspect of ASP.NET Web applications. The topics in this section
provide background information about security issues that occur in Web applications. The topics
include information about how to mitigate common security threats, how to protect resources in
a Web application, and about how to authenticate and authorize individual users.
ASP.NET Web Application Security:
ASP.NET, in conjunction with Microsoft Internet Information Services (IIS), can authenticate
user credentials such as names and passwords using any of the following authentication methods:
Windows: Basic, digest, or Integrated Windows Authentication (NTLM or Kerberos).
24
Forms authentication, in which you create a login page and manage authentication in
your application.
Client Certificate authentication
ASP.NET membership enables you to manage user authentication for your application while
keeping the user information in the data source of your choice. Because ASP.NET membership
uses providers to the membership data source, it does not require extensive code to read and
write membership information.
Which language is the "best" language choice? If you are a VB wizard, should you take
the time to learn C# or continue to use VB.NET? Are C# ASP.NET pages "faster" than
VB .NET ASP.NET pages? These are questions that you may find yourself asking,
especially when you're just starting to delve into .NET. Fortunately the answer is simple:
there is no "best" language. All .NET languages use, at their root, functionality from the
set of classes provided by the .NET Framework. Therefore, everything
you can do in VB.NET you can do in C#, and vice-a-versa.
The differences occur in three main areas: syntax, object-oriented principles, and the
Visual Studio .NET IDE. Syntax concerns the statements and language elements. Object
Oriented differences are less obvious, and concern differences in implementation and
feature sets between the two languages. IDE differences include things like compiler
settings or attributes. There is also a fourth area of difference: language features that are
present in one language but have no equivalent in the other.
25
If you are more familiar with Java, JScript, or C/C++, you may find C#'s syntax more
familiar than VB.NET's.
A good question that has to be answered in order to keep you interested in learning C# is
Why should you learn another programming language when you already doing enterprise
development in C++ or Java. The very answer at the first go will be C# is intended to be
the premier language for writing NGWS (Next Generation of Windows Services)
applications in the enterprise computing world.
The programming language C# derives from C and C++; however apart from being
entirely object oriented it is type safe and simple too. If you are a C/C++ programmer
your learning curve should be flat. Many C# statements including expressions and
operators have been taken directly taken from your favourite language
An important point about C# is that it simplifies and modernizes C++ in the areas of
classes, namespaces and exception handling. Much of complex features have not been
included or in fact hidden in C# to make it easer to use and more importantly less error
prone for e.g. no more macros, templates and no multiple inheritances (Few of you might
not like it.)
The only expense that I can think of is that your code operates in safe mode, where no
pointers are allowed. However if you want to use pointers you are not restricted from
using it via unsafe code- and no marshalling is involved when calling the unsafe code.
(3.3.2) About C#
C# is an elegant and type-safe object-oriented language that enables developers to build a wide
range of secure and robust applications that run on the .NET Framework. You can use C# to
create traditional Windows client applications, XML Web services, distributed components,
client-server applications, database applications, and much, much more. Microsoft Visual C#
2005 provides an advanced code editor, convenient user interface designers, integrated debugger,
and many other tools to facilitate rapid application development based on version 2.0 of the C#
language and the .NET Framework.
C# syntax is highly expressive, yet with less than 90 keywords, it is also simple and easy to
learn. The curly-brace syntax of C# will be instantly recognizable to anyone familiar with C,
C++ or Java. Developers who know any of these languages are typically able to begin working
productively in C# within a very short time. C# syntax simplifies many of the complexities of
C++ while providing powerful features such as nullable value types, enumerations, delegates,
anonymous methods and direct memory access, which are not found in Java. C# also supports
generic methods and types, which provide increased type safety and performance, and iterators,
which enable implementers of collection classes to define custom iteration behaviors that are
simple to use by client code.
26
As an object-oriented language, C# supports the concepts of encapsulation, inheritance and
polymorphism. All variables and methods, including the Main method, the application's entry
point, are encapsulated within class definitions. A class may inherit directly from one parent
class, but it may implement any number of interfaces. Methods that override virtual methods in a
parent class require the override keyword as a way to avoid accidental redefinition. In C#, a
struct is like a lightweight class; it is a stack-allocated type that can implement interfaces but
does not support inheritance.
If you need to interact with other Windows software such as COM objects or native Win32
DLLs, you can do this in C# through a process called "Interop." Interop enables C# programs to
do just about anything that a native C++ application can do. C# even supports pointers and the
concept of "unsafe" code for those cases in which direct memory access is absolutely critical.
The C# build process is simple compared to C and C++ and more flexible than in Java. There are
no separate header files, and no requirement that methods and types be declared in a particular
order. A C# source file may define any number of classes, structs, interfaces, and events.
C# programs run on the .NET Framework, an integral component of Windows that includes a
virtual execution system called the common language runtime (CLR) and a unified set of class
libraries. The CLR is Microsoft's commercial implementation of the common language
infrastructure (CLI), an international standard that is the basis for creating execution and
development environments in which languages and libraries work together seamlessly.
Source code written in C# is compiled into an intermediate language (IL) that conforms to the
CLI specification. The IL code, along with resources such as bitmaps and strings, is stored on
disk in an executable file called an assembly, typically with an extension of .exe or .dll. An
assembly contains a manifest that provides information on the assembly's types, version, culture,
and security requirements.
When the C# program is executed, the assembly is loaded into the CLR, which might take
various actions based on the information in the manifest. Then, if the security requirements are
met, the CLR performs just in time (JIT) compilation to convert the IL code into native machine
instructions. The CLR also provides other services related to automatic garbage collection,
exception handling, and resource management. Code that is executed by the CLR is sometimes
referred to as "managed code," in contrast to "unmanaged code" which is compiled into native
machine language that targets a specific system. The following diagram illustrates the compile-
27
time and run time relationships of C# source code files, the base class libraries, assemblies, and
the CLR.
Language interoperability is a key feature of the .NET Framework. Because the IL code
produced by the C# compiler conforms to the Common Type Specification (CTS), IL code
generated from C# can interact with code that was generated from the .NET versions of Visual
Basic, Visual C++, Visual J#, or any of more than 20 other CTS-compliant languages. A single
assembly may contain multiple modules written in different .NET languages, and the types can
reference each other just as if they were written in the same language.
In addition to the run time services, the .NET Framework also includes an extensive library of
over 4000 classes organized into namespaces that provide a wide variety of useful functionality
for everything from file input and output to string manipulation to XML parsing, to Windows
Forms controls. The typical C# application uses the .NET Framework class library extensively to
handle common "plumbing" chores.
28
3.3.3 Statements:
In C#, a complete program instruction is called a statement and each statement ends with a
semicolon (;) . Programs consist of sequences of statements such as:
int myVariable; // a statement
myVariable = 23; // another statement
int anotherVariable = myVariable; // yet another statement
The compiler starts at the beginning of a source code file and reads down, executing statement
after statement in the order encountered. This would be entirely straightforward, and terribly
limiting, were it not for branching . Branching allows you to change the order in which
statements are evaluated.
Types come in two flavors: those that are built into the language (intrinsic types ) and those you
create . C# offers a number of intrinsic types, show in table
29
Table . The intrinsic types
C# type Size (in bytes) .NET type Description
double Double-precision floating point; holds the
values from approximately +/-5.0 * 10-324
8 Double
to approximately +/-1.8 * 10308 with 1516
significant figures.
decimal Fixed-precision up to 28 digits and the
position of the decimal point. This is
12 Decimal
typically used in financial calculations.
Requires the suffix "m" or "M."
long Signed integers ranging from -
8 Int64 9,223,372,036,854,775,808 to
9,223,372,036,854,775,807.
ulong Unsigned integers ranging from 0 to
8 UInt64
approximately 1.85 * 1019.
Each type has a name (such as int) and a size (such as 4 bytes). The size tells you how many
bytes each object of this type occupies in memory. (Programmers generally don't like to waste
memory if they can avoid it, but with the cost of memory these days, you can afford to be mildly
profligate if doing so simplifies your program.) The description field of tells you the minimum
and maximum values you can hold in objects of each type.
3.3.5 Variables
A variable is an instance of an intrinsic type (such as int) that can hold a value:
int myVariable = 15;
You initialize a variable by writing its type, its identifier, and then assigning a value to that
variable.An identifier is just an arbitrary name you assign to a variable, method, class, or other
element. In this case, the variable's identifier is myVariable.You can define variables without
initializing them:
int myVariable;
You can also change the value of a variable later in the program. That is why they're called
variables; their values can vary.
int myVariable;
myVariable = 15;
myVariable = 12; // now it is 12
30
3.3.6 Constants:
Variables are a powerful tool, but there are times when you want to manipulate a defined value,
one whose value you want to ensure remains constant. A constant is like a variable in that it can
store a value. However, unlike a variable, you cannot change the value of a constant while the
program runs.For example, you might need to work with the Fahrenheit freezing and boiling
points of water in a program simulating a chemistry experiment. Your program will be clearer if
you name the variables that store these values FreezingPoint and BoilingPoint, but you do not
want to permit their values to be changed while the program is executing. The solution is to use
a constant. Constants come in three flavors: literals, symbolic constants , and enumerations .
This is similar to declaring a variable, except that you start with the keyword const and
symbolic constants must be initialized. Once initialized, a symbolic constant cannot be altered.
For example, in the following declaration, 32 is a literal constant and FreezingPoint is a
symbolic constant of type int:
3.3.6.3. Enumerations:
Enumerations provide a powerful alternative to literal or simple symbolic constants. An
enumeration is a distinct value type, consisting of a set of named constants (called the
enumerator list).you created two related constants:
You might want to add a number of other useful constants to this list as well, such as:
31
const int WickedCold = 0;
Notice, however, that this process is somewhat cumbersome; also, this syntax shows no logical
connection among these various constants. C# provides an alternate construct, the enumeration,
which allows you to group logically related constants, as in the following:
enum Temperatures
{
WickedCold = 0,
FreezingPoint = 32,
LightJacketWeather = 60,
SwimmingWeather = 72,
BoilingPoint = 212,
}
3.3.7 Strings:
It is nearly impossible to write a C# program without creating strings . A string object holds a
series of characters.You declare a string variable using the string keyword much as you would
create an instance of any type:
string myString;
You specify a string literal by enclosing it in double quotes:
"Hello World"
It is common to initialize a string variable that contains a string literal:
string myString = "Hello World";
3.3.8 Expressions
Statements that evaluate to a value are called expressions . You may be surprised how many
statements do evaluate to a value. For example, an assignment such as:
myVariable = 57;
is an expression; it evaluates to the value assignedin this case, 57.
Because myVariable = 57 is an expression that evaluates to 57, it can be used as part of another
assignment, such as:
mySecondVariable = myVariable = 57;
What happens in this statement is that the literal value 57 is assigned to the variable
myVariable. The value of that assignment (57) is then assigned to the second variable,
mySecondVariable. Thus, the value 57 is assigned to both variables. You can assign a value to
any number of variables with one statement using the assignment operator (=), as in the
following:
int a,b,c,d,e;
a = b = c = d = e = 20;
32
Net Architecture and the .Net Framework:
In the .Net Architecture and the .Net Framework there are different important terms and concepts
which we will discuss one by one.
Common Language Runtime (CLR):
The most important concept of the .Net Framework is the existence and functionality of the Net
Common Language Runtime (CLR), also called .Net Runtime in short. It is a framework.layer
that resides above the OS and handles the execution of all the .Net applications. Our programs
don't directly communicate with the OS but go through the CLR.
33
JITers can make your code even faster than C++ code in some cases when the program is run
over an extended period of time (like web-servers).
34
Garbage Collector (GC) :
CLR also contains the Garbage Collector (GC), which runs in a low-priority thread and checks
for un-referenced, dynamically allocated memory space. If it finds some data that is no longer
referenced by any variable/reference, it re-claims it and returns it to the OS so it can be used by
other programs as needed. The presence of a standard Garbage Collector frees the programmer
from keeping track of dangling data.
(3.4.4) Basic Data Types and their mapping to the CTS (Common Type System)
There are two kinds of data types in VB.Net
1. Value type (implicit data types, Structure and Enumeration)
2. Reference Type (objects, delegates)
Value types are passed to methods by passing an exact copy while Reference types are passed to
methods by passing only their reference (handle). Implicit data types are defined in the language
core by the language vendor, while explicit data types are types that are made by using or
composing implicit data types.Implicit data types in .net compliant languages are mapped to
types in Common Type System (CTS) and CLS (Common Language Specification). Hence, each
implicit data type in VB.Net has its corresponding .Net type. The implicit data types in VB.Net
are:
1. Boolean
2. Char
3. Byte
4. Short
5. Integer(default)
6. Long
7. Single
8. Double(default)
9. Decimal
Implicit data types are represented in language using 'keywords'; so each of above is a keyword
in VB.Net (Keyword are the words defined by the language and can not be used as identifiers). It
is worth-noting that string is also an implicit data type in VB.Net, so String is a keyword in
VB.Net. Last point about implicit data types is that they are value types and thus stored at the
stack, while user defined types or referenced types are stored at heap. Stack is a data structure
that store items in last in first out (LIFO) fashion. It is an area of memory supported by the
processor and its size is determined at the compile time. Heap is the total memory available at
35
run time. Reference types are allocated at heap dynamically (during the execution of program).
Garbage collector searches for non-referenced data in heap during the execution of program and
returns that space to Operating System.
(4.1) INTRODUCTION
Microsoft SQL Server is a relational model database server produced by Microsoft. Its primary
query languages are T-SQL and ANSI SQL. The current version of SQL Server, SQL Server
2008, (code-named "Katmai",) was released (RTM) on August 6, 2008and aims to make data
management self-tuning, self organizing, and self maintaining with the development of SQL
Server Always On technologies, to provide near-zero downtime. SQL Server 2008 also includes
support for structured and semi-structured data, including digital media formats for pictures,
audio, video and other. multimedia data. In current versions, such multimedia data can be stored
as BLOBs (binary large objects), but they are generic bit streams. Intrinsic awareness of
multimedia data will allow specialized functions to be performed on them. According to Paul
Flessner, senior Vice President, Server Applications, Microsoft Corp., SQL Server 2008 can be a
data storage backend for different varieties of data: XML, email, time/calendar, file, document,
spatial, etc as well as perform search, query, analysis, sharing, and synchronization across all
data types.
Other new data types include specialized date and time types and a Spatial data type for location-
dependent data. Structured data and metadata about the file is stored in SQL Server database,
whereas the unstructured component is stored in the file system. Such files can be accessed both
via Win32 file handling APIs as well as via SQL Server using T-SQL; doing the latter accesses
the file data as a BLOB. Backing up and restoring the database backs up or restores the
referenced files as well. SQL Server 2008 also natively supports hierarchical data, and includes
T-SQL constructs to directly deal with them, without using recursive queries.
The Full-Text Search functionality has been integrated with the database engine, which
simplifies management and improves performance. Spatial data will be stored in two types. A
"Flat Earth" (GEOMETRY or planar) data type represents geospatial data which has been
projected from its native, spherical, coordinate system into a plane. A "Round Earth" data type
36
(GEOGRAPHY) uses an ellipsoidal model in which the Earth is defined as a single continuous
entity which does not suffer from the singularities such as the international dateline, poles, or
map projection zone "edges". Approximately 70 methods are available to represent spatial
operations for the Open Geospatial Consortium Simple Features for SQL, Version 1.1.SQL
Server includes better compression features, which also helps in improving scalability. It also
includes Resource Governor that allows reserving resources for certain users or workflows. It
also includes capabilities for transparent encryption of data as well as compression of backups.
SQL Server 2008 supports the ADO.NET Entity Framework and the reporting tools, replication,
and data definition will be built around the Entity Data Model. SQL Server Reporting Services
will gain charting capabilities from the integration of the data visualization products from
Dundas Data Visualization Inc., which was acquired by Microsoft. On the management side,
SQL Server 2008 includes the Declarative Management Framework which allows configuring
policies and constraints, on the entire database or certain tables, declaratively. The version of
SQL Server Management Studio included with SQL Server 2008 supports IntelliSense for SQL
Queries against a SQLServer2008 Database
Enginehttp://en.wikipedia.org/wiki/Microsoft_SQL_Server - cite_note-14. SQL Server 2008 also
makes the databases available via Windows Power Shell providers and management
functionality available as Cmdlets, so that the server and all the running instances can be
managed from Windows PowerShell. SQL Server 2008 R2.
SQL Server 2008 R2 :(formerly codenamed SQL Server "Kilimanjaro") was announced at
TechEd 2009. SQL Server 2008 R2 adds certain features to SQL Server 2008 including master
data management system branded as Master Data Services, a centralized console to manage
multiple SQL Server instances, and support for more than 64 logical processors.
Another way:-
The following steps demonstrate how to create a database in SQL Server using Enterprise
Manager.
37
Creating new Databse
38
1. Name your database and click "OK":
New database is based on the "Model" database. The Model database is a system database which
is used as a template whenever a new database is created. If we use the left pane to navigate to
our database and expand the tree, we will notice that our database already contains a number of
objects. For example, it already contains tables, views, and stored procedures. These are system
objects which provide information about the database.
39
Default data files in the database
We have just created a database using the default options. When we created the database, a "Data
File" and a "Transaction Log" were created. They were created in the default location for our
server.
If we'd wanted to, we could have specified a different location for these files by using the "Data
Files" tab and "Transaction Log" tab. We also could have changed specifications on whether to
allow the file to grow automatically (as it stores more and more data), and if so, how that growth
should be managed.
40
Properties of data base
Another way:-1.Ensuring you have the right database expanded, right click on the "Tables" icon
and select "New Table...":
41
Creating tables in the database
While you have this screen open, do the following: Using the values in the screenshot, complete
the details in the "Column Name" column, the "Data Type" column, "Length" column, and
"Allow Nulls" column.
Make the IndividualId column an "identity column", by setting "Identity" to "Yes" (just use the
same values as in the screenshot). Note that to set values in the bottom pane, you need to select
the column name in the top pane first). This column is going to be an auto-number column - it
will contain an incrementing number for each record that is created.
Set the "Default Value" of the DateCreated column to (getdate()). (This will automatically insert
the current date into that field for each new record).
Design of a table
What we are doing at this stage, is creating the column names, specifying the type of data that
can be entered into them, and setting default values. Restricting the data type for each column is
very important and helps maintain data integrity. For example, it can prevent us from
accidentally entering an email address into a field for storing the current date.
42
Close the table by clicking the close icon, and when prompted, name your table:
We can use Enterprise Manager to add data - all we need to do is open the table, then start
typing.
1. To open the table, right click on the table you wish to open, and select "Open Table >
Return all rows":
Opening of a table
2. You can now start entering the data directly into your table.
43
5. E-R DIAGRAMS
(5.1)E-R Diagrams:
Entity-relationship model, a graphical representation of entities and their relationships to each
other, typically used in computing in regard to the organization of data within databases or
information systems. An entity is a piece of data-an object or concept about which data is stored.
A relationship is how the data is shared between entities
Entity:
An entity type is any type of object that we wish to store data about. Which entity types you
decide to include on your diagram depends on your application. In an accounting application for
a business you would store data about customers, suppliers, products, invoices and payments and
if the business manufactured the products, you would need to store data about materials and
production steps. Each of these would be classified as an entity type because you would want to
store data about each one.
An entity type is considered to be a set of objects. For this reason some people use the alternative
term entity set. An entity is simply one member or example or element or instance of the type or
set. So an entity is one individual within an entity type.
Attributes:
The data that we want to keep about each entity within an entity type is contained in attributes.
An attribute is some quality about the entities that we are interested in and want to hold on the
database. In fact we store the value of the attributes on the database. Each entity within the entity
type will have the same set of attributes, but in general different attribute values.
44
7. Summary
45
46