app设置文件和web.config文件有什么区别? [英] what is difference between app setting file and web.config file ?

查看:94
本文介绍了app设置文件和web.config文件有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很困惑,实际上在哪里写连接字符串..



在app.setting文件中添加键和值..



或连接字符串或应用程序设置部分内的wrb.config文件..



我对这三种情况非常困惑。请建议

I am confused where to write connection string actually ..

in app.setting file with add key and value ..

or inside wrb.config file under connection string or inside app setting section ..

I am very much confused with this three scenarios .. please suggest

推荐答案

参考 - App.Config和Web之间的差异。配置? [ ^ ]。

Refer - Differences between App.Config and Web.Config?[^].
Quote:

Web.Config用于asp.net网站项目/网络服务。



App.Config用于Windows窗体,Windows服务,控制台应用程序和WPF应用程序。

Web.Config is used for asp.net web projects / web services.

App.Config is used for Windows Forms, Windows Services, Console Apps and WPF applications.

您可以在任何这些文件中添加 ConnectionString ,但这取决于应用的类型。

You can add ConnectionString inside any of these files, but it would depend upon the type of application.


这篇关于app设置文件和web.config文件有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆