1

Okay,

I am wondering having clear web.config file could be good but you know some shared web hosting companies don't allow us to touch things like machine.config and etc.

So If a lot of things have been moved onto machine.config, then will we be allowed to change things like we used to through web.config file.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Tarik
  • 79,711
  • 83
  • 236
  • 349
  • 1
    Why would you want to have a "clear/clean web.config file" exactly? "Could be good" in what way? If you already know that your web hosting company doesn't allow you to change the `machine.config`, then why would you intentionally paint yourself into a corner and make your application depend on settings in `machine.config`? – Aaronaught May 09 '10 at 22:03
  • Having a good hosting is pretty expensive some times and there are not that bad but useful shared hosting providers out there like GoDaddy. So paying 60 dollars for almost everything included hosting instead of thousand dollars hosting sounds good usually. It is not my choice, it is my budget choice. Especially when you are developing web sites which includes CRM or some thing for small companies, paying less for hosting is first choice of almost all small companies. That's another reason. After a time, web.config gets more complicated to read. That's why clean web.config may mean less fault. – Tarik May 09 '10 at 22:35
  • $60 dollars for shared hosting? You're getting ripped off. You can get virtual dedicated hosting (from GoDaddy and others) for $30-40 dollars a month, e.g. full control over the machine, which includes `machine.config`. – Jake Petroules Aug 19 '10 at 23:24
  • It is 60/year not month. – Tarik Aug 20 '10 at 19:09

1 Answers1

3

Nothing is changing in this regard with ASP.NET 4.0: the way the ASP.NET configuration model has always worked is that you can override settings in machine.config with a web.config in your site root and further in sub-directories.

Here is a summary of what's actually changing for ASP.NET 4.0 config files and the reasoning behind the decision, it's basically to reduce the file size, make things less complicated and easier to read: http://weblogs.asp.net/scottgu/archive/2009/08/25/clean-web-config-files-vs-2010-and-net-4-0-series.aspx

Peter McG
  • 18,857
  • 8
  • 45
  • 53
  • Thanks. Instead of giving good answers like you, people are acting like a super hero and complaining about my question. If I knew the answer, I wouldn't ask here. Anyways, that's great to hear, because I needed to do some tricks to make the application work on my GoDaddy share hosting account.It kinda scared me when I heard that a lot of things were moved onto machine.config. – Tarik May 09 '10 at 22:39