Create a database connection in Web.config

zhaozj2021-02-16  54

Open a web.config file, add: Web.config file : < / appSettings> tag to each error to be processed. "ON" always displays a custom (friendly) message. "OFF" always displays detailed ASP.NET error messages. "Remoteon" only displays custom (friendly) information on users who are not running on the local Web server. For security purposes, it is recommended to use this setting so that you do not display the application's details. ->

Wildcase: "*" means anyone, "?" Indicates anonymous (without authentication) users. -> - (comma-separated user list] "Roles =" [comma-separated role List] "/> -> <-! - Globalization This section sets the global setting of the application. -> Add database connection statement in .aspx file: SQLConnection Objconnection = New SqlConnection (System.Configuration .ConfigurationSettings.appsettings ["sqlconn"]); if you have any questions, please contact! Http://mumushu.126.com

E_mail: Mumu_Shu@hotmail.com

转载请注明原文地址:https://www.9cbs.com/read-24667.html

New Post(0)