Skip to main content

Posts

Showing posts from April, 2013

What is the use of web.config file?

Web.config file is the main settings and configuration file for an asp.net web application. the file is an xml document that defines configuration settings and information regarding the web application. It can be considered as one of the most essential part of a web application. web.config used 1.        Database connection string 2.        Session state configuration 3.        Application language and compilation settings 4.        Security configuration 5.        Contains information that control module loading 6.        Tracing 7.        Error Handling

IDENTITY_INSERT in SQL Server

This command is to enable the users to set their own value for IDENTITY Column in case they want to.   Using the setting of SET IDENTITY_INSERT is OFF it is possible to insert our own value into the IDENTITY Column. Syntax as follows SET IDENTITY_INSERT tablename ON SET IDENTITY_INSERT tablename OFF Let consider the below example Create table Student with an identity column CREATE TABLE [dbo] . [Student] (     [StudentID]         INT NOT NULL IDENTITY ( 1 , 1 ),     [StudentName]   VARCHAR ( 100 ) NOT NULL ) Insert record into the table  INSERT INTO Student ( StudentName ) VALUES ( 'Name 1' ) INSERT INTO Student ( StudentName ) VALUES ( 'Name 2' ) INSERT INTO Student ( StudentName ) VALUES ( 'Name 3' ) INSERT INTO Student ( StudentName ) VALUES ( 'Name 4' ) INSERT INTO Student ( StudentName ) VALUES ( 'Name 5' ) Let delete the record no 3 and 4 DELETE FROM Student

ASP.NET Authentication

What is Authentication? Authenticating a user on a website means that you verify that this user is a valid user, that is, verifying who the user is using username/password or certificates, etc Authentication knows the identity of the user Authentication verifies who you are Example : When you login to access some site then your logon credential (userid/password) identifies There are three ways of doing authentication and authorization in ASP.NET Windows based Authentication: When you are providing access to the resources based on the network level login then it is called as “Windows based Authentication”. The windows based authentication is applicable only towards private website of the organization i.e. intranet based implementation . Credentials are stored in the Web server s local user database or an Active Directory  domain . Once identified you can use the user s credentials to gain access to resources that are protected by Windows aut