Vous êtes sur la page 1sur 50

ENSURING DATA STORAGE SECURITY IN CLOUD COMPUTING USING SOBOL SEQUENCE A project work submitted in partial fulfillmen of the

requirements for the award of the degree of MASTER OF SCIENCE (COMPUTER SCIENCE) Submitted by P.RAMYA REG.NO:10BBK1606 Under the Guidance of Mrs.A.SANKARESWARI, M.C.A., M.Phil.,

DEPARTMENT OF COMPUTER SCIENCE VIVEKANANDHA COLLEGE FOR WOMEN (Affiliated to Periyar University, Salem) TIRUCHENGODE-637205 MARCH-2012

VIVEKANANDHA COLLEGE FOR WOMEN (Affiliated to Periyar University, Salem) TIRUCHENGODE-637205

This is

to certify

that the project entitled ENSURING DATA STORAGE

SECURITY IN CLOUD COMPUTING USING SOBOL SEQUENCE is a bonafide record work done by P.RAMYA(REG.No:10BBK1606), during the academic year 20112012 in partial fulfillment for the award of the degree of Master of Science in Computer Science.

Internal Guide

Head of the Department

Submitted for the viva-voce examination held on _________________

Internal Examiner

External Examiner

DECLARATION
I hereby declare that the project work entitled ENSURING DATA STORAGE SECURITY IN CLOUD COMPUTING USING SOBOL SEQUENCE submitted to Periyar University in partial fulfillment of requirements for the award of the degree of Master Of Science in Computer Science is a work done by the supervision of

Mrs.A. SANKARESWARI, M.C.A., M.Phil., Lecturer in Department of Computer Science, Vivekanandha College for Women, during the period of study 2011-2012.

Date: Place:

Signature of the Candidate

(P.RAMYA) (REG.NO:10BBK1606)

ACKNOWLEDGEMENT

First and foremost, I am grateful to the god almighty, who has showered his blessings on me throughout this project.

At the outset, I would like to thank Vidhya Rathna Dr.M.KARUNANIDHI, B.Pharm., M.S.,Ph.D.,D.Litt., chairman & secretary, Vivekanandha Educational Institutions for providing a congenial environment that has assisted my educational endeavors.

I express my grateful thank to Dr.N.RAJENDRAN, M.C.A., M.Phil.,Ph.D., Principal, Vivekanandha College for Women, for the excellent facilities providing during the tenure of my project.

I express my heart full gratitude to Mr.D.MOHAN KUMAR, M.Sc.,(IT).,M.Phil., Head of the department of computer science, Vivekanandha College for Women, for his encouragement and making all necessary arrangements for the successful completion for this project work.

I gratefully indebted to my project guide Mrs.A.SANKARESWARI, M.C.A., M.Phil., Asst.professor in Department of Computer Science, Vivekanandha College for Women, for her invaluable help and guidance at every stage of my project.

Finally, I am very much grateful to my parents without whom I would not be what I am today, my friends who inspired and helped me in completing this project work.

CONTENT
S.NO 1 INTRODUCTION 1.1 ORGANIZATION PROFILE 1.2 PROJECT DESCRIPTION 1.3 MODULE DESCRIPTION 2 SYSTEM CONFIGURATION 2.1 SOFTWARE CONFIGURATION 2.2 HARDWARE CONFIGURATION 2.3 SOFTWARE DESCRIPTION 3 SYSTEM ANALYSIS 3.1 EXISTING SYSTEM 3.2 PROPOSED SYSTEM 3.3 SYSTEM STYDY 4 SYSTEM DESIGN 4.1 INPUT DESIGN 4.2 OUTPUT DESIGN 4.3 CODE DESIGN 4.4 DATABASE DESIGN 5 SYSTEM TESTING AND SYSTEM IMPLEMENTATION 6 7 8 9 CONCLUSION FUTURE ENHANCEMENT BIBILIOGRAPHY APPENDICES A. DATA FLOW DIAGRAM B. SOURCE CODE C.TABLE STRUCTURE D. SCREEN LAYOUT TITLE PAGE.NO

1.INTRODUCTION
1.1 ORGANIZATION PROFILE 1.2 PROJECT DESCRIPTION Several trends are opening up the era of Cloud Computing, which is an Internet-based development and use of computer technology. The ever cheaper and more powerful processors, together with the software as a service SaaS computing architecture, are transforming data centers into pools of computing service on a huge scale. The increasing network bandwidth and reliable yet flexible network connections make it even possible that users can now subscribe high quality services from data and software that reside solely on remote data centers. Moving data into the cloud offers great convenience to users since they dont have to care about the complexities of direct hardware management. The pioneer of Cloud Computing vendors, Amazon Simple Storage Service (S3) and Amazon Elastic Compute Cloud EC2 are both well known examples. While these internetbased online services do provide huge amounts of storage space and customizable computing resources, this computing platform shift, however, is eliminating the responsibility of local machines for data maintenance at the same time. As a result, users are at the mercy of their cloud service providers for the availability and integrity of their data. Recent downtime of Amazons S3 is such an example .From the perspective of data security, which has always been an important aspect of quality of service, Cloud Computing inevitably poses new challenging security threats for number of reasons. Firstly, traditional cryptographic primitives for the purpose of data security protection cannot be directly adopted due to the users loss control of data under Cloud Computing. However, this dynamic feature also makes traditional integrity insurance techniques futile and entails solutions.

1.3 MODULES DESCRIPTION

Client Module In this module, the client sends the query to the server. Based on the query the server sends the corresponding file to the client. Before this process, the client authorization step is involved. In the server side, it checks the client name and its password for security process. If it is satisfied and then received the queries form the client and search the corresponding files in the database. Finally, find that file and send to the client. If the server finds the intruder means, it set the alternative Path to those intruders. System Module Representative network architecture for cloud data storage is illustrated in Figure 1. Three different network entities can be identified as follows User Users, who have data to be stored in the cloud and rely on the cloud for data computation, consist of both individual consumers and organizations.

Cloud Service Provider (CSP) A CSP, who has significant resources and expertise in building and managing distributed cloud storage servers, owns and operates live Cloud Computing systems. Third Party Auditor (TPA) An optional TPA, who has expertise and capabilities that users may not have, is trusted to assess and expose risk of cloud storage services on behalf of the users upon request. Cloud data storage Module Cloud data storage, a user stores his data through a CSP into a set of cloud servers, which are running in a simultaneous, the user interacts with the cloud servers via CSP to access or retrieve his data. In some cases, the user may need to perform block level

operations on his data. Users should be equipped with security means so that they can make continuous correctness assurance of their stored data even without the existence of local In case those users do not necessarily have the time, feasibility or resources to monitor their data, they can delegate the tasks to an optional trusted TPA of their respective choices. In our model, we assume that the point-to-point communication channels between each cloud server and the user is authenticated and reliable, which can be achieved in practice with little overhead. Cloud Authentication Server The Authentication Server (AS) functions as any AS would with a few additional behaviors added to the typical client-authentication protocol. The first addition is the sending of the client authentication information to the masquerading router. The AS in this model also functions as a ticketing authority, controlling permissions on the application network. The other optional function that should be supported by the AS is the updating of client lists, causing a reduction in authentication time or even the removal of the client as a valid client depending upon the request. Unauthorized data modification and corruption module One of the key issues is to effectively detect any unauthorized data modification and corruption, possibly due to server compromise and/or random Byzantine failures. Besides, in the distributed case when such inconsistencies are successfully detected, to find which server the data error lies in is also of great significance. Adversary Module Weak Adversary The adversary is interested in corrupting the users data files stored on individual servers. Once a server is comprised, an adversary can pollute the original data files by modifying or introducing its own fraudulent data to prevent the original data from being retrieved by the user.

Strong Adversary This is the worst case scenario, in which we assume that the adversary can compromise all the storage servers so that he can intentionally modify the data files as long as they are internally consistent. In fact, this is equivalent to the case where all servers are colluding together to hide a data loss or corruption incident.

2. SYSTEM CONFIGURATION

2.1 HARDWARE CONFIGURATION

System Hard Disk

: Pentium IV 2.4 GHz : 40 GB

Floppy Drive : 1.44 Mb Monitor Mouse Ram : 15 VGA Colour : Logitech : 512 Mb

2.2 SOFTWARE CONFIGURATION

Operating system Coding Language Data Base

: Windows XP : .NET : SQL

2.3 SOFTWARE DESCRIPTIONS ASP.NET ASP.NET provides the easiest, most productive language and tool for rapidly building Web applications. ASP .NET comes with enhanced Web designers, increased application performance, and a powerful integrated development environment (IDE). It also supports creation of applications for wireless, Internet-enabled hand-held devices. Powerful Web-based Applications ASP .NET comes with features such as a powerful new forms designer, an inplace menu or, and automatic control anchoring and docking. ASP .NET delivers new productivity features for building more robust applications easily and quickly. With an improved integrated development environment (IDE) and a significantly reduced startup time, ASP .NET offers fast, automatic formatting of code as type, improved IntelliSense, an enhanced object browser and XML designer. Building Web-based Applications With ASP.NET we create Web applications using the shared Web Forms Designer and the familiar "drag and drop" feature. Double-click and write code to respond to events. .NET 2005 comes with an enhanced HTML or for working with complex Web pages. Use IntelliSense technology and tag completion, or choose the or for visual authoring of interactive Web applications. Simplified Deployment With ASP.NET build applications more rapidly and deploy and maintain them with efficiency. .NET 2005 makes "DLL Hell" a thing of the past. Side-by-side

versioning enables multiple versions of the same component to live safely on the same machine so that applications can use a specific version of a component. Powerful, Flexible, Simplified Data Access Tackle any data access scenario easily with ADO.NET and ADO data access. The flexibility of ADO.NET enables data binding to any database, as well as classes, collections, and arrays, and provides true XML representation of data. Seamless access to ADO enables simple data access for connected data binding scenarios. Using ADO.NET, .NET can gain high-speed access to MS SQL Server, Oracle, DB2, Microsoft Access, and more. Improved Coding Code faster and more effectively. A multitude of enhancements to the code or, including enhanced IntelliSense, smart listing of code for greater readability and a background compiler for real-time notification of syntax errors transforms into a rapid application development (RAD) coding machine. Direct Access to the Platform Active Server Pages developers can have full access to the capabilities available in .NET Framework. Developers can easily program system services including the event log, performance counters and file system. The new Windows Service project template enables to build real Microsoft Windows NT Services. Full Object-Oriented Constructs ASP.NET creates reusable, enterprise-class code using full object-oriented constructs. Language features include full implementation inheritance, encapsulation, and polymorphism. Structured exception handling provides a global error handler and eliminates spaghetti code.

XML Web Services XML Web services enable to call components running on any platform using open Internet protocols. Working with XML Web services is easier where enhancements simplify the discovery and consumption of XML Web services that are located within any firewall. XML Web services can be built as easily as we would build any class in Visual Basic 6.0. The XML Web service project template builds all underlying Web service infrastructure. Mobile Applications ASP .NET 2005 offer integrated support for developing mobile Web applications for more than 200 Internet-enabled mobile devices. These new features give developers a single, mobile Web interface and programming model to support a broad range of Web devices for WAPenabled cellular phones, compact HTML (HTML) for i-Mode phones, and HTML for Pocket PC, handheld devices, and pagers. COM Interoperability ASP.NET maintains the existing code without the need to recode. COM interoperability enables to leverage the existing code assets and offers seamless bidirectional communication between Visual Basic 6.0 and Visual Basic .NET applications. Reuse Existing Investments We can reuse all the existing ActiveX Controls. Windows Forms in Visual Basic .NET 2005 provide a robust container for existing ActiveX controls. In addition, full support for existing ADO code and data binding enable a smooth transition to Visual Basic .NET 2005.

SQL SERVER 2000

DATABASE SYSTEM

A database system is a computerized information system for the management of data by means of a general purpose software package called a database management system. OBJECT OF DATABASE SYSTEM

 Data Independence This is one of the keys motives for adopting database system. DBMS achieves data independence by separating data definitions from application programs.  Minimizing Data Redundancy One major difference between a conventional information system and a database system is that no application program in a database system has its own private files. Data from the different users are pooled and integrate into the database in order to be shared by all users. Redundant data is thus minimized  Data Integrity Data integrity are input data validation, concurrence interference and deadlock. various DBMS have different approaches and different degrees of sophistication for enforcing data integrity.  Data Security In the database environment, the DBMS protects an individuals users data from unauthorized or destruction. The DBA (Database Administrator) computer a programmers access right to certain in portion of a database. There is control over access to the database. Access to the database is controlled at a number of levels.  Efficiency Providing fast response to users request and doing it economically is the overall goal of the database system.

 Data Mode Data in the network is represented by a collection of records and relationships among data are represented by links, which can be viewed as pointers. The records in the database are organized as a collection of arbitrary graphs.

SQL

SQL is an acronym of structure query language. It is built to work around Relation Database which are sets of related information stored in tables. SQL was introduced by IBM as the language to interface with its prototype relation database management system, system R. The first commercially available SQL relation database management was introduced in 1979 by Oracle Corporation.

BENEFITS OF SQL

 SQL has become the database language of choice because it is  Flexible, powerful and easy to learn  SQL is a non-procedural language Process sets of the records rather than just one at the time and provides automatic navigation to the data.  SQL provides commands for various of the tasks including query creating, updating and replacing objects and deleting rows. inserting, data, and

updating

SQL SERVER FEATURES

 Ease of installation , deployment , and use  Sql Server includes a set of administrative and development tools that improve your ability to install , deploy , manage , and user SQL Server across several sites  Scalability The same database engine can be used across platforms ranging from laptop computers running Microsoft Windows95/98 to large, Multiprocessor servers running Microsoft Windows NT, Enterprise ion.SQL Server includes tools for extracting and analyzing summary data for online analytical processing(OLAP).SQL Server also includes tools for visually designing database and analyzing data using English-based questions  System integration with other server software SQL Server integrates with e-mail , the internet , and windows

3. SYSTEM STUDY 3.1 EXISTING SYSTEM

From the perspective of data security, which has always been an important aspect of quality of service, Cloud Computing inevitably poses new challenging security threats for number of reasons. Firstly, traditional cryptographic primitives for the purpose of data security protection cannot be directly adopted due to the users loss control of data under Cloud Computing. Therefore, verification of correct data storage in the cloud must be conducted without explicit knowledge of the whole data. Considering various kinds of data for each user stored in the cloud and the demand of long term continuous assurance of their data safety, the problem of verifying correctness of data storage in the cloud becomes even more challenging.

Disadvantages

These techniques, while cannot be useful to ensure the storage correctness without having users possessing data, cannot address all the security threats in cloud data storage, since they are all focusing on single server scenario and most of them do not consider dynamic data operations.

3.2 PROPOSED SYSTEM

In this project, propose an effective and flexible distributed scheme with explicit dynamic data support to ensure the correctness of users data in the cloud. We rely on erasure correcting code in the file distribution preparation to provide redundancies and guarantee the data dependability. This construction drastically reduces the communication and storage overhead as compared to the traditional replication-based file distribution techniques. By utilizing the homomorphism token with distributed verification of erasure-coded data, our scheme achieves the storage correctness insurance as well as data error localization whenever data corruption has been detected during the storage correctness verification, our scheme can almost guarantee the simultaneous localization of data errors, i.e., the identification of the misbehaving server(s).

Advantages

By utilizing the homomorphism token with distributed verification of erasure-coded data, our scheme achieves the storage correctness insurance as well as data error localization whenever data corruption has been detected during the storage correctness verification, our scheme can almost guarantee the simultaneous localization of data errors, the identification of the misbehaving server(s).

3.3FEASIBILITY STUDY Preliminary investigation examines project feasibility, the likelihood the system will be useful to the organization. The main objective of the feasibility study is to test the Technical, Operational and Economical feasibility for adding new modules and debugging old running system.    Technical Feasibility Operation Feasibility Economical Feasibility

Technical Feasibility:

The technical issue usually raised during the feasibility stage of the investigation includes the following

 

Does the necessary technology exist to do what is suggested Do the proposed equipments have the technical capacity to hold the data required to use the new system

Earlier no system existed to cater to the needs of Secure Infrastructure Implementation System. The current system developed is technically feasible. It is a web based user interface for audit workflow at NIC-CSD. Thus it provides an easy access to the users. The databases purpose is to create, establish and maintain a workflow among various entities in order to facilitate all concerned users in their various capacities or roles. Permission to the users would be granted based on the roles specified.Therefore, it provides the technical guarantee of accuracy, reliability and security. The software and hard requirements for the development of this project are not many and are already available inhouse at NIC or are available as free as open source. The work for the project is done with the current equipment and existing software technology. Necessary bandwidth exists for providing a fast feedback to the users irrespective of the number of users using the system.

Operational Feasibility:

Some of the important issues raised are to test the operational feasibility of a project includes the following: -

 Is there sufficient support for the management from the users  Will the system be used and work properly if it is being developed and implemented  Will there be any resistance from the user that will undermine the possible application benefits

Economic Feasibility: A system can be developed technically and that will be used if installed must still be a good investment for the organization. In the economical feasibility, the development cost in creating the system is evaluated against the ultimate benefit derived from the new systems. Financial benefits must equal or exceed the costs. The system is economically feasible. It does not require any additional hardware or software. The system is economically feasible. It does not require any addition hardware or software. Since the interface for this system is developed using the existing resources and technologies available at NIC, There is nominal expenditure and economical feasibility for certain.

4. SYSTEM DESIGN
4.1 INPUT DESIGN

 Admin enter his user id and password for login.  User enters his user id and password for login.  User Create new folder for personnel usage.  Admin enter user id or date for track the user login information  New user gives his completed personnel, address and phone details for registration.  Admin gives different kind of user information for search the user data.  User gives his user id, hint question, answer for getting the forgotten password.  Administrator giving information to generate various kinds of reports. 4.2 OUTPUT DESIGN  Admin can have his own home page.  Users enter their own home page.  The user defined folders can store in the centralized database.  Admin will get the login information of a particular user.  The new users data will be stored in the centralized database.  Admin get the search details of different criteria.  User can get his forgot password.  Different kind of reports is generated by administrator.

5. SYSTEM TESTING AND IMPLEMENTATION


The purpose of testing is to discover errors. Testing is the process of trying to discover every conceivable fault or weakness in a work product. It provides a way to check the functionality of components, sub assemblies, assemblies and/or a finished product It is the process of exercising software with the intent of ensuring that the software system meets its requirements and user expectations and does not fail in an unacceptable manner. There are various types of test. Each test type addresses a specific testing requirement. TYPES OF TESTS

    

Unit testing Integration testing Functional test Acceptance Test System Test   Black Box Testing White Box Testing

UNIT TESTING Unit testing involves the design of test cases that validate that the internal program logic is functioning properly, and that program input produce valid outputs. All decision branches and internal code flow should be validated. It is the testing of individual software units of the application .it is done after the completion of an individual unit before integration. Unit tests perform basic tests at component level and test a specific business process, application, and/or system configuration. Unit tests ensure that each unique path of a business process performs accurately to the documented specifications and contains clearly defined inputs and expected results.

INTEGRATION TESTING

Software integration testing is the incremental integration testing of two or more integrated software components on a single platform to produce failures caused by interface defects. The task of the integration test is to check that components or software applications, e.g. components in a software system or one step up software applications at the company level interact without error.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.

FUNCTIONAL TESTING

Functional tests provide a systematic demonstrations that functions tested are available as specified by the business and technical requirements, system documentation and user manuals. Functional testing is centered on the following items: Valid Input Invalid Input Functions Output Systems/Procedures : Identified classes of valid input must be accepted. : Identified classes of invalid input must be rejected. : Identified functions must be exercised. : Identified classes of application outputs must be exercised. : Interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key functions, or special test cases. In addition, systematic coverage pertaining to identify Business process flows; data fields, predefined processes, and successive processes must be considered for testing. Before functional testing is complete, additional tests are identified and the effective value of current tests is determined.

ACCEPTANCE TEST

User Acceptance Testing is a critical phase of any project and requires significant participation by the end user. It also ensures that the system meets the functional requirements. Test Results: All the test cases mentioned above passed successfully. No defects encountered.

SYSTEM TEST

System testing ensures that the entire integrated software system meets requirements. It tests a configuration to ensure known and predictable results. An example of system testing is the configuration oriented system integration test. System testing is based on process descriptions and flows, emphasizing pre-driven process links and integration points.

White Box Testing White Box Testing is a testing in which in which the software tester has knowledge of the inner workings, structure and language of the software, or at least its purpose. It is purpose. It is used to test areas that cannot be reached from a black box level .

Black Box Testing Black Box Testing is testing the software without any knowledge of the inner workings, structure or language of the module being tested . Black box tests, as most other kinds of tests, must be written from a definitive source document, such as pecification or requirements document, such as specification or requirements document. The test provides inputs and responds to outputs without considering how the software works.

Test objectives  All field entries must work properly.  Pages must be activated from the identified link.  The entry screen, messages and responses must not be delayed.

Features to be tested  Verify that the entries are of the correct format  No duplicate entries should be allowed  All links should take the user to the correct page.

SYSTEM IMPLEMENTATION

Implementation is the stage of the project when the theoretical design is turned out into a working system. Thus it can be considered to be the most critical stage in achieving a successful new system and in giving the user, confidence that the new system will work and be effective. The implementation stage involves careful planning, investigation of the existing system and its constraints on implementation, designing of methods to achieve changeover and evaluation of changeover methods. Implementation is the process of converting a new system design into operation. It is the phase that focuses on user training, site preparation and file conversion for installing a candidate system. The important factor that should be considered here is that the conversion should not disrupt the functioning of the organization.

6. CONCLUSION

In this project, investigated the problem of data security in cloud data storage, which is essentially a distributed storage system. To ensure the correctness of users data in cloud data storage, we proposed an effective and flexible distributed scheme with explicit dynamic data support, including block update, delete, and append. By utilizing the homomorphism token with distributed verification of erasure coded data, our scheme achieves the integration of storage correctness insurance and data error localization, i.e., whenever data corruption has been detected during the storage correctness verification across the distributed servers, we can almost guarantee the simultaneous identification of the misbehaving server(s). Through detailed security and performance analysis, we show that our scheme is highly efficient and resilient to Byzantine failure, malicious data modification attack, and even server colluding. Believe that data storage security in Cloud Computing, an area full of challenges and of paramount importance, is still in its infancy now, and many research problems are yet to be identified. We envision several possible directions for future research on this area. The most promising one we believe is a model in which public verifiability is enforced. Public verifiability, supported in allows TPA to audit the cloud data storage without demanding users time, feasibility or resources.

7. FUTURE ENHANCEMENT

Every application has its own merits and demerits. The project has covered almost all the requirements. Further requirements and improvements can easily be done since the coding is mainly structured or modular in nature. Changing the existing modules or adding new modules can append improvements. Further enhancements can be made to the application, so that the web site functions very attractive and useful manner than the present one.

8.BIBLOGRAPHY
1. Amazon.com, Amazon Web Services (AWS), Online at http://aws. amazon.com, 2008. 2. N. Gohring, Amazons S3 down for several hours, Online 3. At http://www.pcworld.com/businesscenter/article/142549/amazo s s3 down for several hours.html, 2008. 4. A. Juels and J. Burton S. Kaliski, PORs: Proofs of Retrievability for Large Files, Proc. of CCS 07, pp. 584597, 2007. H. Shacham and B. Waters, Compact Proofs of Retrievability, Proc. of Asiacrypt 08, Dec. 2008.

SITE NAMES

1. www.w3schools.com 2. www.dontnetspider.com 3. www.java2s.com 4. www.javaschools.com

9. APPENDIX A. DATAFLOW DIAGRAM

LEVEL 0 START LOGIN VERIFIC ATION FUTURE PROCESS

LEVEL 1 START T FILE SEND BY USER

VALID

FILE STORED IN TPA SERVER

LEVEL2 START FILE VERIFIED BY TPA ORIGINAL FILE BEING STORED IN DTABASE

FAKE

FILE REJECTED

B.SOURCE CODE using System; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; public partial class _Default : System.Web.UI.Page { SqlConnection con2 = new SqlConnection(ConfigurationManager.AppSettings["privacycloudconnection"]); class1 cs = new class1(); string a, b, em, adr, cit, db, mbl; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) {

} protected void but_logcancl_Click(object sender, EventArgs e) { tex_logusr.Text = ""; tex_logpriky.Text = "";

} protected void bt_loginsub_Click1(object sender, EventArgs e) { con2.Open(); SqlDataAdapter adp = new SqlDataAdapter("select * from register where loginid='" + tex_logusr.Text + "' and privacykey='" + tex_logpriky.Text + "'", con2); DataSet ds = new DataSet(); adp.Fill(ds); if (ds.Tables[0].Rows.Count > 0) { a = ds.Tables[0].Rows[0]["usrid"].ToString(); b = ds.Tables[0].Rows[0]["nam"].ToString(); Session["us"] = tex_logusr.Text; Session["pr"] = tex_logpriky.Text; Session["c"] = a; Session["d"] = b; if (ds.Tables[0].Rows[0]["loginid"].ToString() == tex_logusr.Text) { if (ds.Tables[0].Rows[0]["privacykey"].ToString() == tex_logpriky.Text) { Response.Redirect("uploadfiles.aspx"); } else { MsgBox.Show("Enter your correct privacy key"); } } else { MsgBox.Show("Invalid user"); }

} else if (tex_logusr.Text == "owner" && tex_logpriky.Text == "owner") { Response.Redirect("ownerpage.aspx"); } else if (tex_logusr.Text == "") { MsgBox.Show("Enter the user name"); } else if (tex_logpriky.Text == "") { MsgBox.Show("Enter the Password"); } else { MsgBox.Show("You are not a Authenticated user"); } con2.Close(); } } using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.Mobile; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.MobileControls; using System.Web.UI.WebControls;

using System.Web.UI.HtmlControls; public partial class details : System.Web.UI.MobileControls.MobilePage { class1 cs = new class1(); protected void Page_Load(object sender, EventArgs e) { string m = (string)Session["nam"]; DataSet st = new DataSet(); st = cs.viewdetails(m); unam.Text = st.Tables[0].Rows[0]["nam"].ToString(); con.Text = st.Tables[0].Rows[0]["mobileno"].ToString(); email.Text = st.Tables[0].Rows[0]["email"].ToString(); city.Text = st.Tables[0].Rows[0]["city"].ToString(); dob.Text = st.Tables[0].Rows[0]["dob"].ToString(); } } using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class downloadfiles : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e)

} } using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; public partial class Editprofile1 : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["privacycloudconnection"]); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { con.Open(); SqlDataAdapter adp = new SqlDataAdapter("select * from register where loginid='" + (string)Session["us"] + "' and privacykey='" + (string)Session["pr"] + "'", con); DataSet ds = new DataSet(); adp.Fill(ds); lb_usrid.Text = ds.Tables[0].Rows[0]["usrid"].ToString();

Tex_nam.Text = ds.Tables[0].Rows[0]["nam"].ToString(); //Tex_unam.Text = (string)Session["us"]; //Tex_paswrd.Text = (string)Session["pr"]; Tex_email.Text = ds.Tables[0].Rows[0]["email"].ToString(); Tex_addrs.Text = ds.Tables[0].Rows[0]["address"].ToString(); Tex_city.Text = ds.Tables[0].Rows[0]["city"].ToString(); Tex_dob.Text = ds.Tables[0].Rows[0]["dob"].ToString(); Tex_mblno.Text = ds.Tables[0].Rows[0]["mobileno"].ToString(); con.Close(); }

} protected void btn_updat_Click(object sender, EventArgs e) { try { con.Open(); SqlCommand adp1 = new SqlCommand("update register set email='" + Tex_email.Text + "',address='" + Tex_addrs.Text + "',city='" + Tex_city.Text + "',dob='" + Tex_dob.Text + "',mobileno='" + Tex_mblno.Text + "' where loginid='" + (string)Session["us"] + "' and privacykey='" + (string)Session["pr"] + "'", con); adp1.ExecuteNonQuery(); con.Close(); } catch (Exception ex) { MsgBox.Show(ex.Message); } } }

using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.Mobile; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.MobileControls; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; public partial class mobile : System.Web.UI.MobileControls.MobilePage { class1 cs = new class1(); LinkButton link1; protected void Page_Load(object sender, EventArgs e) { string s = (string)Session["d"]; DataSet ds1 = new DataSet(); ds1 = cs.viewusers(s); for (int x = 0; x < ds1.Tables[0].Rows.Count; x++) { //list1.Items.Add(ds1.Tables[0].Rows[x]["usernam"].ToString()); link1 = new LinkButton(); link1.Text = ds1.Tables[0].Rows[x]["username"].ToString() + "<br>"; link1.CommandName = ds1.Tables[0].Rows[x]["username"].ToString(); link1.Command += new CommandEventHandler(this.link1_click); link1.ID = x.ToString(); this.panel1.Controls.Add(link1);

} } protected void link1_click(object sender, CommandEventArgs e) { //Session["uname"] = link1.Text; Response.Redirect("userdetails.aspx"); //startdownload(e.CommandName); } } sing System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class ownerpage : System.Web.UI.Page { class1 cs=new class1(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataSet ds1 = new DataSet(); ds1 = cs.selectddl(); ddl1.Items.Clear();

ddl1.Items.Add("--Select--"); for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) { ddl1.Items.Add(ds1.Tables[0].Rows[i]["usrid"].ToString()); } } } protected void ddl1_SelectedIndexChanged1(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = cs.showgrid(ddl1.SelectedItem.Text); if (ds.Tables[0].Rows.Count > 0) { GridView1.DataSource = ds; GridView1.DataBind(); } else { MsgBox.Show("No data found"); } } }

using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.Mobile; using System.Web.SessionState;

using System.Web.UI; using System.Web.UI.MobileControls; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; public partial class ownersview : System.Web.UI.MobileControls.MobilePage { protected void Page_Load(object sender, EventArgs e) {

} protected void go_click(object sender, EventArgs e) { Session["nam"] = text1.Text; Response.Redirect("details.aspx"); } }

D.SCREEN SHOTS LOGIN

LOGIN USER

UPDATE FILES

Vous aimerez peut-être aussi