Runtime Error
Description:an Application error occurred on the server. The current custom error settings-application prevent the details of the application error from being viewed Remo Tely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details:to enable the details of this specific error message to being viewable on remote machines, please create a
Notes:the Current error page seeing can is replaced by a custom error page by modifyin
To open IIS, we find that there will be two error pages to handle, see:After making different settings, we find that the setting results are reflected in Web. config:The. NET Error pages settings are written to the system.web/customerrors,Error pages is written to system.webserver/httperrors:Conclusion:Simply put, access static files such as. js,. html,. css,. jpg ... ) The error will be in accordance with
When customErrors mode is set to Off in Web. config, the possible cause of the error is not displayed ., Customerrorsmode
Sometimes our website programs run locally, but an error is reported after being uploaded to the remote server. This requires us to understand specific errors, but IIS only displays unified runtime errors by default. To know specific errors, w
Describes how to set Asp.net web. config customErrors,
Summary
CustomErrors
This node has three optional settings
On: the safest option for server development, because it always hides error messages.
RemoteOnly: displays common error messages to most users, but displays complete error messages to users with serve
Details: to enable others to view details of this specific error message on a remote computer, go to the "Web. create a
Note: Modify the defaultredirect attribute of the
Details
Provides information about custom error messages for ASP. NET applications.
Configuration Structure example:
Mode = "on | off | remoteonly">
Redirect = "url"/>
Attribute option description
Mode specifies whether to enable, disable, or display custom errors
The way the ASP. NET configuration file is configured is actually the most clearly written in MSDN. It's a pity that I've never known the power of MSDN before.First address: http://msdn.microsoft.com/zh-cn/library/dayb112d (v=vs.80). aspx, and then analyze it individually. I hope I can finish this series of things from beginning to end. In order not to let myself give up too early, I decided to learn from the configuration files I used, and then gradually contact those unfamiliar, and less use.F
The way the ASP. NET configuration file is configured is actually the most clearly written in MSDN. It's a pity that I've never known the power of MSDN before.First address: http://msdn.microsoft.com/zh-cn/library/dayb112d (v=vs.80). aspx, and then analyze it individually. I hope I can finish this series of things from beginning to end. In order not to let myself give up too early, I decided to learn from the configuration files I used, and then gradually contact those unfamiliar, and less use.F
Original: Use Configsource in the Web. config file to avoid dynamically modifying Web. config to cause ASP. NET Restart (Add a config file to manage user data)As we all know, after modifying the configuration file Web.
Set Machine. config to the computer-level default value of the server application. If you want to force specific configurations for all applications on the server, you can use allowOverride = "false" on the
For those settings that can be configured based on a single application, the application usually provides the Web. config file. Although multiple
The main p
Encryption and decryption of database connection strings in ASP. NET web. config and web. config
Although not very fresh, I believe there are still many people who don't know, well, don't talk nonsense, just give the method: Start ---> Run, Enter cmd, and then enter the following content
Encryption:
C: \ WINDOWS \ Micr
Create a custom configSection in web. config or app. config file, web. configsection
Config file:
FileDepend. cs
using System;using System.Collections.Generic;using System.Configuration;using System.Linq;namespace TestConsole{ public class FileDepend : ConfigurationSecti
Reference:Http://www.cnblogs.com/sxw_cug/archive/2013/02/28/1785477.htmlHttp://www.cnblogs.com/jiaxa/p/3326631.html?utm_source=tuicoolHttp://www.cnblogs.com/Gyoung/p/3590778.htmlAs we all know, after modifying the configuration file Web. config in ASP. NET, it causes the application to restart and all sessions (session) are lost. However, the application configuration information in the configuration file i
Web. config User Guide, web. config Guide
External file db. config:
Copy codeThe Code is as follows:ProviderName = "System. Data. SqlClient"/>ProviderName = "System. Data. SqlClient"/>
Specific format
Notes
1. if configSource is specified, the external files shall prevail.
Web. config database connection, web. config
Method 1: connectionsStrings
First configure the web. config file
The server indicates the database address, the local database can be represented by "." or "localhost", the databa
Save the data in the web. config configuration file, and how to obtain the data in the config configuration file, web. configconfig
Some data needs to be written to the configuration file. We should try to write it into the configuration file. For example, you can change the frequently changed data or change the confi
Web. config configuration, web. config
Sometimes a global value can be set to the deleettings, which can be called through the following code.
String deptid = ConfigurationManager. receivettings ["DepartmentRootID"];
However, it is recommended to write it in connectionStrings.
Http://www.cnblogs.com/hakuci/archiv
Detailed usage of Web. config in ASP. NET configuration file, asp. netweb. config
This article describes the usage of the ASP. NET configuration file Web. config for your reference. The specific analysis is as follows:
1. Understand the
perform on the elements to be searched for by the Locator feature.
The following example shows the contents of the conversion file. The conversion file will change the connection string and replace the customErrors element:
Copy
connectionString="value for the deployed Web.config file" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/> mode="RemoteOnly" xdt:Transform="Replace">
The root element of the
Web. config is a configuration file for web applications. In the web program you developed, you can create a web. config.App. config is the configuration file of the desktop application. When you create a desktop application proje
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.