Wednesday, December 6, 2017

How to set Sql Server Mode In IIS in ASP.NET ?

1.We need not to create a  new database We have a tool called aspnet_regsql.exe tool (Aspnet registersql).
This tool is present in c:\windows\Microsoft.net\framework64\version.
2.In the Run command window prompt we have to run below mentioned commands
A.In that mentionpath where the tool exists,Toolname -s Sqlservername -E(Means windowauthentication) -ssadd(Add support for SQL serve sessionmode -sstype p(MeansSession variables will store in ASP state sql server database)
3.Need to set mode to SQLserver
<sessionstate mode="SqlServer" sqlconnectionstring="datasource=.; userid="username" pwd="p***"/>




What are the Event Handlers that can be included in the Global.asax file ?

There total 5 events in global.aspx file
1. Application_start
 --- When ever first instance of HTTPApplication class created.
2.Application_Error:
-- When ever unhandled exception occurs in the Application
3.Application_End
--- When ever last instance HTTPApplication class destryoyed.
4.Session_Start :
 -- user visits the application.
5. Session_End :
   --- When the session state is set to inproc then this event gets fired.

Blog Archive

Don't Copy

Protected by Copyscape Online Plagiarism Checker

Pages