© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 The SqlConnection Object ADO.NET - Lesson 02  Training time: 10 minutes 

Slides:



Advertisements
Similar presentations
CREATE LOGIN James WITH PASSWORD = 'A' Answer: SQL 2005 and 2008 can enforce the password policy of the operating system. CREATE LOGIN James WITH PASSWORD.
Advertisements

Unauthorized Reproduction Prohibited SkyPoint Alarm Integration Add-On Using OnGuard Alarms to create events in SkyPoint Also called ‘SkyPoint V0’ CR4400.
CSI 400/500 Operating Systems Spring 2009 Lecture #20 – Security Measures Wednesday, April 29 th.
Chapter 16 AAA. AAA Components  AAA server –Authenticates users accessing a device or network –Authorizes user to perform specific activities –Performs.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Jonas Thomsen, Ph.d. student Computer Science University of Aarhus Best Practices and Techniques for Building Secure Microsoft.
VMware vCenter Server Module 4.
Installing Samba Vicki Insixiengmay Jonathan Krieger.
Installing a DHCP Server role on Windows Server 2008 R2 in a home network. This is intended as a guide to install the DHCP role on a Domain Controller.
Edwin Sarmiento Microsoft MVP – Windows Server System Senior Systems Engineer/Database Administrator Fujitsu Asia Pte Ltd
Copyright © 2007, SAS Institute Inc. All rights reserved. SAS Activity-Based Management Survey Kit (ASK): User Management & Security.

Session 5: Working with MySQL iNET Academy Open Source Web Development.
Introduction to SQL Server 2000 Security Dave Watts CTO, Fig Leaf Software
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
Virtual techdays INDIA │ august 2010 SQL Azure – Tips and Tricks Ramaprasanna Chellamuthu │ Developer Evangelist, Microsoft.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Securing a Microsoft ASP.NET Web Application.
Learningcomputer.com SQL Server 2008 Configuration Manager.
1 Web services and security ---discuss different ways to enforce security Presenter: Han, Xue.
Module 9 Authenticating and Authorizing Users. Module Overview Authenticating Connections to SQL Server Authorizing Logins to Access Databases Authorization.
.Net and Web Services Security CS795. Web Services A web application Does not have a user interface (as a traditional web application); instead, it exposes.
Module 5 Configuring Authentication. Module Overview Lesson 1: Understanding Classic SharePoint Authentication Providers Lesson 2: Understanding Federated.
SQL Server Security By Mattias Lind For PASS Security VC.
User Access to Router Securing Access.
Kerberos Named after a mythological three-headed dog that guards the underworld of Hades, Kerberos is a network authentication protocol that was designed.
Database, SQL, and ADO.NET- Part 1 Session 11 Mata kuliah: M0874 – Programming II Tahun: 2010.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with Disconnected Data The DataSet and SqlDataAdapter ADO.NET - Lesson.
Module 4 : Installation Jong S. Bok
Dr. Mustafa Cem Kasapbaşı Security in ASP.NET. Determining Security Requirements Restricted File Types.
M1G Introduction to Database Development 2. Creating a Database.
ASP.NET The Clock Project. The ASP.NET Clock Project The ASP.NET Clock Project is the topic of Chapter 23. By completing the clock project, you will learn.
Session 8: ADO.NET. Overview Overview of ADO.NET What is ADO.NET? Using Namespaces The ADO.NET Object Model What is a DataSet? Accessing Data with ADO.NET.
Module 11: Securing a Microsoft ASP.NET Web Application.
Slide 1 ASP Authentication There are basically three authentication modes Windows Passport Forms There are others through WCF You choose an authentication.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Introduction to ADO.NET ADO.NET - Lesson 01  Training time: 10 minutes  Author:
Chapter 3: Authentication, Authorization, and Accounting
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Unit 1: Introduction to ASP.NET.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Adding Parameters to Commands ADO.NET - Lesson 06  Training time: 15 minutes.
CS795.Net Impersonation… why & How? Presented by: Vijay Reddy Mara.
2. SQL Security Objectives –Learn SQL Server 2000 components Contents –Understanding the Authentication Process –Understanding the Authorization Process.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Impersonation in SharePoint Developers use impersonation when an application needs to.
MEMBERSHIP AND IDENTITY Active server pages (ASP.NET) 1 Chapter-4.
Permissions Lesson 13. Skills Matrix Security Modes Maintaining data integrity involves creating users, controlling their access and limiting their ability.
ADO.NET AND STORED PROCEDURES - Swetha Kulkarni. RDBMS ADO.NET Provider  SqlClient  OracleClient  OleDb  ODBC  SqlServerCE System.Data.SqlClient.
Mirek Sztajno SQL Server Security PM
BSG Group - Dau Anh Trong1 Introduction about MS SQL Server 2005.
TOPIC: AUTHENTICITY CREATED BY SWAPNIL SAHOO AuthenticityAuthorisation Access Control Basic Authentication Apache BASIC AUTHENTICATIONDIGEST ACCESS AUTHENTICATIONDHCP.
ADO.NET FUNDAMENTALS BEGINNING ASP.NET 3.5 IN C#.
1 Chapter 13: RADIUS in Remote Access Designs Designs That Include RADIUS Essential RADIUS Design Concepts Data Protection in RADIUS Designs RADIUS Design.
Endpoints Lesson 17. Skills Matrix Endpoints Endpoints provide a reliable, securable, scalable messaging system that enables SQL Server to communicate.
1 Connecting to a Database Server. 2 We all have accounts, with a single database each, on a Microsoft SQL Server on the USF network: allman.forest.usf.edu.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 The SqlCommand Object ADO.NET - Lesson 03  Training time: 15 minutes  Author:
LINCWorks Mesh Networking User Guide. This user guide will give a brief overview of mesh networking followed by step by step instructions for configuring.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Reading Data with the SqlDataReader ADO.NET - Lesson 04  Training time: 10.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Using Stored Procedures ADO.NET - Lesson 07  Training time: 15 minutes  Author:
1 E-Site - FTP Services Setup / install guide. 2 About FTP services can run on any desired port(s) Runs as a windows service Works for all sites installed.
 ADO.NET is an object-oriented set of libraries that allows you to interact with data sources  Commonly, the data source is a database, but it could.
CollegeSource Security Application &
ASP .NET MVC Authorization Training Videos
Authentication & .htaccess
Data Virtualization Demoette… ADO.NET Client
Programming the Web Using ASP.Net
Introduction to SQL Server 2000 Security
Principles of report writing
Created by : Asst. Prof. Ashish Shah
MySQL User Privileges: Grant
Create New User in Database. First Connect the System.
M S COLLEGE OF ART’S, COMM., SCI. & BMS Advance Web Programming
Security - Forms Authentication
We Need To Talk Security
Presentation transcript:

© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 The SqlConnection Object ADO.NET - Lesson 02  Training time: 10 minutes  Author: CuongNV3

© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Objectives  Know what connection objects are used for.  Learn how to instantiate a SqlConnection object.  Understand how the SqlConnection object is used in applications.  Comprehend the importance of effective connection lifetime management.

© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Introduction  When interacting with a database, we need to create a connection.  The connection tells the rest of the ADO.NET code which database it is talking to. It manages all of the low level logic associated with the specific database protocols.  Create an instantiate the connection object, open the connection, and then close the connection when you are done.

© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Introduction (2)

© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 SQL Server Security Client Send the username and password in clear text. Do not send the username and password. Just send that the user has been authenticated. Mixed mode authentication Windows only authentication SQL Server Only ASPNET account is granted access Web Server Windows authentication or… SQL Server Each user account added to SQL Server logins group Web Server Default ASP.NET settings Here is the username and password

© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Creating a SqlConnection Object  ADO.NET Connection Strings contain certain key/value pairs for specifying how to make a database connection. They include the location, name of the database, and security credentials. Connection String Parameter Name Description Data Source Identifies the server. Could be local machine, machine domain name, or IP Address. Initial CatalogDatabase name. Integrated SecuritySet to SSPI to make connection with user's Windows login User IDName of user configured in SQL Server. PasswordPassword matching SQL Server User ID.

© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Creating a SqlConnection Object (2)  Window only authentication  Mixed mode authentication  Create an instantiate of the SqlConnection object string connectionString = "Data Source=(local);Initial Catalog=Northwind;Integrated Security=SSPI"; string connectionString = "Data Source=(local);Initial Catalog=Northwind; User ID=sa; Password= SqlConnection connection = new SqlConnection(connectionString);

© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Using a SqlConnection  Instantiate the SqlConnection.  Open the connection.  Pass the connection to other ADO.NET objects.  Perform database operations with the other ADO.NET objects.  Close the connection. Demo

© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Summary  SqlConnection objects let other ADO.NET code know what database to connect to and how to make the connection.  They are instantiated by passing a connection string with a set of key/value pairs that define the connection.  The steps you use to manage the lifetime of a connection are create, open, pass, use, and close.  Be sure to close your connection properly when you are done with it to ensure you don't have a connection resource leak.

© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Q&A Thanks!