本文介绍了机器配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All


我需要询问.NET中的配置文件,

有两个配置文件

1.网络配置

2.机器配置

我了解Web配置的用法,但无法理解

机器的使用情况配置。

我在文章中读到你也可以写你的数据库连接

机器配置中的字符串

如果这是真的那么为什么人们使用web配置,我们可以在机器上写下

整个配置

设置。


可以解释一下为什么.net框架工作需要两个配置文件

如果我们在两个文件中写相同的内容(配置设置)????

关于

Tarun Sinha

解决方案




Hello All

I need to ask about the configuration file in .NET,
There are Two config File
1. Web Config
2. Machine config
I understand the the usage of Web config , but not able to understand
the usage of Machine config.
I read in the article that you can also write your database connection
string in Machine Config
if this is true then why the people using web config , we can write the
whole configurartion
setting in machine.

Can any explain me why .net frame work requires two configuration file
if we write the same content (config setting) in both the files ????
With regards
Tarun Sinha

解决方案



machine.config is a single file that holds configuration for the entire
machine,
web.config is web-application specific. You might have multiple copies.

Example: we have multiple sites on our server, that need separate
connection strings!
Hans Kesting




这篇关于机器配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 00:18