views:

170

answers:

1

If I put configuration settings (like membership provider) DB Connnection, etc. in the "machine.config", and remove the "web.config" file from my current application, will my application work without any trouble? Is it an accepted practice in .NET?

A: 

You can do this but you need to be careful that all apps hosted on the server either comply or override the behaviour.

Here is an article that may help you: http://odetocode.com/Articles/427.aspx

Burt
Usually the `machine.config` file is not edited, and the `web.config` is used, so your proposal is an unusual one. Here's another about the differences between `machine.config` and `web.config` from the ASP.NET forums. http://forums.asp.net/p/1117776/1117776.aspx
rlb.usa
It really depends on the type of app you are building. If it is a single app on shared hosting then it wouldn't be advisable but if it is an intranet app on a server that hosts other similar apps that all share the same membership info then it would be better than duplicating the config settings.It all really depends.
Burt