SIVA PRASAD SANDIREDDY.  https://www.youtube.com/watch?v=z_8mBA YzdS4.

Slides:



Advertisements
Similar presentations
Charles Petzold Application Lifecycle and State Management.
Advertisements

C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 15: Exception Handling.
Chapter 16: Exception Handling C++ Programming: From Problem Analysis to Program Design, Fifth Edition.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 16: Exception Handling.
Files & Streams. Files Introduction Files are used for long-term retention of large amounts of data, even after the program that created the data terminates.
3.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 3: Introducing Active Directory.
Chapter 5: Configuring Users and Groups. Types of User Accounts Administrator –Unrestricted access to performing administrative tasks –Use sparingly Standard.
Exception Handling An Exception is an indication of a problem that occurs during a program’s execution. Exception handling enables the programmer to create.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 12: Managing and Implementing Backups and Disaster Recovery.
Chapter 5: Configuring Users and Groups. Windows Vista User Accounts User accounts are the primary means of authentication Built-in Accounts –Administrator:
3.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 3: Introducing Active Directory.
MIS316 – BUSINESS APPLICATION DEVELOPMENT – Chapter 14 – Files and Streams 1Microsoft Visual C# 2012, Fifth Edition.
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 7 Configuring File Services in Windows Server 2008.
1 Chapter Overview Creating User and Computer Objects Maintaining User Accounts Creating User Profiles.
Understanding Input/Output (I/O) Classes Lesson 5.
Windows Programming Using C# Windows Services, Serialization, and Isolated Storage.
Configuring File Services Lesson 6. Skills Matrix Technology SkillObjective DomainObjective # Configuring a File ServerConfigure a file server4.1 Using.
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
Lecture Set 12 Sequential Files and Structures Part B – Reading and Writing Sequential Files.
Using Data Active Server Pages Objectives In this chapter, you will: Learn about variables and constants Explore application and session variables Learn.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
WINDOWS SERVICES. Introduction You often need programs that run continuously in the background Examples: – servers –Print spooler You often need.
Introduction to .Net Framework
1 User Account Administration Introduction to User Accounts Planning New User Accounts Creating User Accounts Creating User Profiles Creating Home Directories.
6.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 6: Administering User Accounts.
5.1 © 2004 Pearson Education, Inc. Lesson 5: Administering User Accounts Exam Microsoft® Windows® 2000 Directory Services Infrastructure Goals 
Design patterns. What is a design pattern? Christopher Alexander: «The pattern describes a problem which again and again occurs in the work, as well as.
Lector: Aliyev H.U. Lecture №5 Telecommunication network software design with.NET. Using streams for network programming TASHKENT UNIVERSITY OF INFORMATION.
Message-Driven Beans and EJB Security Lesson 4B / Slide 1 of 37 J2EE Server Components Objectives In this lesson, you will learn about: Identify features.
1 14/10/58Dr.Mud-Armeen Munlin 1 Files and Streams ผศ. ดร. หมัดอามีน หมันหลิน Faculty of IST, MUT
Chapter 9: SHARING FILE SYSTEM RESOURCES1 CHAPTER OVERVIEW  Create and manage file system shares and work with share permissions.  Use NTFS file system.
Dr. Mustafa Cem Kasapbaşı Security in ASP.NET. Determining Security Requirements Restricted File Types.
Effective C# 50 Specific Ways to Improve Your C# Item 46~ /09/25 1.
SECURITY ISSUES. Introduction The.NET Framework includes a comprehensive set of security tools –Low-level classes and an overall framework –Managing code.
Reference: Lecturer Lecturer Reham O. Al-Abdul Jabba lectures for cap211 Files and Streams- I.
Object Oriented Software Development 10. Persistent Storage.
System.Security.Policy namespace Chinmay Lokesh.NET Security CS 795 Summer 2010.
Presented By: Ahmed ALSUM PhD Student CS 895:.Net Security Old Dominion University College of Science Department of Computer Science.
Files and Streams. Objectives Learn about the classes that support file input/output Understand the concept of abstraction and how it related to the file.
Chapter 14: Files and Streams. 2Microsoft Visual C# 2012, Fifth Edition Files and the File and Directory Classes Temporary storage – Usually called computer.
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
Fall 2011 Nassau Community College ITE153 – Operating Systems Session 21 Administering User Accounts and Groups 1.
Jini Architecture Introduction System Overview An Example.
Introduction to Object-Oriented Programming Lesson 2.
Chapter 15: Exception Handling C++ Programming: Program Design Including Data Structures, Fifth Edition.
Karlstad University Computer Science Design Contracts and Error Management External and internal errors and their contracts.
SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally FILE SYSTEM.
Files and Streams. What is a file? Up until now, any stored data within a program is lost when the program closes. A file is a permanent way to store.
Object-Oriented Application Development Using VB.NET 1 Chapter 13 Introduction to Data Access Classes and Persistence.
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
Files and Streams. Objectives Learn about the classes that support file input/output Understand the concept of abstraction and how it related to the file.
Chapter  Array-like data structures  ArrayList  Queue  Stack  Hashtable  SortedList  Offer programming convenience for specific access.
6/19/2016 أساسيات الأتصال و الشبكات Communication & Networks Fundamentals lab 4.
SQL Database Management
Configuring File Services
Introduction to Classes and Objects
IS444: Modern tools for applications development
Security mechanisms and vulnerabilities in .NET
IS444: Modern tools for applications development
Defiana Arnaldy, M.Si File and Stream I/O Defiana Arnaldy, M.Si
Files and Streams Lect3 CT1411.
Sequential Input and Output using Text Files
File Input/Output (I/O)
Operation System Program 4
Files & Streams.
Files and Streams Lect10 GC201 12/1/2015.
CIS 199 Final Review.
by Santosh Reddy Vuppala
How to work with files and data streams
Creating and Managing Folders
Presentation transcript:

SIVA PRASAD SANDIREDDY

 YzdS4

 WHY ISOLATED STORAGE?  INTRODUCTION  DATA COMPARTMENT  ISOLATED STORAGE TASKS  STORES OF ISOLATED STORAGE  ANTISPATING OUT OF SPACE  CREATING FILES AND DIRECTORIES  FINDING EXESTING FILES AND DIRECTORIES  READ AND WRITE TO FILES  DELETING FILES AND DIRECTORIES  System.IO.IsolatedStorage Namespace  REFERENCES

 Many programmers use the config file to keep the application configuration data.  It is a read only mechanism.  In earlier days,.ini files or registry was used to save application specific data.  We can also use ordinary files but security is the major issue.

. NET introduces a concept called Isolated Storage. Isolated Storage is a kind of virtual folder. Users never need to know where exactly the file is stored. All one has to do is to tell the.NET framework to store files in Isolated Storage.  using System.IO; using System.IO.IsolatedStorage; using System.Diagnostics;

 It is not a specific storage location; it consists of one or more isolated storage files, called stores, which contain the actual directory locations where data is stored.  The data saved in the store can be any kind of data, from user preference information to application state.  Data compartment is transparent for developer. Stores usually reside on the client but a server application could use isolated stores.

 Administrators can limit how much isolated storage an application or a user has available, based on an appropriate trust level.  To create or access isolated storage, code must be granted the appropriate IsolatedStorageFilePermission.IsolatedStorageFilePermission  To access isolated storage, code must have all necessary native platform operating system rights since storage location is different depending on sys operating system.

Three main classes are necessary to perform tasks that involve isolated storage:  IsolatedStorageFile, which derives from IsolatedStorage, provides basic management of stored assembly and application files IsolatedStorageFileIsolatedStorage  IsolatedStorageFileStream, which derives from System.IO.FileStream, provides access to the files in a store. IsolatedStorageFileStreamSystem.IO.FileStream  IsolatedStorageScope is an enumeration that enables you to create and select a store with the appropriate isolation type. IsolatedStorageScope

 A store exposes a virtual file system within a data compartment. To create and retrieve stores, IsolatedStorageFile provides three static method.  Methods GetUserStoreForAssembly or GetUse rStoreForDomain retrieve a store.GetUserStoreForAssemblyGetUse rStoreForDomain  The GetStore method can be used to specify that a store should roam with a roaming user profile.

Enumerating stores : IsolatedStorageFile.GetEnumerator method uses to calculate the size of all isolated storage for the user.IsolatedStorageFile.GetEnumerator You can enumerate all isolated stores for the current user using the IsolatedStorageFile static method GetEnumerator. GetEnumerator takes an IsolatedStorageScope value and returns an IsolatedStorageFile enumerator. User is the only IsolatedStorageScope value supported.IsolatedStorageFileGetEnumeratorIsolatedStorageScope GetEnumerator returns an array ofIsolatedStorageFiles that are defined for the current user.

Deleting stores: IsolatedStorageFile.RemoveIsolatedStorageFile.Remove method can be used in two different ways to delete isolated stores. 1) The instance method Remove does not take any arguments and deletes the store that calls it. No permissions are required for this operation.Remove 2) The static method Remove takes the IsolatedStorageScope value User, and deletes all the stores for the user running the code.RemoveIsolatedStorageScope

 Code that uses isolated storage is constrained by a quota that specifies the maximum size for the data compartment. This value is specified by Administrators.quota  If the maximum allowed size is exceeded IsolatedStorageException is thrown and the operation fails. IsolatedStorageException  IsolatedStorage.CurrentSize and IsolatedStorage. MaximumSize. These two properties can be used to determine whether writing to the store will cause the maximum allowed size of the store to be exceeded. IsolatedStorage.CurrentSizeIsolatedStorage. MaximumSize

 To create a directory, CreateDirectory(use)CreateDirectory instance method of IsolatedStorageFile. if you specify a directory name that contains invalid characters, an IsolatedStorageException is generated.IsolatedStorageFileIsolatedStorageException  To create and open a file, use the IsolatedStorageFileStream constructors, passing in the file name, the FileMode value OpenOrCreate, and the store in which you want the file created. IsolatedStorageFileStreamFileMode  Files are case in sensitive.

 Using the GetDirectoryNames instance method of IsolatedStorageFile. Both single- character (?) and multi-character (*) wildcard characters are supported. GetDirectoryNamesIsolatedStorageFile  To search for a file, use the GetFileNames instance method of IsolatedStorageFile.GetFileNames  For example, if there is a match on the directory RootDir/SubDir/SubSubDir, SubSub Dir will be returned in the results array.

 There are a number of ways to open a file within a store using the IsolatedStorageFileStream class.IsolatedStorageFileStream  Once an IsolatedStorageFileStream has been obtained, it can be used to get a StreamReader or StreamWriter. With the StreamReader and StreamWriter, we can read and write to a file in a store as we would to any other fileStreamReaderStreamWriter

 The IsolatedStoreFile class supplies two instance methods for deleting directories and files, DeleteDirectory and DeleteFile.IsolatedStoreFileDeleteDirectoryDeleteFile  AnIsolatedStorageFileException is thrown if you try to delete a file or directory that does not exist.IsolatedStorageFileException  If a wildcard character is included in the name, then DeleteDirectory throws an IsolatedStorageFileException while DeleteFile t hrows an ArgumentException.DeleteFileArgumentException  DeleteDirectory fails if the directory contains any files or subdirectories.

This name space contains 4 classes: IsolatedStorageIsolatedStorage : Represents the abstract base class from which all isolated storage implementations must derive. IsolatedStorageExceptionIsolatedStorageException : The exception that is thrown when an operation in isolated storage fails. IsolatedStorageFileIsolatedStorageFile: Represents an isolated storage area containing files and directories. IsolatedStorageFileStreamIsolatedStorageFileStream : Exposes a file within isolated storage.

  ge.aspx ge.aspx  tedStorage.aspx tedStorage.aspx  us/library/8dzkff1s(v=VS.80).aspx us/library/8dzkff1s(v=VS.80).aspx