Search This Blog

Mar 9, 2010

TO ENABLE THE SQL SERVER MODE IN ASP.NET


  • Locate the Aspnet_regsql.exe tool,which is usually resides in the following folder:
           Systemroot\Microsoft.Net\Framework\Versionnumber

Note:
 if u are not able to find  this location .. do the following :

  • go to the windows folder which resides in the Local C drive in My Computer . 
  • open the windows folder , there will be a folder named Microsoft.Net .
  • open the folder named Framework .
  • open the framework folder, there will be a folder named v2.0.50727 .
  • open the same to  find out the Aspnet_regsql.exe. 
  • double click on the same.
  • here the set up is . double click on the same to install it.
  • and thats the location given above in blue format.

  • Run the tool .the following example installs the database on a server called MySqlServer..
        Aspnet_regsql -S MySqlServer -E -ssadd -sstype p

-S ->>> specifies the name off the computer on which SQL Server data store is to be installed.
-E ->>> Facilitates authentication using credentials of the currently logged on user.
 p ->>> it is used for specifying the password for sql server ,with -U option.

  • Once the databes has been installed , you must configure your application to use it. this is done in the following way :
  • In the visual , open the Web.config file 
  • Add the following markup within the tags:
         sqlConnectionString = "Integrated Security = SSPI"; data source = MySqlServer ;" />
 
whereas,

>>Integrated security = it is used to determine whether or not the connection needs to be a secure connection.when false, the user id and password are specified in the connection. when true, the current windows account credentials are use for authentication.Recognised values are true ,false,yes,no ,and ,SSPI (which is equivalent to true).

>>SSPI = security support  provider interface.Different applications have different security requirements for identifying and authenticating users in addition to encrypting data. For example, internet explorer mobile requires server certificate authentication and no client certificate authentication , whereas inbox attachments and infrared downloads require server certificate authentication by default. To support these applications and achieve network authentication , the Security Support Provider Interface(SSPI) allows applications to access DLL's called Security Support Providers(SSPs) - that provide common authentication protocols.