Does a .settings file work in a web application? If I right-click my project and choose Add > New Item..., I don't have the template listed. If I do the same thing in a class library it is. Am I missing anything?
A:
You keep your settings in web.config (Visual Studio creates it for you when you create a new web project). You can edit it by hand or use Website->Asp.Net Configuration option in Visual Studio (as stated in the comments inside the file). Then it depends on what you need - if custom app settings are what you're after then you go Application Configuration->Create application settings.
Hope it helps, I don't do a lot of web development, so you might want to wait for some better answers.
lukem00
2010-06-28 14:21:08
In a Windows app you have app.config, but you can still use the strongly-typed and modifiable .settings file (often named Settings.settings).
Nelson
2010-06-28 14:24:17
Yep, those strongly-typed settings still use app.config internally. By using the tool I mentioned you can add your own settings as well, but they're not strongly-typed. I don't know if it's possible to specify type somehow, some other people will have to comment on that.
lukem00
2010-06-28 14:34:37
Yes, and by default GenerateDefaultValueInCode=True, so the values are actually in code as well. Anyway, I think I may have found the reason (comment on my question) until I hear otherwise.
Nelson
2010-06-28 15:38:14
Since I wasn't able to help too much and I can see there are no new answers, maybe I can delete my post, so that the question goes back on the list of unanswered questions, where it should be easier to spot? Also, you might want to add some more popular tags to it (say asp.net).
lukem00
2010-06-30 09:17:10